From c604ee44c95cab54ca821935fb843e1633d293a5 Mon Sep 17 00:00:00 2001 From: Tim Sviridov Date: Thu, 4 Sep 2025 17:29:23 +1000 Subject: [PATCH] games-strategy/7k-ambition: Fix desync with other releases The Ambition releases were built with gcc 12 and the 7kfans releases are (presumably still) built with gcc 11. In gcc 14, the default for -fexcess-precision changed from fast to standard, which results in slightly different floating point results and causes multiplayer desyncs. Until this is fixed in upstream, we can set the flag in the ebuild. Signed-off-by: Tim Sviridov --- .../7k-ambition/7k-ambition-3.2.4-r1.ebuild | 81 +++++++++++++++++++ .../7k-ambition/7k-ambition-9999.ebuild | 4 +- 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 games-strategy/7k-ambition/7k-ambition-3.2.4-r1.ebuild diff --git a/games-strategy/7k-ambition/7k-ambition-3.2.4-r1.ebuild b/games-strategy/7k-ambition/7k-ambition-3.2.4-r1.ebuild new file mode 100644 index 0000000000..c23bfa7e4c --- /dev/null +++ b/games-strategy/7k-ambition/7k-ambition-3.2.4-r1.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools desktop flag-o-matic toolchain-funcs xdg + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://git.code.sf.net/p/seven-kingdoms-ambition/code" + EGIT_BRANCH="next" +else + SRC_URI="https://github.com/Infiltrator/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +DESCRIPTION="Seven Kingdoms: Ambition" +HOMEPAGE="https://seven-kingdoms-ambition.sourceforge.io/" +SRC_URI+=" https://sourceforge.net/projects/seven-kingdoms-ambition/files/${PN}.png/download -> ${PN}.png + music? ( https://www.7kfans.com/downloads/7kaa-music-2.15.tar.bz2 ) +" + +LICENSE="GPL-2 + music? ( 7k-music )" +SLOT="0" +IUSE="+nls +multiplayer +music" +RESTRICT="music? ( bindist ) mirror" + +DEPEND=" + dev-libs/boost:= + nls? ( <=sys-devel/gettext-0.22.5-r2 ) + multiplayer? ( + net-libs/enet:1.3= + net-misc/curl:= + ) + media-libs/libsdl2[X,video] + media-libs/openal:= +" +RDEPEND="${DEPEND}" + +src_unpack() { + if [[ ${PV} == *9999* ]]; then + git-r3_src_unpack + fi + + default +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + local myeconfargs=( + $(use_enable nls) + $(use_enable multiplayer) + ) + + append-cxxflags -fexcess-precision=fast + econf "${myeconfargs[@]}" +} + +src_compile() { + emake AR="$(tc-getAR)" +} + +src_install() { + default + + if use music ; then + insinto "usr/share/${PN}/" + doins -r "${WORKDIR}/7kaa-music/MUSIC" + + dodoc "${WORKDIR}/7kaa-music/README-Music.txt" "${WORKDIR}/7kaa-music/COPYING-Music.txt" + fi + + doicon "${DISTDIR}/${PN}.png" + + make_desktop_entry ${PN} "Seven Kingdoms: Ambition" /usr/share/pixmaps/${PN}.png Game +} diff --git a/games-strategy/7k-ambition/7k-ambition-9999.ebuild b/games-strategy/7k-ambition/7k-ambition-9999.ebuild index dd3b6c6a98..c23bfa7e4c 100644 --- a/games-strategy/7k-ambition/7k-ambition-9999.ebuild +++ b/games-strategy/7k-ambition/7k-ambition-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit autotools desktop toolchain-funcs xdg +inherit autotools desktop flag-o-matic toolchain-funcs xdg if [[ ${PV} == *9999* ]]; then inherit git-r3 @@ -56,6 +56,8 @@ src_configure() { $(use_enable nls) $(use_enable multiplayer) ) + + append-cxxflags -fexcess-precision=fast econf "${myeconfargs[@]}" }