summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2022-05-16 11:59:11 +0200
committerFlorian Schmaus <flow@gentoo.org>2022-05-16 12:12:05 +0200
commiteb81f1f23a16118debe1daebbccc58d02a3f5631 (patch)
tree14f327bff4092209e7db09d571d40cb233404865 /games-simulation
parentnet-im/poezio: drop 0.13.1-r2 (diff)
downloadgentoo-eb81f1f23a16118debe1daebbccc58d02a3f5631.tar.gz
gentoo-eb81f1f23a16118debe1daebbccc58d02a3f5631.tar.bz2
gentoo-eb81f1f23a16118debe1daebbccc58d02a3f5631.zip
games-simulation/EmptyEpsilon: add 2022.03.16
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'games-simulation')
-rw-r--r--games-simulation/EmptyEpsilon/EmptyEpsilon-2022.03.16.ebuild88
-rw-r--r--games-simulation/EmptyEpsilon/Manifest4
-rw-r--r--games-simulation/EmptyEpsilon/files/EmptyEpsilon-cmake-meshoptimizer.patch15
-rw-r--r--games-simulation/EmptyEpsilon/files/SeriousProton-cmake.patch15
4 files changed, 122 insertions, 0 deletions
diff --git a/games-simulation/EmptyEpsilon/EmptyEpsilon-2022.03.16.ebuild b/games-simulation/EmptyEpsilon/EmptyEpsilon-2022.03.16.ebuild
new file mode 100644
index 000000000000..9842d07150b2
--- /dev/null
+++ b/games-simulation/EmptyEpsilon/EmptyEpsilon-2022.03.16.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake toolchain-funcs
+
+# basics_universal version
+MY_BU_VER="1_15_update2"
+# meshoptimizer version
+MY_MO_VER="0.16"
+
+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
+ https://github.com/BinomialLLC/basis_universal/archive/refs/tags/v${MY_BU_VER}.tar.gz -> basis_universal_${MY_BU_VER}.tar.gz
+ https://github.com/zeux/meshoptimizer/archive/refs/tags/v${MY_MO_VER}.tar.gz -> meshoptimizer-${MY_MO_VER}.tar.gz
+"
+
+# EmptyEpsilon is mostly licensed under GPL, however the art ressources
+# use Creative Commons and the bundled SeriousProton is MIT-licensed.
+LICENSE="Apache-2.0 GPL-2 CC-BY-SA-3.0 MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ dev-cpp/nlohmann_json
+ media-libs/freetype
+ media-libs/libsdl2
+ >=media-libs/glm-0.9.9.8
+"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/EmptyEpsilon-EE-${PV}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-cmake-meshoptimizer.patch"
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} == "binary" ]] && return
+
+ 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() {
+ cmake_src_prepare
+
+ local -A externals=()
+ externals["${BUILD_DIR}/SeriousProton/externals/basis"]="${WORKDIR}/basis_universal-${MY_BU_VER}"
+ externals["${BUILD_DIR}/externals/meshoptimizer"]="${WORKDIR}/meshoptimizer-${MY_MO_VER}"
+ local link
+ for link in "${!externals[@]}"; do
+ local external_dir=$(dirname "${link}")
+ if [[ ! -d "${external_dir}" ]]; then
+ mkdir -p "${external_dir}" || die
+ fi
+ local target="${externals[${link}]}"
+ ln -rs "${target}" "${link}" || die
+ done
+
+ eapply --directory="${WORKDIR}/SeriousProton-EE-${PV}" \
+ "${FILESDIR}/SeriousProton-cmake.patch"
+}
+
+src_configure() {
+ local version=( $(ver_rs 1- ' ') )
+ local mycmakeargs=(
+ -DSERIOUS_PROTON_DIR="${WORKDIR}/SeriousProton-EE-${PV}/"
+ -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/Manifest b/games-simulation/EmptyEpsilon/Manifest
index a04319c8d93f..aaf0d0e732ff 100644
--- a/games-simulation/EmptyEpsilon/Manifest
+++ b/games-simulation/EmptyEpsilon/Manifest
@@ -1,2 +1,6 @@
DIST EmptyEpsilon-2021.06.23.tar.gz 285211647 BLAKE2B 813b7e02ff7f046b7f28139063441eb421861b720c7b55d25930d3a418211fefdce7ac0e6ab705b4afe52df58f85a9298ff3e6be883a841e6eb9f7037eca297b SHA512 209ea68d99ef5ef53f1e3484d6471cafc01d4cb6505609a5b41d468387147127b4b4bbc20af75404d2cdef3d3cfb37bbb7f6fb3ae336d2f7e264e9c470ad7764
+DIST EmptyEpsilon-2022.03.16.tar.gz 258014053 BLAKE2B d447518c6887b5969bce48abc042a259733a6845a49ba767b274d17c1b0e28a025443d073563e269365837191439f7963f3a3775c58b143e97cef7b7c0cef336 SHA512 63f351be1af792be0ce8b1171ea14dd9f3ab75825ca9df48f7a7bfbc3cedfe05183f59896a51cd4e1f4e977aa5c9386159716dcc206afd7a1adab1df7c35e062
DIST SeriousProton-2021.06.23.tar.gz 1181117 BLAKE2B 433280b7f6994bed0b86ffc4135a1e91bd9521c508b875332d17dc041da6b77a4260de784b6b75e79aab072d6bc68108a8b6b4949d674670f1d13ed1abe90d7e SHA512 4519801c30cd87436704023090ce39299573b02637a86b0d5c6ac0f4e99b4bddc6724b2b660edfd29d33a908b67268409a8c47dab7b5d59958a5abd52d5610bf
+DIST SeriousProton-2022.03.16.tar.gz 2671635 BLAKE2B 9fdb58d50e7f3522678efe14b753016c4d2e3341f2e3b78ede00815e4f6a6361eb635016c9cdf0ce235a0bb35fb813b61790a5b0d1522a1e8afe2f3594674341 SHA512 74a06c69a3f49789b35a6e5795a7b1de1b7e79d36c956a92e1383f9983489319060c62f3ee6349e26ac985a5121b4e60cf7a3546ec78b3a830e30c0c99ccd023
+DIST basis_universal_1_15_update2.tar.gz 13283133 BLAKE2B 5400d23f86dd581da1bc96c1b95eae58f3c97b5412ad1d09d7f4ffd2ae7cae6cb14330795380e253579cc17f1ee16c91555229268219c300905da1420c0d8717 SHA512 a898a057b57ac64f6c0bf5fce0b599e23421ccdd015ea7bb668bce8b9292ef55b098f3d05854a2fb5363959932b75cd0a842664ae7d4f71f3537dc11301c1b32
+DIST meshoptimizer-0.16.tar.gz 342571 BLAKE2B 2b4e244ea3676f109c904261d47bd0e7b2ad440f23d65325d34281ed13ac09657116c96b5a56860a0107479773b58c21018c8825b314f87a05bce38341fd75c1 SHA512 cc6d28359fb99a615e1046a4af1b247cbc6ea0266d9e7f41ea0516c1fc09fa1e67376071daf138a126c77bca3baf9d565636ed0e3adf045f1a08498c38b7a7e7
diff --git a/games-simulation/EmptyEpsilon/files/EmptyEpsilon-cmake-meshoptimizer.patch b/games-simulation/EmptyEpsilon/files/EmptyEpsilon-cmake-meshoptimizer.patch
new file mode 100644
index 000000000000..d948d6923e39
--- /dev/null
+++ b/games-simulation/EmptyEpsilon/files/EmptyEpsilon-cmake-meshoptimizer.patch
@@ -0,0 +1,15 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -133,9 +133,9 @@ else()
+ endif()
+
+ if(NOT meshoptimizer_POPULATED)
+- if(COMMAND FetchContent_Populate)
+- FetchContent_Populate(meshoptimizer)
+- endif()
++ set(meshoptimizer_SOURCE_DIR "${EXTERNALS_DIR}/meshoptimizer")
++ set(meshoptimizer_BINARY_DIR "${PROJECT_BINARY_DIR}/externals/meshoptimizer")
++
+ add_subdirectory(${meshoptimizer_SOURCE_DIR} ${meshoptimizer_BINARY_DIR} EXCLUDE_FROM_ALL)
+ endif()
+
diff --git a/games-simulation/EmptyEpsilon/files/SeriousProton-cmake.patch b/games-simulation/EmptyEpsilon/files/SeriousProton-cmake.patch
new file mode 100644
index 000000000000..3ac8368055f1
--- /dev/null
+++ b/games-simulation/EmptyEpsilon/files/SeriousProton-cmake.patch
@@ -0,0 +1,15 @@
+--- a/libs/basis_universal/CMakeLists.txt
++++ b/libs/basis_universal/CMakeLists.txt
+@@ -29,9 +29,9 @@ else()
+ endif()
+
+ if(NOT basis_POPULATED)
+- if(COMMAND FetchContent_Populate)
+- FetchContent_Populate(basis)
+- endif()
++ set(basis_SOURCE_DIR "${EXTERNALS_DIR}/basis")
++ set(basis_BINARY_DIR "${PROJECT_BINARY_DIR}/externals/basis")
++
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(BUILD_X64 FALSE CACHE BOOL "")
+ endif()