summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-simulation')
-rw-r--r--games-simulation/EmptyEpsilon/EmptyEpsilon-2022.10.28.ebuild91
-rw-r--r--games-simulation/EmptyEpsilon/Manifest2
2 files changed, 93 insertions, 0 deletions
diff --git a/games-simulation/EmptyEpsilon/EmptyEpsilon-2022.10.28.ebuild b/games-simulation/EmptyEpsilon/EmptyEpsilon-2022.10.28.ebuild
new file mode 100644
index 000000000000..d25e36d666ad
--- /dev/null
+++ b/games-simulation/EmptyEpsilon/EmptyEpsilon-2022.10.28.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake toolchain-funcs
+
+# basis_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
+
+ local serious_proton_patches=(
+ "${FILESDIR}/SeriousProton-cmake.patch"
+ )
+ eapply --directory="${WORKDIR}/SeriousProton-EE-${PV}" \
+ "${serious_proton_patches[@]}"
+}
+
+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 aaf0d0e732ff..f3ba3cc8a30c 100644
--- a/games-simulation/EmptyEpsilon/Manifest
+++ b/games-simulation/EmptyEpsilon/Manifest
@@ -1,6 +1,8 @@
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 EmptyEpsilon-2022.10.28.tar.gz 258148673 BLAKE2B dcc2cdd6f02afef4fee00939145c4c98461ea5403ad45949ffc99758b0575f56504b610249231969f63751d8a2f746913a004d88d7287876a5b448a4b90d8162 SHA512 6af0522cb9f07f0b0cf3ac287ce57b156206b27b4d17de237acf50c46928782c49a4af397c9cad4be30603e0ee04bd6979404e11d0b2c5472cf0c278124df140
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 SeriousProton-2022.10.28.tar.gz 2668713 BLAKE2B 9f200881bfa812904cd37428eb2bb2f8e04c46a134e8b3fceb0e02e87fe4bd7e529e1fbaf18cb4e284ec7ee4d1c6e8606f35e7ec3e61efa66816a7b354d446b9 SHA512 7955ed78529c0f69d6fd3ef6fac5537009548cdfe1cf8e47dc1fac8919fc3532e03453869968369f027c40dd4da513cfd84e58ffedaddd4b9d9fe67d28406be7
DIST basis_universal_1_15_update2.tar.gz 13283133 BLAKE2B 5400d23f86dd581da1bc96c1b95eae58f3c97b5412ad1d09d7f4ffd2ae7cae6cb14330795380e253579cc17f1ee16c91555229268219c300905da1420c0d8717 SHA512 a898a057b57ac64f6c0bf5fce0b599e23421ccdd015ea7bb668bce8b9292ef55b098f3d05854a2fb5363959932b75cd0a842664ae7d4f71f3537dc11301c1b32
DIST meshoptimizer-0.16.tar.gz 342571 BLAKE2B 2b4e244ea3676f109c904261d47bd0e7b2ad440f23d65325d34281ed13ac09657116c96b5a56860a0107479773b58c21018c8825b314f87a05bce38341fd75c1 SHA512 cc6d28359fb99a615e1046a4af1b247cbc6ea0266d9e7f41ea0516c1fc09fa1e67376071daf138a126c77bca3baf9d565636ed0e3adf045f1a08498c38b7a7e7