From e6ba27a83a9b9e1df6b4e370e15e6a798f08060e Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Thu, 21 Oct 2021 12:52:39 +0200 Subject: games-simulation/EmptyEpsilon: install .desktop file Closes: https://bugs.gentoo.org/818697 Signed-off-by: Florian Schmaus --- .../EmptyEpsilon/EmptyEpsilon-2021.06.23-r1.ebuild | 69 ++++++++++++++++++++++ .../EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild | 68 --------------------- ...EmptyEpsilon-Install-EmptyEpsilon.desktop.patch | 45 ++++++++++++++ 3 files changed, 114 insertions(+), 68 deletions(-) create mode 100644 games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23-r1.ebuild delete mode 100644 games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild create mode 100644 games-simulation/EmptyEpsilon/files/EmptyEpsilon-Install-EmptyEpsilon.desktop.patch (limited to 'games-simulation') diff --git a/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23-r1.ebuild b/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23-r1.ebuild new file mode 100644 index 000000000000..046224a20d14 --- /dev/null +++ b/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23-r1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake toolchain-funcs + +DESCRIPTION="A spaceship bridge simulator game." +HOMEPAGE="https://daid.github.io/EmptyEpsilon/" +# This bundles SeriousProton as the build system does not support using +# a separate SeriousProton instance (and currently EmptyEpsilon seems to +# be the only consumer). +SRC_URI="https://github.com/daid/EmptyEpsilon/archive/EE-${PV}.tar.gz -> EmptyEpsilon-${PV}.tar.gz + https://github.com/daid/SeriousProton/archive/EE-${PV}.tar.gz -> SeriousProton-${PV}.tar.gz" + +# EmptyEpsilon is mostly licensed under GPL, however the art ressources +# use Creative Commons and the bundled SeriousProton is MIT-licensed. +LICENSE="GPL-2 CC-BY-SA-3.0 MIT" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + >=dev-cpp/json11-1.0.0 + media-libs/libglvnd + media-libs/libsfml + >=media-libs/glm-0.9.9.8 +" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/EmptyEpsilon-EE-${PV}" + +pkg_pretend() { + if [[ ${MERGE_TYPE} == "binary" ]]; then + return + fi + + if tc-is-gcc; then + if [[ $(gcc-major-version) -lt 11 ]]; then + # ld: /usr/lib64/libsfml-audio.so: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.a4.29' + eerror "${PN} requires GCC >= 11. Run gcc-config to switch your default compiler." + die "Need at least GCC >= 11" + fi + fi +} + +src_prepare() { + eapply "${FILESDIR}/${PN}-Install-EmptyEpsilon.desktop.patch" + eapply "${FILESDIR}/${PN}-Make-CMake-call-find_package-glm.patch" + eapply --directory="${WORKDIR}/SeriousProton-EE-${PV}" \ + "${FILESDIR}/SeriousProton-Unbundle-json11.patch" + + eapply_user + + cmake_src_prepare +} + +src_configure() { + local version=( $(ver_rs 1- ' ') ) + local mycmakeargs=( + -DSERIOUS_PROTON_DIR="${WORKDIR}/SeriousProton-EE-${PV}/" + -DOpenGL_GL_PREFERENCE=GLVND + -DCPACK_PACKAGE_VERSION="${PV}" + -DCPACK_PACKAGE_VERSION_MAJOR="${version[0]}" + -DCPACK_PACKAGE_VERSION_MINOR="${version[1]}" + -DCPACK_PACKAGE_VERSION_PATCH="${version[2]}" + ) + + cmake_src_configure +} diff --git a/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild b/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild deleted file mode 100644 index 5d9e67d4a9fb..000000000000 --- a/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake toolchain-funcs - -DESCRIPTION="A spaceship bridge simulator game." -HOMEPAGE="https://daid.github.io/EmptyEpsilon/" -# This bundles SeriousProton as the build system does not support using -# a separate SeriousProton instance (and currently EmptyEpsilon seems to -# be the only consumer). -SRC_URI="https://github.com/daid/EmptyEpsilon/archive/EE-${PV}.tar.gz -> EmptyEpsilon-${PV}.tar.gz - https://github.com/daid/SeriousProton/archive/EE-${PV}.tar.gz -> SeriousProton-${PV}.tar.gz" - -# EmptyEpsilon is mostly licensed under GPL, however the art ressources -# use Creative Commons and the bundled SeriousProton is MIT-licensed. -LICENSE="GPL-2 CC-BY-SA-3.0 MIT" -SLOT="0" -KEYWORDS="~amd64" - -RDEPEND=" - >=dev-cpp/json11-1.0.0 - media-libs/libglvnd - media-libs/libsfml - >=media-libs/glm-0.9.9.8 -" -DEPEND="${RDEPEND}" - -S="${WORKDIR}/EmptyEpsilon-EE-${PV}" - -pkg_pretend() { - if [[ ${MERGE_TYPE} == "binary" ]]; then - return - fi - - if tc-is-gcc; then - if [[ $(gcc-major-version) -lt 11 ]]; then - # ld: /usr/lib64/libsfml-audio.so: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.a4.29' - eerror "${PN} requires GCC >= 11. Run gcc-config to switch your default compiler." - die "Need at least GCC >= 11" - fi - fi -} - -src_prepare() { - eapply "${FILESDIR}/${PN}-Make-CMake-call-find_package-glm.patch" - eapply --directory="${WORKDIR}/SeriousProton-EE-${PV}" \ - "${FILESDIR}/SeriousProton-Unbundle-json11.patch" - - eapply_user - - cmake_src_prepare -} - -src_configure() { - local version=( $(ver_rs 1- ' ') ) - local mycmakeargs=( - -DSERIOUS_PROTON_DIR="${WORKDIR}/SeriousProton-EE-${PV}/" - -DOpenGL_GL_PREFERENCE=GLVND - -DCPACK_PACKAGE_VERSION="${PV}" - -DCPACK_PACKAGE_VERSION_MAJOR="${version[0]}" - -DCPACK_PACKAGE_VERSION_MINOR="${version[1]}" - -DCPACK_PACKAGE_VERSION_PATCH="${version[2]}" - ) - - cmake_src_configure -} diff --git a/games-simulation/EmptyEpsilon/files/EmptyEpsilon-Install-EmptyEpsilon.desktop.patch b/games-simulation/EmptyEpsilon/files/EmptyEpsilon-Install-EmptyEpsilon.desktop.patch new file mode 100644 index 000000000000..4730bcbabb25 --- /dev/null +++ b/games-simulation/EmptyEpsilon/files/EmptyEpsilon-Install-EmptyEpsilon.desktop.patch @@ -0,0 +1,45 @@ +From c34c773ab5a403c288d7eecd971ae5b0d9eecfa0 Mon Sep 17 00:00:00 2001 +From: Florian Schmaus +Date: Thu, 21 Oct 2021 10:33:28 +0200 +Subject: [PATCH] Install EmptyEpsilon.desktop + +Fixes #405. + +See also https://bugs.gentoo.org/818697 +--- + CMakeLists.txt | 5 +++++ + EmptyEpsilon.desktop | 9 +++++++++ + 2 files changed, 14 insertions(+) + create mode 100644 EmptyEpsilon.desktop + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cb3e32c0e6ed..b630668aecd9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -711,3 +711,8 @@ set(CPACK_INSTALL_CMAKE_PROJECTS + ) + + include(CPack) ++ ++if(UNIX AND NOT APPLE) ++ install(FILES EmptyEpsilon.desktop DESTINATION "share/applications") ++ install(FILES logo.png DESTINATION "share/icons" RENAME "EmptyEpsilon.png") ++endif() +diff --git a/EmptyEpsilon.desktop b/EmptyEpsilon.desktop +new file mode 100644 +index 000000000000..07cc109b578d +--- /dev/null ++++ b/EmptyEpsilon.desktop +@@ -0,0 +1,9 @@ ++[Desktop Entry] ++Name=EmptyEpsilon ++GenericName=EmptyEpsilon ++Comment=Spaceship bridge simulator game ++Exec=EmptyEpsilon ++Icon=EmptyEpsilon ++Terminal=false ++Type=Application ++Categories=Game;Simulation; +-- +2.33.1 + -- cgit v1.2.3-65-gdbad