diff options
author | Michael Sterrett <mr_bones_@gentoo.org> | 2015-10-04 20:44:52 -0400 |
---|---|---|
committer | Michael Sterrett <mr_bones_@gentoo.org> | 2015-10-04 20:47:23 -0400 |
commit | ca000adb5b3ed930e21f729a57f8ad0f0715280d (patch) | |
tree | 9147dedfde22ba21a5a266b7c03d2781ee13b414 /games-strategy | |
parent | games-util/pyfa: bump to 1.15.0 for Vanguard (diff) | |
download | gentoo-ca000adb5b3ed930e21f729a57f8ad0f0715280d.tar.gz gentoo-ca000adb5b3ed930e21f729a57f8ad0f0715280d.tar.bz2 gentoo-ca000adb5b3ed930e21f729a57f8ad0f0715280d.zip |
add patch from Sander Sweers to support building against newer miniupnpc (bug #562046)
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'games-strategy')
-rw-r--r-- | games-strategy/megaglest/files/megaglest-3.11.1-miniupnpc.patch | 21 | ||||
-rw-r--r-- | games-strategy/megaglest/megaglest-3.11.1.ebuild | 3 |
2 files changed, 23 insertions, 1 deletions
diff --git a/games-strategy/megaglest/files/megaglest-3.11.1-miniupnpc.patch b/games-strategy/megaglest/files/megaglest-3.11.1-miniupnpc.patch new file mode 100644 index 000000000000..112e734c6efb --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.11.1-miniupnpc.patch @@ -0,0 +1,21 @@ +diff --git a/source/shared_lib/sources/platform/posix/socket.cpp b/source/shared_lib/sources/platform/posix/socket.cpp +index a5d4b92..cb8ceb4 100644 +--- a/source/shared_lib/sources/platform/posix/socket.cpp ++++ b/source/shared_lib/sources/platform/posix/socket.cpp +@@ -2563,9 +2563,15 @@ int UPNP_Tools::upnp_init(void *param) { + const char *upnp_minissdpdsock = NULL; + int upnp_sameport = 0; + int upnp_ipv6 = 0; ++ unsigned char upnp_ttl = 2; + int upnp_error = 0; + +-#ifndef MINIUPNPC_VERSION_PRE1_6 ++#if (MINIUPNPC_API_VERSION >= 14) ++ devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport, upnp_ipv6, upnp_ttl, &upnp_error); ++ ++ if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"UPnP discover returned upnp_error = %d.\n",upnp_error); ++ if(SystemFlags::VERBOSE_MODE_ENABLED) printf("UPnP discover returned upnp_error = %d.\n",upnp_error); ++#elif (MINIUPNPC_API_VERSION >= 8) + devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport, upnp_ipv6, &upnp_error); + + if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"UPnP discover returned upnp_error = %d.\n",upnp_error); diff --git a/games-strategy/megaglest/megaglest-3.11.1.ebuild b/games-strategy/megaglest/megaglest-3.11.1.ebuild index 7776e566b51f..3c74a8d381b9 100644 --- a/games-strategy/megaglest/megaglest-3.11.1.ebuild +++ b/games-strategy/megaglest/megaglest-3.11.1.ebuild @@ -71,7 +71,8 @@ src_prepare() { fi epatch "${FILESDIR}"/${P}-static-build.patch \ - "${FILESDIR}"/${P}-cmake.patch + "${FILESDIR}"/${P}-cmake.patch \ + "${FILESDIR}"/${P}-miniupnpc.patch } src_configure() { |