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 <Arfrever@Apache.Org>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Arfrever Frehtes Taifersar Arahesis
2020-11-22 00:00:00 +00:00
committed by Sam James
parent 47710339f0
commit 616ad41e4e
3 changed files with 21 additions and 9 deletions

View File

@@ -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

View File

@@ -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() {

View File

@@ -432,12 +432,6 @@ gnome-base/orbit
# Removal in 30 days. Bug #635592.
games-strategy/asc
# Michał Górny <mgorny@gentoo.org> (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 <reavertm@gentoo.org> (2020-10-23)
# Crashes at startup - bug #750770, dead upstream - bug #737936
# Removal in 30 days.