summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games-strategy/0ad/0ad-0.0.18_alpha-r2.ebuild3
-rw-r--r--games-strategy/0ad/files/0ad-0.0.18_alpha-miniupnpc14.patch14
2 files changed, 16 insertions, 1 deletions
diff --git a/games-strategy/0ad/0ad-0.0.18_alpha-r2.ebuild b/games-strategy/0ad/0ad-0.0.18_alpha-r2.ebuild
index e9c57bd4d164..654bb3d17f96 100644
--- a/games-strategy/0ad/0ad-0.0.18_alpha-r2.ebuild
+++ b/games-strategy/0ad/0ad-0.0.18_alpha-r2.ebuild
@@ -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
index 000000000000..ff46685cd3bf
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.18_alpha-miniupnpc14.patch
@@ -0,0 +1,14 @@
+Index: ps/trunk/source/network/NetServer.cpp
+===================================================================
+--- ps/trunk/source/network/NetServer.cpp (revision 17090)
++++ ps/trunk/source/network/NetServer.cpp (revision 17091)
+@@ -237,5 +237,9 @@
+ }
+ // No cached URL, or it did not respond. Try getting a valid UPnP device for 10 seconds.
++#if defined(MINIUPNPC_API_VERSION) && MINIUPNPC_API_VERSION >= 14
++ else if ((devlist = upnpDiscover(10000, 0, 0, 0, 0, 2, 0)) != NULL)
++#else
+ else if ((devlist = upnpDiscover(10000, 0, 0, 0, 0, 0)) != NULL)
++#endif
+ {
+ ret = UPNP_GetValidIGD(devlist, &urls, &data, internalIPAddress, sizeof(internalIPAddress));