From 616ad41e4e84cb84fb6a4d888594d5a4c93cacbc Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sun, 22 Nov 2020 00:00:00 +0000 Subject: [PATCH] games-strategy/megaglest: Fix building with >=net-libs/miniupnpc-1.9.20160209. Closes: https://bugs.gentoo.org/614408 Signed-off-by: Arfrever Frehtes Taifersar Arahesis Signed-off-by: Sam James --- ...aglest-3.11.1-miniupnpc-api-version-16.patch | 17 +++++++++++++++++ .../megaglest/megaglest-3.11.1-r1.ebuild | 7 ++++--- profiles/package.mask | 6 ------ 3 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 games-strategy/megaglest/files/megaglest-3.11.1-miniupnpc-api-version-16.patch diff --git a/games-strategy/megaglest/files/megaglest-3.11.1-miniupnpc-api-version-16.patch b/games-strategy/megaglest/files/megaglest-3.11.1-miniupnpc-api-version-16.patch new file mode 100644 index 0000000000000..a793c122b2109 --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.11.1-miniupnpc-api-version-16.patch @@ -0,0 +1,17 @@ +https://github.com/MegaGlest/megaglest-source/commit/a85d12aed1983eb69d630b431b81ae656d83b3ac + +--- /source/shared_lib/sources/platform/posix/socket.cpp ++++ /source/shared_lib/sources/platform/posix/socket.cpp +@@ -2610,8 +2610,10 @@ + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("UPnP device found: %s %s\n", dev->descURL, dev->st); + + //printf("UPnP device found: [%s] [%s] lanaddr [%s]\n", dev->descURL, dev->st,lanaddr); +-#if (defined(MINIUPNPC_API_VERSION) && MINIUPNPC_API_VERSION >= 9) || (!defined(MINIUPNPC_VERSION_PRE1_7) && !defined(MINIUPNPC_VERSION_PRE1_6)) +- char *descXML = (char *)miniwget_getaddr(dev->descURL, &descXMLsize, lanaddr, (sizeof(lanaddr) / sizeof(lanaddr[0])),0); ++#if (defined(MINIUPNPC_API_VERSION) && MINIUPNPC_API_VERSION >= 16) ++ char *descXML = (char *)miniwget_getaddr(dev->descURL, &descXMLsize, lanaddr, (sizeof(lanaddr) / sizeof(lanaddr[0])), 0, NULL); ++#elif (defined(MINIUPNPC_API_VERSION) && MINIUPNPC_API_VERSION >= 9) || (!defined(MINIUPNPC_VERSION_PRE1_7) && !defined(MINIUPNPC_VERSION_PRE1_6)) ++ char *descXML = (char *)miniwget_getaddr(dev->descURL, &descXMLsize, lanaddr, (sizeof(lanaddr) / sizeof(lanaddr[0])), 0); + #else + char *descXML = (char *)miniwget_getaddr(dev->descURL, &descXMLsize, lanaddr, (sizeof(lanaddr) / sizeof(lanaddr[0]))); + #endif diff --git a/games-strategy/megaglest/megaglest-3.11.1-r1.ebuild b/games-strategy/megaglest/megaglest-3.11.1-r1.ebuild index ef99043c0a340..ca99c5450f14a 100644 --- a/games-strategy/megaglest/megaglest-3.11.1-r1.ebuild +++ b/games-strategy/megaglest/megaglest-3.11.1-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 2010-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # google-breakpad @@ -9,7 +9,7 @@ VIRTUALX_REQUIRED="manual" inherit eutils flag-o-matic cmake-utils virtualx wxwidgets gnome2-utils games DESCRIPTION="Cross-platform 3D realtime strategy game" -HOMEPAGE="http://www.megaglest.org/" +HOMEPAGE="https://megaglest.org/ https://github.com/MegaGlest/megaglest-source" SRC_URI="https://github.com/MegaGlest/megaglest-source/releases/download/${PV}/megaglest-source-${PV}.tar.xz" LICENSE="GPL-3 BitstreamVera" @@ -71,7 +71,8 @@ src_prepare() { epatch "${FILESDIR}"/${P}-static-build.patch \ "${FILESDIR}"/${P}-cmake.patch \ - "${FILESDIR}"/${P}-miniupnpc.patch + "${FILESDIR}"/${P}-miniupnpc.patch \ + "${FILESDIR}"/${P}-miniupnpc-api-version-16.patch } src_configure() { diff --git a/profiles/package.mask b/profiles/package.mask index 4b2155b256af2..194f29976ce97 100644 --- a/profiles/package.mask +++ b/profiles/package.mask @@ -432,12 +432,6 @@ gnome-base/orbit # Removal in 30 days. Bug #635592. games-strategy/asc -# Michał Górny (2020-10-23) -# Needs a dedicated maintainer. The current version fails to build. -# Needs a version bump. -# Removal in 30 days. Bug #614408. -games-strategy/megaglest - # Maciej Mrozowski (2020-10-23) # Crashes at startup - bug #750770, dead upstream - bug #737936 # Removal in 30 days.