commit:     08a651bee54cc876c584720f490b59ed6654c39f
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sun Aug  3 06:21:58 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sun Aug  3 07:04:22 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08a651be

games-strategy/freeorion: add 0.5.1.1

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-strategy/freeorion/Manifest                  |   1 +
 .../files/freeorion-0.5.1.1-config.h-path.patch    |   8 ++
 games-strategy/freeorion/freeorion-0.5.1.1.ebuild  | 130 +++++++++++++++++++++
 3 files changed, 139 insertions(+)

diff --git a/games-strategy/freeorion/Manifest 
b/games-strategy/freeorion/Manifest
index dc3267e0dc08..267bab50d168 100644
--- a/games-strategy/freeorion/Manifest
+++ b/games-strategy/freeorion/Manifest
@@ -1 +1,2 @@
+DIST FreeOrion-v0.5.1.1_Source.tar.gz 156827341 BLAKE2B 
5baf826cb68eb6f500c083bf0716e48639a21d129532be549441c713e3dff2eaaf7669e0a3a8655e76aeab8ce79fecc41f271fe73f951d4a02b8e7233462ce60
 SHA512 
1876eacc5c5dd3e2e3d830088cce2fbe2db40d317eaefeedaba5567dfd218f296a15305e5ec5bd9a91d7ef53a7699fe672972784a1cbd0f7003bb32cdb34b52c
 DIST FreeOrion_v0.5.1_Source.tar.gz 154915100 BLAKE2B 
5097fed26443cd076d03af05816148bf2923b86d4719b86e4593b1bca383af222db6f105e3b4a4b531188558305140e9999a80c7550959adaa65cf08f5bb6b5e
 SHA512 
253deba1a90bd4fa7e33423e0148b22ee5234e47007fef9cee66d617caaa5794e2a600e057574c79caa7058557d51d290c5161e9dfa3d8dabe4ebc5da85b8233

diff --git 
a/games-strategy/freeorion/files/freeorion-0.5.1.1-config.h-path.patch 
b/games-strategy/freeorion/files/freeorion-0.5.1.1-config.h-path.patch
new file mode 100644
index 000000000000..77b09e4f029d
--- /dev/null
+++ b/games-strategy/freeorion/files/freeorion-0.5.1.1-config.h-path.patch
@@ -0,0 +1,8 @@
+https://github.com/freeorion/freeorion/pull/5259
+--- a/GG/GG/CMakeLists.txt
++++ b/GG/GG/CMakeLists.txt
+@@ -20,3 +20,3 @@
+         ${CMAKE_CURRENT_LIST_DIR}/Clr.h
+-        ${CMAKE_CURRENT_LIST_DIR}/Config.h
++        ${CMAKE_CURRENT_BINARY_DIR}/Config.h
+         ${CMAKE_CURRENT_LIST_DIR}/Control.h

diff --git a/games-strategy/freeorion/freeorion-0.5.1.1.ebuild 
b/games-strategy/freeorion/freeorion-0.5.1.1.ebuild
new file mode 100644
index 000000000000..ea6151c487b8
--- /dev/null
+++ b/games-strategy/freeorion/freeorion-0.5.1.1.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..13} )
+inherit check-reqs cmake flag-o-matic multiprocessing python-single-r1 xdg
+
+DESCRIPTION="Free turn-based space empire and galactic conquest game"
+HOMEPAGE="https://www.freeorion.org/";
+SRC_URI="https://github.com/freeorion/freeorion/releases/download/v${PV}/FreeOrion-v${PV}_Source.tar.gz";
+S=${WORKDIR}/FreeOrion-v${PV}--source
+
+LICENSE="GPL-2+ CC-BY-SA-3.0 LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+client doc test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+       ${PYTHON_DEPS}
+       $(python_gen_cond_dep 
'dev-libs/boost:=[${PYTHON_USEDEP},nls,python,zlib]')
+       client? (
+               media-libs/freetype
+               media-libs/glew:0=
+               media-libs/libglvnd
+               media-libs/libpng:=
+               media-libs/libsdl2[opengl,video]
+               media-libs/libvorbis
+               media-libs/openal
+       )
+"
+RDEPEND="
+       ${DEPEND}
+       client? (
+               media-fonts/dejavu
+               media-fonts/roboto
+       )
+"
+BDEPEND="
+       ${PYTHON_DEPS}
+       doc? (
+               app-text/doxygen
+               media-gfx/graphviz
+       )
+       test? ( $(python_gen_cond_dep 'dev-python/pytest[${PYTHON_USEDEP}]') )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-config.h-path.patch
+)
+
+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
+
+       cmake_comment_add_subdirectory check #904124
+}
+
+src_configure() {
+       filter-lto # -Werror=odr issues
+
+       local mycmakeargs=(
+               -DCCACHE_PROGRAM=no
+               -DBUILD_CLIENT_GG=$(usex client)
+               -DBUILD_CLIENT_GODOT=no # TODO?
+               -DBUILD_TESTING=$(usex test)
+
+               # temporary for doc/CMakeLists.txt which is using the old 
variable
+               -DPYTHON_EXECUTABLE="${PYTHON}"
+       )
+
+       cmake_src_configure
+}
+
+src_compile() {
+       cmake_src_compile all $(usev doc)
+}
+
+src_test() {
+       local CMAKE_SKIP_TESTS=(
+               # needs looking into but failure does not seem(?) to affect 
runtime,
+               # try to remove on bump
+               TestChecksum
+       )
+
+       cmake_src_test -j1 # avoid running 2 conflicting servers
+
+       local EPYTEST_DESELECT=(
+               # broken with >=3.11 but is not known to cause issues, skip for 
now
+               
tests/AI/save_game_codec/test_savegame_manager.py::test_setstate_call
+       )
+
+       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 client; then
+               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
+       else
+               rm -r -- "${ED}"/usr/share/freeorion/default/data/fonts || die
+       fi
+}

Reply via email to