From 74e526c590f52d24a213e25f77858ae0b34ec2c8 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 17 Jun 2024 00:09:46 +0100 Subject: gentoo auto-resync : 17:06:2024 - 00:09:46 --- games-strategy/s25rttr/Manifest | 3 +- .../s25rttr/files/s25rttr-0.9.5-miniupnpc.patch | 34 ++++++ games-strategy/s25rttr/s25rttr-0.9.5-r1.ebuild | 115 +++++++++++++++++++++ games-strategy/s25rttr/s25rttr-0.9.5.ebuild | 113 -------------------- 4 files changed, 151 insertions(+), 114 deletions(-) create mode 100644 games-strategy/s25rttr/files/s25rttr-0.9.5-miniupnpc.patch create mode 100644 games-strategy/s25rttr/s25rttr-0.9.5-r1.ebuild delete mode 100644 games-strategy/s25rttr/s25rttr-0.9.5.ebuild (limited to 'games-strategy/s25rttr') diff --git a/games-strategy/s25rttr/Manifest b/games-strategy/s25rttr/Manifest index 8f27c96aac11..81b718bd5a6d 100644 --- a/games-strategy/s25rttr/Manifest +++ b/games-strategy/s25rttr/Manifest @@ -1,6 +1,7 @@ AUX s25rttr-0.9.0_pre20200723-cmake_lua_version.patch 296 BLAKE2B cabdc87d6184e59f0896762f3d3434a137fed4fd1c2dae84d30dbee5d4903e68ba01c30b92d0d5290dec9b371807c317b462213a421cadd172b78b08407f66aa SHA512 074ac3e70fec0da6bd4a9602052989a8b6c26b5cfef669d6330d9177547bbeeeef2a4e6b9d83a9e9cbdf4ec33df7dcce50a862e3c9e533049ad8452df6073816 AUX s25rttr-0.9.5-boost.patch 2155 BLAKE2B 75dd2cfb5cb4775c76033996fada2f7577f228855eca4469a3360941f337b6b05bccd65cb734e9ec02be4b7c84839570edab1480cfdb455eef5165edb4adb804 SHA512 baab52badfd10f3ff106c1303382ba320eb2ed655cdf564b8c1b1e1a21e5502258e3b770b855d4acd18e56b609e495b2e9ce1793743fd6a42d5bc69c81806091 AUX s25rttr-0.9.5-gcc-13.patch 1527 BLAKE2B 23399f2a2d0e350d990a122195a2fbb6ece1f010ad31c7da24c3b7a4356f7cadf793149e40748c98d958ef5a3d0e401e8caeacc4b8872f66e148688e8caca9c5 SHA512 6208a550524d3a3364718a5aaa7b69205c48903394635f03339173920c2481ecd014b4f5e847ba5390a060100c848f7ebd48bd038ea99f9e17a9b72508f10799 +AUX s25rttr-0.9.5-miniupnpc.patch 1468 BLAKE2B 7c6987c3c607a89b165f719cf881ec68f1d2bde1e882624bbd7e6a3a85ec7758daaf862a5ba9b578b78df6ab02dfe69a00ae67f85631c9f754bf3992c6726407 SHA512 4991260fec453a8bfda0b73a5866b7a6916367185be36f7066e9015f78685e5904091babe10f403890a0eed071a98f799ac92c264bea4c4c16fe1d8954ec6655 DIST s25client_src_v0.9.5.tar.gz 30305585 BLAKE2B 77857743b5a1693ed373cb048c40fed150a4bf3d59f1314ffbb268f3e03ba8db2f44c20962c390f3a8c5b5b443ee0465d5c7bf726998ddf0334a861304211db8 SHA512 4926653075c7ba01e1e4ca516c52ad1694b46557c40c418e2a1f18d0a8fac9d4b73c20adc5403365ad6ba643823ed23dff5296717b3e057c42b17f1c20feb802 -EBUILD s25rttr-0.9.5.ebuild 2713 BLAKE2B e96d000ae6b5a43233d71c4c667d80a6718fa86be07188876893b8b3198752d5c7ed1229e09dc99191402bfa4d4a671cfff9b43f84ca11e031dafce5fffc0d22 SHA512 594a0978fcf94c571e11dc8413a706d99b105cc40feddcc6683d20895d2ccdb577ccb190ddcda194a20de4956290ac3526bea3accaaff8cff2d15e44671734d4 +EBUILD s25rttr-0.9.5-r1.ebuild 2760 BLAKE2B df23b14e92c6259cb2b2ac6f803ea05cab33a1b0795ab16d1fadfcbfd98115e4052801d26f0e29a8e30db3b397fbb57e98a02f93071efa216479e4eb5aee5949 SHA512 970d9f3552a15d667b5510e8f0288198c949e54e125d8170fd050cbc2a01c120f13cb5dde4d85851645cd72c2f6609539f9732462add5d5fb48836efde0ad941 MISC metadata.xml 348 BLAKE2B bc23c51bcd3458b4f39a6b42dd73f35060319cdae4563a4288ef2ae9dc9e2a85e8bc4b357dff37d70f20abf5d79a4a5c20fb1a8c2ab4c994dd3290ea18d49c34 SHA512 c145a48fb294eb11195885f0cd97095c7258d3286bf1cd926b5d40682aea1767c52a5a163283345fe12416659a9c7500de58993379b0ba3c743f18e172696c6f diff --git a/games-strategy/s25rttr/files/s25rttr-0.9.5-miniupnpc.patch b/games-strategy/s25rttr/files/s25rttr-0.9.5-miniupnpc.patch new file mode 100644 index 000000000000..e09c258e2b41 --- /dev/null +++ b/games-strategy/s25rttr/files/s25rttr-0.9.5-miniupnpc.patch @@ -0,0 +1,34 @@ +From c7b6e56337cbb03d9ed3aa601cb6e79e7858249a Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Sun, 16 Jun 2024 21:22:08 +0100 +Subject: [PATCH] Support miniupnpc API version 18 (release 2.2.8) and adjust + status check + +getValidIGD was treating non-zero return codes as successful, but only 1 +should really be considered successful in this context. + +This maintains compatibility with earlier versions. +--- + libs/network/src/UPnP_Other.cpp | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/external/libutil/libs/network/src/UPnP_Other.cpp b/libs/network/src/UPnP_Other.cpp +index d684b9c..8fc9418 100644 +--- a/external/libutil/libs/network/src/UPnP_Other.cpp ++++ b/external/libutil/libs/network/src/UPnP_Other.cpp +@@ -91,7 +91,11 @@ inline DeviceList discover(int delay, const char* multicastIf = nullptr, const c + inline bool getValidIGD(const DeviceList& deviceList, Urls& urls, IGDdatas& data, std::string& lanAddr) + { + lanAddr.resize(15); // Format: aaa.bbb.ccc.ddd +- return UPNP_GetValidIGD(deviceList, &urls, &data, &lanAddr[0], lanAddr.size()) != 0; ++#if (MINIUPNPC_API_VERSION >= 18) ++ return UPNP_GetValidIGD(deviceList, &urls, &data, &lanAddr[0], lanAddr.size(), NULL, 0) == 1; ++#else ++ return UPNP_GetValidIGD(deviceList, &urls, &data, &lanAddr[0], lanAddr.size()) == 1; ++#endif + } + + inline void addPortMapping(const char* controlURL, const char* servicetype, const std::string& extPort, +-- +2.45.1 + diff --git a/games-strategy/s25rttr/s25rttr-0.9.5-r1.ebuild b/games-strategy/s25rttr/s25rttr-0.9.5-r1.ebuild new file mode 100644 index 000000000000..439ea5525533 --- /dev/null +++ b/games-strategy/s25rttr/s25rttr-0.9.5-r1.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-3 ) + +inherit desktop flag-o-matic lua-single toolchain-funcs xdg cmake + +MY_PN="s25client" +DESCRIPTION="Open source remake of The Settlers II: Gold Edition (needs original data files)" +HOMEPAGE="https://www.siedler25.org/" +SRC_URI="https://github.com/Return-To-The-Roots/${MY_PN}/releases/download/v${PV}/${MY_PN}_src_v${PV}.tar.gz" +S="${WORKDIR}/${MY_PN}_v${PV}" +LICENSE="GPL-2+ GPL-3 Boost-1.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" +REQUIRED_USE="${LUA_REQUIRED_USE}" + +RDEPEND=" + ${LUA_DEPS} + app-arch/bzip2 + dev-libs/boost:=[nls] + >=media-libs/libsamplerate-0.1.9 + >=media-libs/libsdl2-2.0.10-r2[opengl,sound,video] + media-libs/libsndfile + media-libs/sdl2-mixer[vorbis,wav] + net-libs/miniupnpc:= + virtual/opengl +" + +DEPEND=" + ${RDEPEND} + test? ( >=sys-devel/clang-5 ) +" + +BDEPEND=" + sys-devel/gettext + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-0.9.0_pre20200723-cmake_lua_version.patch + "${FILESDIR}"/${PN}-0.9.5-gcc-13.patch + "${FILESDIR}"/${PN}-0.9.5-boost.patch + "${FILESDIR}"/${PN}-0.9.5-miniupnpc.patch +) + +# Build type is checked but blank is valid. +CMAKE_BUILD_TYPE= + +src_prepare() { + cmake_src_prepare + rm -v external/{kaguya,libutil}/cmake/FindLua.cmake || die +} + +src_configure() { + if [[ -f revision.txt ]]; then + local RTTR_REVISION="$(< revision.txt)" + elif [[ -n ${COMMIT} ]]; then + local RTTR_REVISION="${COMMIT}" + else + die "Could not determine RTTR_REVISION." + fi + + local mycmakeargs=( + -DBUILD_TESTING=$(usex test) + -DCCACHE_PROGRAM=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_ClangFormat=ON + -DCMAKE_SKIP_RPATH=ON + -DLUA_VERSION=$(lua_get_version) + -DRTTR_BUILD_UPDATER=OFF + -DRTTR_ENABLE_OPTIMIZATIONS=OFF + -DRTTR_ENABLE_SANITIZERS=$(usex test) + -DRTTR_ENABLE_WERROR=OFF + -DRTTR_INCLUDE_DEVTOOLS=OFF + -DRTTR_LIBDIR="$(get_libdir)" + -DRTTR_REVISION="${RTTR_REVISION}" + -DRTTR_USE_SYSTEM_LIBS=ON + -DRTTR_VERSION="${PV##*_pre}" # Tests expect a date for snapshots. + ) + + if use test && tc-is-gcc; then + # Work around libasan and libsandbox both wanting to be first. + append-ldflags -static-libasan + fi + + cmake_src_configure +} + +src_test() { + SDL_AUDIODRIVER=dummy \ + SDL_VIDEODRIVER=dummy \ + USER=$(whoami) \ + cmake_src_test +} + +src_install() { + cmake_src_install + + doicon -s 64 tools/release/debian/s25rttr.png + make_desktop_entry "${MY_PN}" "Return to the Roots" +} + +pkg_postinst() { + xdg_pkg_postinst + + if ! has_version -r games-strategy/settlers-2-gold-data; then + elog "Install games-strategy/settlers-2-gold-data or manually copy the DATA" + elog "and GFX directories from original data files into" + elog "${EPREFIX}/usr/share/${PN}/S2." + fi +} diff --git a/games-strategy/s25rttr/s25rttr-0.9.5.ebuild b/games-strategy/s25rttr/s25rttr-0.9.5.ebuild deleted file mode 100644 index 1184da066c3a..000000000000 --- a/games-strategy/s25rttr/s25rttr-0.9.5.ebuild +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -LUA_COMPAT=( lua5-3 ) - -inherit desktop flag-o-matic lua-single toolchain-funcs xdg cmake - -MY_PN="s25client" -DESCRIPTION="Open source remake of The Settlers II: Gold Edition (needs original data files)" -HOMEPAGE="https://www.siedler25.org/" -SRC_URI="https://github.com/Return-To-The-Roots/${MY_PN}/releases/download/v${PV}/${MY_PN}_src_v${PV}.tar.gz" -S="${WORKDIR}/${MY_PN}_v${PV}" -LICENSE="GPL-2+ GPL-3 Boost-1.0" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" -IUSE="test" -RESTRICT="!test? ( test )" -REQUIRED_USE="${LUA_REQUIRED_USE}" - -RDEPEND="${LUA_DEPS} - app-arch/bzip2 - dev-libs/boost:=[nls] - >=media-libs/libsamplerate-0.1.9 - >=media-libs/libsdl2-2.0.10-r2[opengl,sound,video] - media-libs/libsndfile - media-libs/sdl2-mixer[vorbis,wav] - net-libs/miniupnpc - virtual/opengl -" - -DEPEND=" - ${RDEPEND} - test? ( >=sys-devel/clang-5 ) -" - -BDEPEND=" - sys-devel/gettext - virtual/pkgconfig -" - -PATCHES=( - "${FILESDIR}"/${PN}-0.9.0_pre20200723-cmake_lua_version.patch - "${FILESDIR}"/${PN}-0.9.5-gcc-13.patch - "${FILESDIR}"/${PN}-0.9.5-boost.patch -) - -# Build type is checked but blank is valid. -CMAKE_BUILD_TYPE= - -src_prepare() { - cmake_src_prepare - rm -v external/{kaguya,libutil}/cmake/FindLua.cmake || die -} - -src_configure() { - if [[ -f revision.txt ]]; then - local RTTR_REVISION="$(< revision.txt)" - elif [[ -n ${COMMIT} ]]; then - local RTTR_REVISION="${COMMIT}" - else - die "Could not determine RTTR_REVISION." - fi - - local mycmakeargs=( - -DBUILD_TESTING=$(usex test) - -DCCACHE_PROGRAM=OFF - -DCMAKE_DISABLE_FIND_PACKAGE_ClangFormat=ON - -DCMAKE_SKIP_RPATH=ON - -DLUA_VERSION=$(lua_get_version) - -DRTTR_BUILD_UPDATER=OFF - -DRTTR_ENABLE_OPTIMIZATIONS=OFF - -DRTTR_ENABLE_SANITIZERS=$(usex test) - -DRTTR_ENABLE_WERROR=OFF - -DRTTR_INCLUDE_DEVTOOLS=OFF - -DRTTR_LIBDIR="$(get_libdir)" - -DRTTR_REVISION="${RTTR_REVISION}" - -DRTTR_USE_SYSTEM_LIBS=ON - -DRTTR_VERSION="${PV##*_pre}" # Tests expect a date for snapshots. - ) - - if use test && tc-is-gcc; then - # Work around libasan and libsandbox both wanting to be first. - append-ldflags -static-libasan - fi - - cmake_src_configure -} - -src_test() { - SDL_AUDIODRIVER=dummy \ - SDL_VIDEODRIVER=dummy \ - USER=$(whoami) \ - cmake_src_test -} - -src_install() { - cmake_src_install - - doicon -s 64 tools/release/debian/s25rttr.png - make_desktop_entry "${MY_PN}" "Return to the Roots" -} - -pkg_postinst() { - xdg_pkg_postinst - - if ! has_version -r games-strategy/settlers-2-gold-data; then - elog "Install games-strategy/settlers-2-gold-data or manually copy the DATA" - elog "and GFX directories from original data files into" - elog "${EPREFIX}/usr/share/${PN}/S2." - fi -} -- cgit v1.2.3