summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-07-24 21:59:37 -0400
committerIonen Wolkens <ionen@gentoo.org>2022-07-25 02:11:06 -0400
commit3246c00209ab6bab765ac17df147005b2e24e8ee (patch)
tree4fcd603c658a49ce79c69d4abab050507df71b59 /games-strategy/freeorion
parentdev-vcs/git-lfs: Stabilize 3.2.0 amd64, #860789 (diff)
downloadgentoo-3246c00209ab6bab765ac17df147005b2e24e8ee.tar.gz
gentoo-3246c00209ab6bab765ac17df147005b2e24e8ee.tar.bz2
gentoo-3246c00209ab6bab765ac17df147005b2e24e8ee.zip
games-strategy/freeorion: revbump with misc ebuild updates
* run tests, but with a major exclusion until next bump (see src_test) * use check-reqs for the early build ram usage spike * use official release tarball for accurate Version.cpp, this also prevents use of git at build time for non-live * remove unused bullet dependency (bug #846638) along with freealut * unbundle dejavu/roboto fonts * IUSE=doc for doxygen apidocs * install ChangeLog.md * drop unnecessary use of [X] on libsdl2 but keep on libglvnd for now as building tests is broken with =GLVND (next bump will use libOpenGL by default and has fixed building tests) * drop env.d LDPATH file and use rpath as intended (formerly a workaround for insecure runpaths because ebuild used dobin rather than cmake, but hasn't been like that in a while) Closes: https://bugs.gentoo.org/846638 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-strategy/freeorion')
-rw-r--r--games-strategy/freeorion/Manifest1
-rw-r--r--games-strategy/freeorion/freeorion-0.4.10.2-r1.ebuild117
2 files changed, 118 insertions, 0 deletions
diff --git a/games-strategy/freeorion/Manifest b/games-strategy/freeorion/Manifest
index 4a872343e2a4..199410a08934 100644
--- a/games-strategy/freeorion/Manifest
+++ b/games-strategy/freeorion/Manifest
@@ -1 +1,2 @@
+DIST FreeOrion_v0.4.10.2_2021-08-01.f663dad_Source.tar.gz 124836633 BLAKE2B 42224b84a7aef99e998cb025b5095365a65670a3a0a543ef323f444f1904557713dc995de6f7ccaf9a45e34f62b4c65d4977caa0f6ac7605a9978268bdef0ba1 SHA512 a0f327f5fec82cf15495828f60b59b59834efaa041919fe9f68e4428e89b729503b7e666214ea39e5c9afdfbb9efd343c5cbcb8dfc982d6f56b3a06fd898f428
DIST freeorion-0.4.10.2.tar.gz 124720711 BLAKE2B 4f707b5296bdbc05b2b775b62f0393d1770bcf64c48f08d3332fbbb4b78e1bdc3e8111a1e421a8d0f0e03ca7454bba981809b9486d3d803e39faf042f1145059 SHA512 13832992efe17fe48615ccdf284d1e9f391c35ed518abd15276992128a02894f4b30c8fe3d950e41935efb823cf834dc430330f0bcc6c9e91f13a3dea9812628
diff --git a/games-strategy/freeorion/freeorion-0.4.10.2-r1.ebuild b/games-strategy/freeorion/freeorion-0.4.10.2-r1.ebuild
new file mode 100644
index 000000000000..3d3075568e67
--- /dev/null
+++ b/games-strategy/freeorion/freeorion-0.4.10.2-r1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# note: py3.11 is known failing at runtime with this version
+PYTHON_COMPAT=( python3_{8..10} )
+inherit check-reqs cmake multiprocessing python-single-r1 xdg
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/freeorion/freeorion.git"
+else
+ FREEORION_BUILD_ID="2021-08-01.f663dad"
+ SRC_URI="https://github.com/freeorion/freeorion/releases/download/v${PV}/FreeOrion_v${PV}_${FREEORION_BUILD_ID}_Source.tar.gz"
+ S="${WORKDIR}/src-tarball"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Free turn-based space empire and galactic conquest game"
+HOMEPAGE="https://www.freeorion.org/"
+
+LICENSE="GPL-2+ CC-BY-SA-3.0 LGPL-2.1+"
+SLOT="0"
+IUSE="dedicated doc test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep 'dev-libs/boost:=[${PYTHON_USEDEP},nls,python]')
+ sys-libs/zlib:=
+ !dedicated? (
+ media-libs/freetype
+ media-libs/glew:=
+ media-libs/libglvnd[X]
+ media-libs/libogg
+ media-libs/libpng:=
+ media-libs/libsdl2[opengl,video]
+ media-libs/libvorbis
+ media-libs/openal
+ )"
+RDEPEND="
+ ${DEPEND}
+ !dedicated? (
+ media-fonts/dejavu
+ media-fonts/roboto
+ )"
+BDEPEND="
+ ${PYTHON_DEPS}
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz
+ )
+ test? (
+ $(python_gen_cond_dep 'dev-python/pytest[${PYTHON_USEDEP}]')
+ )"
+
+freeorion_check-reqs() {
+ # cc1plus processes may suddenly use ~1.5GB all at once early on (2+GB
+ # if debug symbols) then far less for the rest, check minimal jobs*1.5
+ local CHECKREQS_MEMORY=$(($(makeopts_jobs)*1500))M
+ check-reqs_${EBUILD_PHASE_FUNC}
+}
+
+pkg_pretend() {
+ freeorion_check-reqs
+}
+
+pkg_setup() {
+ freeorion_check-reqs
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ sed -i 's/-O3//' CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_HEADLESS=$(usex dedicated)
+ -DBUILD_TESTING=$(usex test)
+ )
+
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile all $(usev doc)
+}
+
+src_test() {
+ # freeoriond randomly(?) segfaults on exit, cause unknown but
+ # seems fixed by some refactoring in -9999 (excluding for now)
+ cmake_src_test -E 'SmokeTest(Game|Hostless)'
+
+ epytest -o cache_dir="${T}"/pytest_cache default/python/tests
+}
+
+src_install() {
+ local DOCS=( ChangeLog.md README.md )
+ cmake_src_install
+
+ use doc && dodoc -r "${BUILD_DIR}"/doc/cpp-apidoc/html
+
+ if use dedicated; then
+ rm -r "${ED}"/usr/share/freeorion/default/data/fonts || die
+ else
+ local font
+ for font in roboto/Roboto-{Bold,Regular}.ttf dejavu/DejaVuSans{-Bold,}.ttf; do
+ dosym -r /usr/share/{fonts/${font%/*},${PN}/default/data/fonts}/${font##*/}
+ done
+ rm "${ED}"/usr/share/${PN}/default/data/fonts/LICENSE.{Roboto,DejaVu} || die
+ fi
+}