diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2015-10-22 21:17:56 +0000 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2015-10-23 06:13:14 -0400 |
commit | cb1cd6d23c56ff06009803702be87a2a2a229331 (patch) | |
tree | 56885034721b03368766e03cee293cba3a5f1be1 /net-p2p | |
parent | app-text/ghostscript-gpl: Backport fix for missing header (diff) | |
download | gentoo-cb1cd6d23c56ff06009803702be87a2a2a229331.tar.gz gentoo-cb1cd6d23c56ff06009803702be87a2a2a229331.tar.bz2 gentoo-cb1cd6d23c56ff06009803702be87a2a2a229331.zip |
net-p2p/bitcoin{-qt,d}: Backport miniupnpc-14 support to older versions
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/bitcoin-qt/bitcoin-qt-0.10.2-r1.ebuild | 2 | ||||
-rw-r--r-- | net-p2p/bitcoin-qt/bitcoin-qt-0.10.2.ebuild | 2 | ||||
-rw-r--r-- | net-p2p/bitcoin-qt/bitcoin-qt-0.11.0.ebuild | 2 | ||||
-rw-r--r-- | net-p2p/bitcoin-qt/files/miniupnpc-14.patch | 28 | ||||
-rw-r--r-- | net-p2p/bitcoind/bitcoind-0.10.2-r1.ebuild | 1 | ||||
-rw-r--r-- | net-p2p/bitcoind/bitcoind-0.10.2.ebuild | 1 | ||||
-rw-r--r-- | net-p2p/bitcoind/bitcoind-0.11.0.ebuild | 1 | ||||
-rw-r--r-- | net-p2p/bitcoind/files/miniupnpc-14.patch | 28 |
8 files changed, 65 insertions, 0 deletions
diff --git a/net-p2p/bitcoin-qt/bitcoin-qt-0.10.2-r1.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-0.10.2-r1.ebuild index b5a358d97cc5..0523266be663 100644 --- a/net-p2p/bitcoin-qt/bitcoin-qt-0.10.2-r1.ebuild +++ b/net-p2p/bitcoin-qt/bitcoin-qt-0.10.2-r1.ebuild @@ -38,6 +38,8 @@ DEPEND="${RDEPEND} REQUIRED_USE="${REQUIRED_USE} ^^ ( qt4 qt5 )" src_prepare() { + epatch "${FILESDIR}/miniupnpc-14.patch" + bitcoincore_prepare local filt= yeslang= nolang= diff --git a/net-p2p/bitcoin-qt/bitcoin-qt-0.10.2.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-0.10.2.ebuild index adf1b50ee9cf..f2955eae79de 100644 --- a/net-p2p/bitcoin-qt/bitcoin-qt-0.10.2.ebuild +++ b/net-p2p/bitcoin-qt/bitcoin-qt-0.10.2.ebuild @@ -37,6 +37,8 @@ DEPEND="${RDEPEND} REQUIRED_USE="${REQUIRED_USE} ^^ ( qt4 qt5 )" src_prepare() { + epatch "${FILESDIR}/miniupnpc-14.patch" + bitcoincore_prepare local filt= yeslang= nolang= diff --git a/net-p2p/bitcoin-qt/bitcoin-qt-0.11.0.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-0.11.0.ebuild index 4f21437aa049..b93ef9075b37 100644 --- a/net-p2p/bitcoin-qt/bitcoin-qt-0.11.0.ebuild +++ b/net-p2p/bitcoin-qt/bitcoin-qt-0.11.0.ebuild @@ -36,6 +36,8 @@ DEPEND="${RDEPEND} REQUIRED_USE="${REQUIRED_USE} ^^ ( qt4 qt5 )" src_prepare() { + epatch "${FILESDIR}/miniupnpc-14.patch" + bitcoincore_prepare local filt= yeslang= nolang= diff --git a/net-p2p/bitcoin-qt/files/miniupnpc-14.patch b/net-p2p/bitcoin-qt/files/miniupnpc-14.patch new file mode 100644 index 000000000000..aa8e32ff7c1a --- /dev/null +++ b/net-p2p/bitcoin-qt/files/miniupnpc-14.patch @@ -0,0 +1,28 @@ +commit 9f3e48e5219a09b5ddfd6883d1f0498910eff4b6 (origin-pull/6583/head) +Author: Pavel Vasin <pavel@vasin.nl> +Date: Sun Aug 23 23:53:49 2015 +0300 + + add support for miniupnpc api version 14 + + The value of new arg ttl is set to 2 as it's recommended default. + +diff --git a/src/net.cpp b/src/net.cpp +index fb5726a..4c6331f 100644 +--- a/src/net.cpp ++++ b/src/net.cpp +@@ -1120,10 +1120,14 @@ void ThreadMapPort() + #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; diff --git a/net-p2p/bitcoind/bitcoind-0.10.2-r1.ebuild b/net-p2p/bitcoind/bitcoind-0.10.2-r1.ebuild index dcac723e3ef3..78bd4964dadf 100644 --- a/net-p2p/bitcoind/bitcoind-0.10.2-r1.ebuild +++ b/net-p2p/bitcoind/bitcoind-0.10.2-r1.ebuild @@ -33,6 +33,7 @@ pkg_setup() { } src_prepare() { + epatch "${FILESDIR}/miniupnpc-14.patch" sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind bitcoind\) bitcoin-cli$/\1/' contrib/${PN}.bash-completion epatch "${FILESDIR}/0.10.0-openrc-compat.patch" bitcoincore_src_prepare diff --git a/net-p2p/bitcoind/bitcoind-0.10.2.ebuild b/net-p2p/bitcoind/bitcoind-0.10.2.ebuild index 90f110d072a4..3b945861f5aa 100644 --- a/net-p2p/bitcoind/bitcoind-0.10.2.ebuild +++ b/net-p2p/bitcoind/bitcoind-0.10.2.ebuild @@ -32,6 +32,7 @@ pkg_setup() { } src_prepare() { + epatch "${FILESDIR}/miniupnpc-14.patch" epatch "${FILESDIR}/0.10.0-openrc-compat.patch" bitcoincore_src_prepare } diff --git a/net-p2p/bitcoind/bitcoind-0.11.0.ebuild b/net-p2p/bitcoind/bitcoind-0.11.0.ebuild index 616e33c5d2d3..f2ed1f49b05f 100644 --- a/net-p2p/bitcoind/bitcoind-0.11.0.ebuild +++ b/net-p2p/bitcoind/bitcoind-0.11.0.ebuild @@ -31,6 +31,7 @@ pkg_setup() { } src_prepare() { + epatch "${FILESDIR}/miniupnpc-14.patch" sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind bitcoind\) bitcoin-cli$/\1/' contrib/${PN}.bash-completion bitcoincore_src_prepare } diff --git a/net-p2p/bitcoind/files/miniupnpc-14.patch b/net-p2p/bitcoind/files/miniupnpc-14.patch new file mode 100644 index 000000000000..aa8e32ff7c1a --- /dev/null +++ b/net-p2p/bitcoind/files/miniupnpc-14.patch @@ -0,0 +1,28 @@ +commit 9f3e48e5219a09b5ddfd6883d1f0498910eff4b6 (origin-pull/6583/head) +Author: Pavel Vasin <pavel@vasin.nl> +Date: Sun Aug 23 23:53:49 2015 +0300 + + add support for miniupnpc api version 14 + + The value of new arg ttl is set to 2 as it's recommended default. + +diff --git a/src/net.cpp b/src/net.cpp +index fb5726a..4c6331f 100644 +--- a/src/net.cpp ++++ b/src/net.cpp +@@ -1120,10 +1120,14 @@ void ThreadMapPort() + #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; |