Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/bitcoin-qt/files/, net-p2p/bitcoin-qt/
Date: Sat, 31 Mar 2018 23:09:10
Message-Id: 1522537733.c1066d6df84fc4c3375a52ab174afae1a1c4e0cc.mgorny@gentoo
1 commit: c1066d6df84fc4c3375a52ab174afae1a1c4e0cc
2 Author: Luke Dashjr <luke-jr+git <AT> utopios <DOT> org>
3 AuthorDate: Fri Mar 23 13:49:16 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 31 23:08:53 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1066d6d
7
8 net-p2p/bitcoin-qt: Bump to 0.16.0
9
10 Closes: https://bugs.gentoo.org/649562
11 Closes: https://github.com/gentoo/gentoo/pull/7570
12
13 net-p2p/bitcoin-qt/Manifest | 2 +
14 net-p2p/bitcoin-qt/bitcoin-qt-0.16.0.ebuild | 182 +++++++++++++++++++++
15 .../files/bitcoin-qt-0.16.0-fix_mempoolstats.patch | 46 ++++++
16 net-p2p/bitcoin-qt/metadata.xml | 2 +-
17 4 files changed, 231 insertions(+), 1 deletion(-)
18
19 diff --git a/net-p2p/bitcoin-qt/Manifest b/net-p2p/bitcoin-qt/Manifest
20 index 7c7216450f4..c6a97f3d9fb 100644
21 --- a/net-p2p/bitcoin-qt/Manifest
22 +++ b/net-p2p/bitcoin-qt/Manifest
23 @@ -1,2 +1,4 @@
24 DIST bitcoin-0.15.1.knots20171111.patches.tar.xz 443024 BLAKE2B 5010c8d0f6a0bc8cd22ca7d7c73d9e4e689e369f0ba39b59f62fa6b6af3dcf938dfc87d33d3fe595a6e54d99734277a34af068dc29a6e984c76d529fbbe2f383 SHA512 455fadeac6ad57be111104680ec6939d6bf235eb49cde89b9716d36f6914c255b1b69cdea459d89b1bbca56099e793be0c8d7aacf592a9d78495068297bb5890
25 +DIST bitcoin-0.16.0.knots20180322.patches.tar.xz 417544 BLAKE2B f14616c81e0694346fd0714032be501ad0b58e82e2a5fcc623b1fdd316759ae7ac584e6c4ab586e8c9f5a402694a36eceac6b2f1c7441da655479f832a8869bd SHA512 9eca9cbae8ce17b38ddb70326760e33e7812db78e79cfe2d1a3518b34eb8fc87fe4c145e46ab60278b14e70a75b3af238342b4e1808a77cbca4b62b8c72fb1eb
26 DIST bitcoin-v0.15.1.tar.gz 7550228 BLAKE2B 0cbb7d0e9d0e5e8eb33502a28289c3f9c86b7c531ed179f7e3e8b601a69a423fa736238a2caae890fd8850eb505533995e578e676860a4014922fbc238185ebb SHA512 a09b6cb64a1649d11e3fd6deeb13a07b1bf4bed504a2fc1c585919459ca8ac1af8e5ecc89dee487359e831a8f12625d54f408f95bb341033d6380b82c290c0d9
27 +DIST bitcoin-v0.16.0.tar.gz 6628305 BLAKE2B 69adb5832e2a708431c06bd8ce695f25cfc2b84e7ccf11e77f40c8ec273146208c70a900d0d32f79790cf67fb359c2731b0cecfc1f27ac2d0c4057228a83aed3 SHA512 7a59de44196a3cd5b75bccfe851e8bd7d5a00ae45b6e771e082326d75846e7c6d1f6d449e18b539b95b25aa12b7b79c462367f1c89438bcd1ca6ec84eb42972c
28
29 diff --git a/net-p2p/bitcoin-qt/bitcoin-qt-0.16.0.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-0.16.0.ebuild
30 new file mode 100644
31 index 00000000000..a0987233c6f
32 --- /dev/null
33 +++ b/net-p2p/bitcoin-qt/bitcoin-qt-0.16.0.ebuild
34 @@ -0,0 +1,182 @@
35 +# Copyright 1999-2018 Gentoo Foundation
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=6
39 +
40 +DB_VER="4.8"
41 +inherit autotools bash-completion-r1 db-use gnome2-utils xdg-utils
42 +
43 +BITCOINCORE_COMMITHASH="4b4d7eb255ca8f9a94b92479e6061d129c91a991"
44 +KNOTS_PV="${PV}.knots20180322"
45 +KNOTS_P="bitcoin-${KNOTS_PV}"
46 +
47 +DESCRIPTION="An end-user Qt GUI for the Bitcoin crypto-currency"
48 +HOMEPAGE="https://bitcoincore.org/ https://bitcoinknots.org/"
49 +SRC_URI="
50 + https://github.com/bitcoin/bitcoin/archive/${BITCOINCORE_COMMITHASH}.tar.gz -> bitcoin-v${PV}.tar.gz
51 + https://bitcoinknots.org/files/0.16.x/${KNOTS_PV}/${KNOTS_P}.patches.txz -> ${KNOTS_P}.patches.tar.xz
52 +"
53 +
54 +LICENSE="MIT"
55 +SLOT="0"
56 +KEYWORDS="~amd64 ~amd64-linux ~arm ~arm64 ~mips ~ppc ~x86 ~x86-linux"
57 +
58 +IUSE="+asm +bip70 +bitcoin_policy_rbf dbus kde +libevent knots libressl +qrcode test upnp +wallet zeromq"
59 +
60 +RDEPEND="
61 + >=dev-libs/boost-1.52.0:=[threads(+)]
62 + >=dev-libs/libsecp256k1-0.0.0_pre20151118:=[recovery]
63 + dev-libs/univalue:=
64 + dev-qt/qtcore:5
65 + dev-qt/qtgui:5
66 + dev-qt/qtnetwork:5
67 + dev-qt/qtwidgets:5
68 + virtual/bitcoin-leveldb
69 + bip70? ( dev-libs/protobuf:= )
70 + dbus? (
71 + dev-qt/qtdbus:5
72 + )
73 + libevent? ( dev-libs/libevent:= )
74 + !libressl? ( dev-libs/openssl:0=[-bindist] )
75 + libressl? ( dev-libs/libressl:0= )
76 + qrcode? (
77 + media-gfx/qrencode:=
78 + )
79 + upnp? ( >=net-libs/miniupnpc-1.9.20150916:= )
80 + wallet? ( sys-libs/db:$(db_ver_to_slot "${DB_VER}")=[cxx] )
81 + zeromq? ( net-libs/zeromq:= )
82 +"
83 +DEPEND="${RDEPEND}
84 + dev-qt/linguist-tools:5
85 + knots? (
86 + gnome-base/librsvg
87 + media-gfx/imagemagick[png]
88 + )
89 +"
90 +
91 +DOCS=( doc/bips.md doc/files.md doc/release-notes.md )
92 +
93 +S="${WORKDIR}/bitcoin-${BITCOINCORE_COMMITHASH}"
94 +
95 +pkg_pretend() {
96 + if use knots; then
97 + elog "You are building ${PN} from Bitcoin Knots."
98 + elog "For more information, see:"
99 + elog "https://bitcoinknots.org/files/0.16.x/${KNOTS_PV}/${KNOTS_P}.desc.html"
100 + else
101 + elog "You are building ${PN} from Bitcoin Core."
102 + elog "For more information, see:"
103 + elog "https://bitcoincore.org/en/2017/11/11/release-${PV}/"
104 + fi
105 + if use bitcoin_policy_rbf; then
106 + elog "Replace By Fee policy is enabled: Your node will preferentially mine and"
107 + elog "relay transactions paying the highest fee, regardless of receive order."
108 + else
109 + elog "Replace By Fee policy is disabled: Your node will only accept the first"
110 + elog "transaction seen consuming a conflicting input, regardless of fee"
111 + elog "offered by later ones."
112 + fi
113 +}
114 +
115 +src_prepare() {
116 + sed -i 's/^\(complete -F _bitcoind \)bitcoind \(bitcoin-qt\)$/\1\2/' contrib/bitcoind.bash-completion || die
117 +
118 + local knots_patchdir="${WORKDIR}/${KNOTS_P}.patches/"
119 +
120 + eapply "${knots_patchdir}/${KNOTS_P}.syslibs.patch"
121 +
122 + if use knots; then
123 + eapply "${knots_patchdir}/${KNOTS_P}.f.patch"
124 + eapply "${knots_patchdir}/${KNOTS_P}.branding.patch"
125 + eapply "${knots_patchdir}/${KNOTS_P}.ts.patch"
126 + eapply "${FILESDIR}/${P}-fix_mempoolstats.patch"
127 + fi
128 +
129 + eapply_user
130 +
131 + if ! use bitcoin_policy_rbf; then
132 + sed -i 's/\(DEFAULT_ENABLE_REPLACEMENT = \)true/\1false/' src/validation.h || die
133 + fi
134 +
135 + echo '#!/bin/true' >share/genbuild.sh || die
136 + mkdir -p src/obj || die
137 + echo "#define BUILD_SUFFIX gentoo${PVR#${PV}}" >src/obj/build.h || die
138 +
139 + sed -i 's/^\(Icon=\).*$/\1bitcoin-qt/;s/^\(Categories=.*\)$/\1P2P;Network;Qt;/' contrib/debian/bitcoin-qt.desktop || die
140 +
141 + eautoreconf
142 + rm -r src/leveldb src/secp256k1 || die
143 +}
144 +
145 +src_configure() {
146 + local my_econf=(
147 + $(use_enable asm)
148 + $(use_enable bip70)
149 + $(use_with dbus qtdbus)
150 + $(use_with libevent)
151 + $(use_with qrcode qrencode)
152 + $(use_with upnp miniupnpc)
153 + $(use_enable upnp upnp-default)
154 + $(use_enable test tests)
155 + $(use_enable wallet)
156 + $(use_enable zeromq zmq)
157 + --with-gui=qt5
158 + --disable-util-cli
159 + --disable-util-tx
160 + --disable-bench
161 + --without-libs
162 + --without-daemon
163 + --disable-ccache
164 + --disable-static
165 + --with-system-leveldb
166 + --with-system-libsecp256k1
167 + --with-system-univalue
168 + )
169 + econf "${my_econf[@]}"
170 +}
171 +
172 +src_install() {
173 + default
174 +
175 + rm -f "${ED%/}/usr/bin/test_bitcoin" || die
176 +
177 + insinto /usr/share/pixmaps
178 + if use knots; then
179 + newins "src/qt/res/rendered_icons/bitcoin.ico" "${PN}.ico"
180 + else
181 + newins "share/pixmaps/bitcoin.ico" "${PN}.ico"
182 + fi
183 + insinto /usr/share/applications
184 + newins "contrib/debian/bitcoin-qt.desktop" "org.bitcoin.bitcoin-qt.desktop"
185 +
186 + use libevent && dodoc doc/REST-interface.md doc/tor.md
187 +
188 + use zeromq && dodoc doc/zmq.md
189 +
190 + newbashcomp contrib/bitcoind.bash-completion ${PN}
191 +
192 + if use kde; then
193 + insinto /usr/share/kservices5
194 + doins contrib/debian/bitcoin-qt.protocol
195 + dosym "../../kservices5/bitcoin-qt.protocol" "/usr/share/kde4/services/bitcoin-qt.protocol"
196 + fi
197 +}
198 +
199 +update_caches() {
200 + gnome2_icon_cache_update
201 + xdg_desktop_database_update
202 +}
203 +
204 +pkg_postinst() {
205 + update_caches
206 +
207 + if use libevent; then
208 + elog "To have ${PN} automatically use Tor when it's running, be sure your"
209 + elog "'torrc' config file has 'ControlPort' and 'CookieAuthentication' setup"
210 + elog "correctly, and add your user to the 'tor' user group."
211 + fi
212 +}
213 +
214 +pkg_postrm() {
215 + update_caches
216 +}
217
218 diff --git a/net-p2p/bitcoin-qt/files/bitcoin-qt-0.16.0-fix_mempoolstats.patch b/net-p2p/bitcoin-qt/files/bitcoin-qt-0.16.0-fix_mempoolstats.patch
219 new file mode 100644
220 index 00000000000..95219c67982
221 --- /dev/null
222 +++ b/net-p2p/bitcoin-qt/files/bitcoin-qt-0.16.0-fix_mempoolstats.patch
223 @@ -0,0 +1,46 @@
224 +From 450ac607a3568f8c991df1681155de6fa7f5a5cb Mon Sep 17 00:00:00 2001
225 +From: Luke Dashjr <luke-jr+git@×××××××.org>
226 +Date: Fri, 23 Mar 2018 20:30:11 +0000
227 +Subject: [PATCH] Bugfix: GUI/MempoolStats: Avoid dereferencing NULL
228 +
229 +---
230 + src/qt/mempoolstats.cpp | 12 ++++--------
231 + 1 file changed, 4 insertions(+), 8 deletions(-)
232 +
233 +diff --git a/src/qt/mempoolstats.cpp b/src/qt/mempoolstats.cpp
234 +index ebc72e95d0..50a3ef71ab 100644
235 +--- a/src/qt/mempoolstats.cpp
236 ++++ b/src/qt/mempoolstats.cpp
237 +@@ -79,13 +79,9 @@ void MempoolStats::setClientModel(ClientModel *model)
238 +
239 + void MempoolStats::drawChart()
240 + {
241 +- if (!isVisible())
242 ++ if (!(isVisible() && clientModel))
243 + return;
244 +
245 +- const bool drawTxCount = cbShowNumTxns->isChecked();
246 +- const bool drawMinFee = cbShowMinFeerate->isChecked();
247 +- const bool drawDynMemUsage = cbShowMemUsage->isChecked();
248 +-
249 + if (!titleItem)
250 + {
251 + // create labels (only once)
252 +@@ -349,11 +345,11 @@ void MempoolStats::drawChart()
253 + QPen linePenRed(QColor(188,49,62, 250), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
254 + QPen linePenGreen(QColor(49,188,62, 250), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
255 +
256 +- if (drawTxCount)
257 ++ if (cbShowNumTxns->isChecked())
258 + redrawItems.append(scene->addPath(txCountPath, linePenRed));
259 +- if (drawMinFee)
260 ++ if (cbShowMinFeerate->isChecked())
261 + redrawItems.append(scene->addPath(minFeePath, linePenGreen));
262 +- if (drawDynMemUsage)
263 ++ if (cbShowMemUsage->isChecked())
264 + {
265 + redrawItems.append(scene->addPath(dynMemUsagePath, linePenBlue));
266 + redrawItems.append(scene->addPath(dynMemUsagePathFill, QPen(Qt::NoPen), graBru));
267 +--
268 +2.16.1
269 +
270
271 diff --git a/net-p2p/bitcoin-qt/metadata.xml b/net-p2p/bitcoin-qt/metadata.xml
272 index f92f879affd..c3c11c51b20 100644
273 --- a/net-p2p/bitcoin-qt/metadata.xml
274 +++ b/net-p2p/bitcoin-qt/metadata.xml
275 @@ -15,7 +15,7 @@
276 <flag name="bitcoin_policy_rbf">Replace By Fee policy: Your node will preferentially mine and relay transactions paying the highest fee, regardless of receive order</flag>
277 <flag name="http">Enable support for the JSON-RPC and REST HTTP server (builtin net-p2p/bitcoind)</flag>
278 <flag name="knots">Build enhanced Bitcoin Knots version, rather than Bitcoin Core</flag>
279 - <flag name="libevent">Use dev-libs/libevent</flag>
280 + <flag name="libevent">Use dev-libs/libevent (needed for JSON-RPC, REST, and Tor auto-configuration</flag>
281 <flag name="qrcode">Enable generation of QR Codes for receiving payments</flag>
282 <flag name="tor">Enable automatic configuration of a Tor hidden service</flag>
283 <flag name="upnp">Enable Universal Plug and Play</flag>