[arch-commits] Commit in megaglest/trunk (PKGBUILD miniupnpc14.patch)
Evangelos Foutras
foutrelis at archlinux.org
Mon Sep 28 15:48:48 UTC 2015
Date: Monday, September 28, 2015 @ 17:48:48
Author: foutrelis
Revision: 142083
upgpkg: megaglest 3.11.1-2
miniupnpc 1.9.20150730 rebuild.
Added:
megaglest/trunk/miniupnpc14.patch
Modified:
megaglest/trunk/PKGBUILD
-------------------+
PKGBUILD | 13 ++++++++++---
miniupnpc14.patch | 22 ++++++++++++++++++++++
2 files changed, 32 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-09-28 15:47:33 UTC (rev 142082)
+++ PKGBUILD 2015-09-28 15:48:48 UTC (rev 142083)
@@ -4,7 +4,7 @@
pkgname=megaglest
pkgver=3.11.1
-pkgrel=1
+pkgrel=2
pkgdesc="Fork of Glest, a 3D real-time strategy game in a fantastic world"
arch=('i686' 'x86_64')
url="http://sourceforge.net/projects/megaglest/"
@@ -12,9 +12,16 @@
depends=('curl' 'megaglest-data' 'xerces-c' 'sdl' 'libvorbis' 'openal' 'libgl' 'lua51' 'icu' 'ftgl' 'glew'
'libircclient' 'miniupnpc' 'wxgtk2.8' 'glu' 'libx11')
makedepends=('ftjam' 'cmake' 'mesa' 'git')
-source=("git+https://github.com/MegaGlest/megaglest-source.git#tag=${pkgver}")
-md5sums=('SKIP')
+source=("git+https://github.com/MegaGlest/megaglest-source.git#tag=${pkgver}"
+ "miniupnpc14.patch")
+md5sums=('SKIP'
+ '9774a0ab4daa635d3ea7bb6d3ec9834c')
+prepare() {
+ cd megaglest-source
+ patch -Np1 -i ../miniupnpc14.patch
+}
+
build() {
cd megaglest-source
Added: miniupnpc14.patch
===================================================================
--- miniupnpc14.patch (rev 0)
+++ miniupnpc14.patch 2015-09-28 15:48:48 UTC (rev 142083)
@@ -0,0 +1,22 @@
+diff --git a/source/shared_lib/sources/platform/posix/socket.cpp b/source/shared_lib/sources/platform/posix/socket.cpp
+index a5d4b92..4cac74f 100644
+--- a/source/shared_lib/sources/platform/posix/socket.cpp
++++ b/source/shared_lib/sources/platform/posix/socket.cpp
+@@ -2563,10 +2563,17 @@ int UPNP_Tools::upnp_init(void *param) {
+ const char *upnp_minissdpdsock = NULL;
+ int upnp_sameport = 0;
+ int upnp_ipv6 = 0;
++#if defined(MINIUPNPC_API_VERSION) && MINIUPNPC_API_VERSION >= 14
++ unsigned char upnp_ttl = 2;
++#endif
+ int upnp_error = 0;
+
+ #ifndef MINIUPNPC_VERSION_PRE1_6
++# if defined(MINIUPNPC_API_VERSION) && MINIUPNPC_API_VERSION >= 14
++ devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport, upnp_ipv6, upnp_ttl, &upnp_error);
++# else
+ devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport, upnp_ipv6, &upnp_error);
++# endif
+
+ 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);
More information about the arch-commits
mailing list