games-strategy/0ad: Added an upstream patch for new miniupnpc API.
authorLars Wendler <polynomial-c@gentoo.org>
Fri, 2 Oct 2015 07:44:43 +0000 (09:44 +0200)
committerLars Wendler <polynomial-c@gentoo.org>
Fri, 2 Oct 2015 07:50:56 +0000 (09:50 +0200)
Package-Manager: portage-2.2.22
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
games-strategy/0ad/0ad-0.0.18_alpha-r2.ebuild
games-strategy/0ad/files/0ad-0.0.18_alpha-miniupnpc14.patch [new file with mode: 0644]

index e9c57bd4d1640420a4eec2e3eb157bde8db9119b..654bb3d17f96a90b60a54da29c7f597132d1afde 100644 (file)
@@ -31,7 +31,7 @@ RDEPEND="
        media-libs/libpng:0
        media-libs/libsdl2[X,opengl,video]
        net-libs/enet:1.3
-       net-libs/miniupnpc
+       net-libs/miniupnpc:=
        net-misc/curl
        sys-libs/zlib
        virtual/jpeg:62
@@ -57,6 +57,7 @@ pkg_setup() {
 
 src_prepare() {
        epatch "${FILESDIR}"/${P}-gentoo.patch
+       epatch "${FILESDIR}"/${P}-miniupnpc14.patch
 }
 
 src_configure() {
diff --git a/games-strategy/0ad/files/0ad-0.0.18_alpha-miniupnpc14.patch b/games-strategy/0ad/files/0ad-0.0.18_alpha-miniupnpc14.patch
new file mode 100644 (file)
index 0000000..ff46685
--- /dev/null
@@ -0,0 +1,14 @@
+Index: ps/trunk/source/network/NetServer.cpp\r
+===================================================================\r
+--- ps/trunk/source/network/NetServer.cpp      (revision 17090)\r
++++ ps/trunk/source/network/NetServer.cpp      (revision 17091)\r
+@@ -237,5 +237,9 @@\r
+       }\r
+       // No cached URL, or it did not respond. Try getting a valid UPnP device for 10 seconds.\r
++#if defined(MINIUPNPC_API_VERSION) && MINIUPNPC_API_VERSION >= 14\r
++      else if ((devlist = upnpDiscover(10000, 0, 0, 0, 0, 2, 0)) != NULL)\r
++#else\r
+       else if ((devlist = upnpDiscover(10000, 0, 0, 0, 0, 0)) != NULL)\r
++#endif\r
+       {\r
+               ret = UPNP_GetValidIGD(devlist, &urls, &data, internalIPAddress, sizeof(internalIPAddress));\r