[arch-commits] Commit in megaglest/trunk (3 files)

Antonio Rojas arojas at archlinux.org
Thu Aug 4 18:06:06 UTC 2016


    Date: Thursday, August 4, 2016 @ 18:06:06
  Author: arojas
Revision: 185080

GLEW 2.0 and miniupnpc 2.0 rebuild

Added:
  megaglest/trunk/megaglest-gcc6.patch
  megaglest/trunk/megaglest-miniupnpc2.patch
Modified:
  megaglest/trunk/PKGBUILD

----------------------------+
 PKGBUILD                   |   16 +++++++++++++---
 megaglest-gcc6.patch       |   13 +++++++++++++
 megaglest-miniupnpc2.patch |   14 ++++++++++++++
 3 files changed, 40 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-08-04 17:50:00 UTC (rev 185079)
+++ PKGBUILD	2016-08-04 18:06:06 UTC (rev 185080)
@@ -4,7 +4,7 @@
 
 pkgname=megaglest
 pkgver=3.12.0
-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,19 @@
 depends=('curl' 'megaglest-data' 'xerces-c' 'sdl2' 'libvorbis' 'openal' 'libgl' 'lua51' 'icu' 'ftgl' 'glew'
 'libircclient' 'miniupnpc' 'wxgtk' '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}" megaglest-gcc6.patch megaglest-miniupnpc2.patch)
+md5sums=('SKIP'
+         'da91416d9e8e7a2ec0dde379474ecf6a'
+         '98259043b47888d0f5e2308539c07057')
 
+prepare() {
+  cd megaglest-source
+  # Fix build with GCC 6 (Fedora)
+  patch -p1 -i ../megaglest-gcc6.patch
+  # Fix build with miniupnpc 2 (Fedora)
+  patch -p1 -i ../megaglest-miniupnpc2.patch
+}
+
 build() {
   cd megaglest-source
 

Added: megaglest-gcc6.patch
===================================================================
--- megaglest-gcc6.patch	                        (rev 0)
+++ megaglest-gcc6.patch	2016-08-04 18:06:06 UTC (rev 185080)
@@ -0,0 +1,13 @@
+diff -up megaglest-3.12.0/source/shared_lib/sources/platform/common/platform_common.cpp.orig megaglest-3.12.0/source/shared_lib/sources/platform/common/platform_common.cpp
+--- megaglest-3.12.0/source/shared_lib/sources/platform/common/platform_common.cpp.orig	2016-06-24 07:56:09.496569134 -0300
++++ megaglest-3.12.0/source/shared_lib/sources/platform/common/platform_common.cpp	2016-06-24 07:56:11.962569290 -0300
+@@ -124,8 +124,7 @@ tm threadsafe_localtime(const time_t &ti
+ // extracting std::time_t from std:chrono for "now"
+ time_t systemtime_now() {
+ #if __cplusplus > 199711L
+-	system_time_point system_now = std::chrono::system_clock::now();
+-	return std::chrono::system_clock::to_time_t(system_now);
++	return std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
+ #else
+ 	return time(NULL);
+ #endif

Added: megaglest-miniupnpc2.patch
===================================================================
--- megaglest-miniupnpc2.patch	                        (rev 0)
+++ megaglest-miniupnpc2.patch	2016-08-04 18:06:06 UTC (rev 185080)
@@ -0,0 +1,14 @@
+diff -up megaglest-3.12.0/source/shared_lib/sources/platform/posix/socket.cpp.orig megaglest-3.12.0/source/shared_lib/sources/platform/posix/socket.cpp
+--- megaglest-3.12.0/source/shared_lib/sources/platform/posix/socket.cpp.orig	2016-06-24 08:00:27.521585488 -0300
++++ megaglest-3.12.0/source/shared_lib/sources/platform/posix/socket.cpp	2016-06-24 08:00:43.947586530 -0300
+@@ -2631,7 +2631,9 @@ int UPNP_Tools::upnp_init(void *param) {
+ 				if(SystemFlags::VERBOSE_MODE_ENABLED) printf("UPnP device found: %s %s\n", dev->descURL, dev->st);
+ 
+ 				//printf("UPnP device found: [%s] [%s] lanaddr [%s]\n", dev->descURL, dev->st,lanaddr);
+-#if (defined(MINIUPNPC_API_VERSION)  && MINIUPNPC_API_VERSION >= 9) || (!defined(MINIUPNPC_VERSION_PRE1_7) && !defined(MINIUPNPC_VERSION_PRE1_6))
++#if (defined(MINIUPNPC_API_VERSION)  && MINIUPNPC_API_VERSION >= 16)
++				char *descXML = (char *)miniwget_getaddr(dev->descURL, &descXMLsize, lanaddr, (sizeof(lanaddr) / sizeof(lanaddr[0])), 0, NULL);
++#elif (defined(MINIUPNPC_API_VERSION)  && MINIUPNPC_API_VERSION >= 9) || (!defined(MINIUPNPC_VERSION_PRE1_7) && !defined(MINIUPNPC_VERSION_PRE1_6))
+ 				char *descXML = (char *)miniwget_getaddr(dev->descURL, &descXMLsize, lanaddr, (sizeof(lanaddr) / sizeof(lanaddr[0])),0);
+ #else
+ 				char *descXML = (char *)miniwget_getaddr(dev->descURL, &descXMLsize, lanaddr, (sizeof(lanaddr) / sizeof(lanaddr[0])));



More information about the arch-commits mailing list