From fc8e5932686c1d2e8714fb53a792defa32dffbd8 Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Mon, 23 Jun 2025 08:29:02 +0200 Subject: [PATCH] games-strategy/0ad: Bump to version 0.27.1 Release fixes various issues around new Vulkan backend, fix for a performance issue on older hardware with spidermonkey 115, some packaging fixes for distributions, notably cmake 4 compatibility for bundled deps. Further disables stripping which Premake does by default. Further Premake5 beta5 breaks API, so force older Premake for now so Premake can be bumped without causing issues here. Add missing dep media-libs/freetype. Export PKG_CONFIG for cross builds. Backport boost 1.89 compat fix. Closes: https://bugs.gentoo.org/836313 Closes: https://bugs.gentoo.org/955631 Closes: https://bugs.gentoo.org/963569 Closes: https://bugs.gentoo.org/964384 Signed-off-by: Ralph Sennhauser Part-of: https://github.com/gentoo/gentoo/pull/43041 Closes: https://github.com/gentoo/gentoo/pull/43041 Signed-off-by: Sam James --- games-strategy/0ad/0ad-0.27.1.ebuild | 239 ++++++++++++++++++ games-strategy/0ad/Manifest | 4 + .../files/0ad-0.27.1-fix-boost-compat.patch | 41 +++ 3 files changed, 284 insertions(+) create mode 100644 games-strategy/0ad/0ad-0.27.1.ebuild create mode 100644 games-strategy/0ad/files/0ad-0.27.1-fix-boost-compat.patch diff --git a/games-strategy/0ad/0ad-0.27.1.ebuild b/games-strategy/0ad/0ad-0.27.1.ebuild new file mode 100644 index 0000000000000..14e7b3101d37b --- /dev/null +++ b/games-strategy/0ad/0ad-0.27.1.ebuild @@ -0,0 +1,239 @@ +# Copyright 2014-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{12,13} ) +WX_GTK_VER="3.2-gtk3" +inherit desktop flag-o-matic python-any-r1 toolchain-funcs multiprocessing wxwidgets xdg + +if [[ ${PV} != 9999 && ${PV} != *_pre* ]]; then + VERIFY_SIG_METHOD=minisig + # The public key can be found upstream - last update was w/ alpha 26: + # https://gitea.wildfiregames.com/0ad/0ad/wiki/VerifyingYourDownloads + VERIFY_SIG_OPENPGP_KEY_PATH=${FILESDIR}/0ad-minisign.pub + inherit verify-sig +fi + +DESCRIPTION="A free, real-time strategy game" +HOMEPAGE="https://play0ad.com/" +LICENSE="BitstreamVera CC-BY-SA-3.0 GPL-2 LGPL-2.1 LPPL-1.3c MIT ZLIB" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/0ad/0ad" + S="${WORKDIR}/${P}" +elif [[ ${PV} == *_pre* ]]; then + ZEROAD_GIT_REVISION="" + SRC_URI="https://github.com/0ad/0ad/archive/${ZEROAD_GIT_REVISION}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${ZEROAD_GIT_REVISION}" +elif [[ ${PV} == *_rc* ]]; then + MY_P="0ad-${PV/_/-}" + SRC_URI=" + https://releases.wildfiregames.com/rc/${MY_P}-unix-build.tar.xz + https://releases.wildfiregames.com/rc/${MY_P}-unix-data.tar.xz + verify-sig? ( + https://releases.wildfiregames.com/rc/${MY_P}-unix-build.tar.xz.minisig + https://releases.wildfiregames.com/rc/${MY_P}-unix-data.tar.xz.minisig + ) + " + S="${WORKDIR}/${MY_P/-rc*/}" +else + MY_P="0ad-${PV/_/-}" + SRC_URI=" + https://releases.wildfiregames.com/${MY_P}-unix-build.tar.xz + https://releases.wildfiregames.com/${MY_P}-unix-data.tar.xz + verify-sig? ( + https://releases.wildfiregames.com/${MY_P}-unix-build.tar.xz.minisig + https://releases.wildfiregames.com/${MY_P}-unix-data.tar.xz.minisig + ) + " + S="${WORKDIR}/${MY_P}" +fi +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +IUSE="editor +lobby nvtt pch test" + +RESTRICT="!test? ( test )" +CHECKREQS_DISK_BUILD="4000M" # 3842680 KiB (3.6 GiB) for alpha 27 +CHECKREQS_DISK_USR="3500M" # 3452564 KiB (3.2 GiB) + +BDEPEND=" + >=dev-util/premake-5.0.0_alpha12:5 + +Date: Sat, 18 Oct 2025 19:57:09 +0200 +Subject: [PATCH] Fix building against boost >=1.89 + +In boost-1.89 boost_system is a header-only library [1]. + +[1] https://github.com/boostorg/system/commit/7a495bb46d7ccd808e4be2a6589260839b0fd3a3 + +Fixes: #8471 +Signed-off-by: Ralph Sennhauser +--- + build/premake/extern_libs5.lua | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/build/premake/extern_libs5.lua b/build/premake/extern_libs5.lua +index 4f51c2c0ed..dc53bc7772 100644 +--- a/build/premake/extern_libs5.lua ++++ b/build/premake/extern_libs5.lua +@@ -235,7 +235,17 @@ extern_lib_defs = { + -- The following are not strictly link dependencies on all systems, but + -- are included for compatibility with different versions of Boost + android_names = { "boost_filesystem-gcc-mt", "boost_system-gcc-mt" }, +- unix_names = { os.findlib("boost_filesystem-mt") and "boost_filesystem-mt" or "boost_filesystem", os.findlib("boost_system-mt") and "boost_system-mt" or "boost_system" }, ++ unix_names = { ++ os.findlib("boost_filesystem-mt") and "boost_filesystem-mt" or "boost_filesystem", ++ -- boost_system is header-only in boost >=1.89 ++ (function() ++ if os.findlib("boost_system-mt") then ++ return "boost_system-mt" ++ elseif os.findlib("boost_system-mt") then ++ return "boost_system" ++ end ++ end)() ++ }, + osx_names = { "boost_filesystem", "boost_system" }, + }) + end, +-- +2.51.0 +