[packages/primecoin-hp] - fix building with miniupnpc 2.0 - rel 6

baggins baggins at pld-linux.org
Sun Apr 16 16:07:22 CEST 2017


commit ab41acf2f55a4e5602a1faf7d12f891333e83557
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Apr 16 16:07:04 2017 +0200

    - fix building with miniupnpc 2.0
    - rel 6

 miniupnpc-2.0.patch | 18 ++++++++++++++++++
 primecoin-hp.spec   |  4 +++-
 2 files changed, 21 insertions(+), 1 deletion(-)
---
diff --git a/primecoin-hp.spec b/primecoin-hp.spec
index 80d8a83..4226055 100644
--- a/primecoin-hp.spec
+++ b/primecoin-hp.spec
@@ -3,13 +3,14 @@
 Summary:	Primecoin - First Scientific Computing Cryptocurrency
 Name:		primecoin-hp
 Version:	%{ver}.%{subver}
-Release:	5
+Release:	6
 License:	MIT/X11
 Group:		X11/Applications
 Source0:	http://downloads.sourceforge.net/primecoin-hp/%{ver}-%{subver}/primecoin-%{ver}-%{subver}.tar.bz2
 # Source0-md5:	90115f413a3244aaf6271b1c83c0ddae
 Patch0:		build-i486.patch
 Patch1:		boost-1.58.patch
+Patch2:		miniupnpc-2.0.patch
 URL:		http://primecoin.org
 BuildRequires:	QtCore-devel
 BuildRequires:	QtDBus-devel
@@ -37,6 +38,7 @@ Qt-based Primecoin Wallet.
 %setup -q -n primecoin-%{ver}-%{subver}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 qmake-qt4 \
diff --git a/miniupnpc-2.0.patch b/miniupnpc-2.0.patch
new file mode 100644
index 0000000..53cfee8
--- /dev/null
+++ b/miniupnpc-2.0.patch
@@ -0,0 +1,18 @@
+--- primecoin-0.1.2-hp14/src/net.cpp~	2014-04-26 17:02:25.000000000 +0200
++++ primecoin-0.1.2-hp14/src/net.cpp	2017-04-16 16:05:02.024093670 +0200
+@@ -1083,10 +1083,14 @@
+ #ifndef UPNPDISCOVER_SUCCESS
+     /* miniupnpc 1.5 */
+     devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
+-#else
++#elif MINIUPNPC_API_VERSION < 14
+     /* miniupnpc 1.6 */
+     int error = 0;
+     devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
++#else
++    /* miniupnpc 1.9.20150730 */
++    int error = 0;
++    devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);
+ #endif
+ 
+     struct UPNPUrls urls;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/primecoin-hp.git/commitdiff/ab41acf2f55a4e5602a1faf7d12f891333e83557



More information about the pld-cvs-commit mailing list