aboutsummaryrefslogtreecommitdiff
path: root/games/0ad
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2015-10-24 07:12:13 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2015-10-24 07:12:13 +0000
commit66478f68669e2521008e4c39de77a05e8d3b81fc (patch)
treee472789884e17cff54ccf10733a9b98a5647b98f /games/0ad
parent1e9abb7f8ed51ddccc3281604d9706f1643cfbdc (diff)
downloadports-66478f68669e2521008e4c39de77a05e8d3b81fc.tar.gz
ports-66478f68669e2521008e4c39de77a05e8d3b81fc.zip
Import change from upstream to fix build after net/miniupnp update. [1]
While here also mark BROKEN on 9.x, due to gcc crashing during the build. PR: 203983 [1] Submitted by: monwarez at mailoo.org
Notes
Notes: svn path=/head/; revision=400109
Diffstat (limited to 'games/0ad')
-rw-r--r--games/0ad/Makefile6
-rw-r--r--games/0ad/files/patch-source_network_NetServer.cpp19
2 files changed, 24 insertions, 1 deletions
diff --git a/games/0ad/Makefile b/games/0ad/Makefile
index e75ccbf325fc..d63bf7240d5b 100644
--- a/games/0ad/Makefile
+++ b/games/0ad/Makefile
@@ -2,7 +2,7 @@
PORTNAME= 0ad
PORTVERSION= 0.0.18
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= games
MASTER_SITES= SF/zero-ad/releases
DISTFILES= ${PORTNAME}-${PORTVERSION}-alpha-unix-build.tar.xz \
@@ -46,6 +46,10 @@ PORTDATA= *
.include <bsd.port.pre.mk>
+.if ${OSVERSION} < 1000024
+BROKEN= segfaults during build
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
-e 's|%%CC%%|${CC}|' \
diff --git a/games/0ad/files/patch-source_network_NetServer.cpp b/games/0ad/files/patch-source_network_NetServer.cpp
new file mode 100644
index 000000000000..0bd7687bd6cb
--- /dev/null
+++ b/games/0ad/files/patch-source_network_NetServer.cpp
@@ -0,0 +1,19 @@
+--- source/network/NetServer.cpp.orig 2015-01-24 14:46:52 UTC
++++ source/network/NetServer.cpp
+@@ -228,6 +228,7 @@ void* CNetServerWorker::SetupUPnP(void*)
+
+ int ret = 0;
+ bool allocatedUrls = false;
++ int error = 0; // Set this for upnpDiscover
+
+ // Try a cached URL first
+ if (!rootDescURL.empty() && UPNP_GetIGDFromUrl(rootDescURL.c_str(), &urls, &data, internalIPAddress, sizeof(internalIPAddress)))
+@@ -236,7 +237,7 @@ void* CNetServerWorker::SetupUPnP(void*)
+ ret = 1;
+ }
+ // No cached URL, or it did not respond. Try getting a valid UPnP device for 10 seconds.
+- else if ((devlist = upnpDiscover(10000, 0, 0, 0, 0, 0)) != NULL)
++ else if ((devlist = upnpDiscover(10000, 0, 0, 0, 0, 0,&error)) != NULL)
+ {
+ ret = UPNP_GetValidIGD(devlist, &urls, &data, internalIPAddress, sizeof(internalIPAddress));
+ allocatedUrls = ret != 0; // urls is allocated on non-zero return values