[arch-commits] Commit in 0ad/trunk (PKGBUILD miniupnpc14.patch)

Evangelos Foutras foutrelis at archlinux.org
Mon Sep 28 15:47:23 UTC 2015


    Date: Monday, September 28, 2015 @ 17:47:23
  Author: foutrelis
Revision: 142081

upgpkg: 0ad a18-5

miniupnpc 1.9.20150730 rebuild.

Added:
  0ad/trunk/miniupnpc14.patch
Modified:
  0ad/trunk/PKGBUILD

-------------------+
 PKGBUILD          |    5 ++++-
 miniupnpc14.patch |   15 +++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-09-28 15:44:35 UTC (rev 142080)
+++ PKGBUILD	2015-09-28 15:47:23 UTC (rev 142081)
@@ -5,7 +5,7 @@
 pkgname=0ad
 pkgver=a18
 _pkgver=0.0.18-alpha
-pkgrel=4
+pkgrel=5
 pkgdesc="Cross-platform, 3D and historically-based real-time strategy game"
 arch=('i686' 'x86_64')
 url="http://play0ad.com/"
@@ -15,13 +15,16 @@
          'gloox' 'miniupnpc' 'icu' 'nspr')
 makedepends=('boost' 'cmake' 'mesa' 'zip' 'python2' 'libsm')
 source=("https://sourceforge.net/projects/zero-ad/files/releases/$pkgname-$_pkgver-unix-build.tar.xz"
+        "miniupnpc14.patch"
         "9f24795fa4935aa1adcdea8c1008541011b3964f.patch")
 md5sums=('84aedae3ab86955f87c55607600daa12'
+         'a0d8ea2026b51a41af4f17ef89f89630'
          'dd14fef832a4eded98bbdd87cba00f8f')
 
 prepare() {
   cd "$srcdir/$pkgname-$_pkgver/"
   sed -i "s/env python/env python2/g" libraries/source/cxxtest-4.4/bin/cxxtestgen
+  patch -Np1 < $srcdir/miniupnpc14.patch
   patch -Np1 < $srcdir/9f24795fa4935aa1adcdea8c1008541011b3964f.patch
 }
 

Added: miniupnpc14.patch
===================================================================
--- miniupnpc14.patch	                        (rev 0)
+++ miniupnpc14.patch	2015-09-28 15:47:23 UTC (rev 142081)
@@ -0,0 +1,15 @@
+diff -uprb 0ad-0.0.18-alpha.orig/source/network/NetServer.cpp 0ad-0.0.18-alpha/source/network/NetServer.cpp
+--- 0ad-0.0.18-alpha.orig/source/network/NetServer.cpp	2015-01-24 16:46:52.000000000 +0200
++++ 0ad-0.0.18-alpha/source/network/NetServer.cpp	2015-09-28 18:19:09.433132021 +0300
+@@ -236,7 +236,11 @@ void* CNetServerWorker::SetupUPnP(void*)
+ 		ret = 1;
+ 	}
+ 	// 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));
+ 		allocatedUrls = ret != 0; // urls is allocated on non-zero return values



More information about the arch-commits mailing list