Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/bitcoin-qt/
Date: Sun, 31 Dec 2017 16:20:49
Message-Id: 1514737222.0a84ae2045d1d2b5fb39f68731bbe17e2e9c6462.floppym@gentoo
1 commit: 0a84ae2045d1d2b5fb39f68731bbe17e2e9c6462
2 Author: Luke Dashjr <luke-jr+git <AT> utopios <DOT> org>
3 AuthorDate: Sun Dec 10 15:07:54 2017 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 31 16:20:22 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a84ae20
7
8 net-p2p/bitcoin-qt: Bump to 0.15.1
9
10 Closes: https://bugs.gentoo.org/615290
11 Closes: https://bugs.gentoo.org/631890
12 Closes: https://bugs.gentoo.org/640674
13 Closes: https://github.com/gentoo/gentoo/pull/6272
14
15 net-p2p/bitcoin-qt/Manifest | 2 +
16 net-p2p/bitcoin-qt/bitcoin-qt-0.15.1.ebuild | 253 ++++++++++++++++++++++++++++
17 net-p2p/bitcoin-qt/metadata.xml | 3 +
18 3 files changed, 258 insertions(+)
19
20 diff --git a/net-p2p/bitcoin-qt/Manifest b/net-p2p/bitcoin-qt/Manifest
21 index 8ac457f4430..db66e3f7bb1 100644
22 --- a/net-p2p/bitcoin-qt/Manifest
23 +++ b/net-p2p/bitcoin-qt/Manifest
24 @@ -1,6 +1,8 @@
25 DIST bitcoin-0.13.0.knots20160814.patches.tar.xz 128520 BLAKE2B f981bc8e1233fb82a22d57c58f39ee0c3c2bf0732c0b5e2055fab18dadb4febaac56b02a9af14bc0cc68f3f62fbf7890d37f502ca044dcd3432f3a27e52f9b0c SHA512 6a02c8bdfbf4373b6e6cff6ebbfe70e71121caae50e39b68e7e73b3dbe83b5717a03710c4a444ed9b5b9d09aee9494affcf52b86f1b05987d16953324d954ca2
26 DIST bitcoin-0.13.1.knots20161027.patches.tar.xz 386532 BLAKE2B 82ad8c1da3692f2d3789ffae3814791c0c8634c07325b0f4c0943d1d2bdc07937e8728e22923385976e51dca7d111f7d8319a947dd7117388bf15983f41a8f57 SHA512 de4fee50bb6fcf416f4d0d52283ae4b80fd06a544e9312808bec167b471bc1a20d6ded1ebba92cef937b2bd7ebae19c5c1153d6a10dad40cba4fb6c0a98b4fb6
27 DIST bitcoin-0.13.2.knots20170102.patches.tar.xz 434012 BLAKE2B 917f6a9bf5b38c557960b1ee2ba548d75eb1fef9ef6908364dfaa7ec8b075e157c303a4eec7ad74deb5cf7ab2ea97c4d800c6fe498d0552318e15fce1b3adf3d SHA512 a19b9d469ff03396375c6f97e3e1f7f24243518e4ca46390bc33debbe5c09dffc8ee8fff4d656b385e38ef0c70e46a474170fd377b8cb94d6cdc2ff58114b061
28 +DIST bitcoin-0.15.1.knots20171111.patches.tar.xz 443024 BLAKE2B 5010c8d0f6a0bc8cd22ca7d7c73d9e4e689e369f0ba39b59f62fa6b6af3dcf938dfc87d33d3fe595a6e54d99734277a34af068dc29a6e984c76d529fbbe2f383 SHA512 455fadeac6ad57be111104680ec6939d6bf235eb49cde89b9716d36f6914c255b1b69cdea459d89b1bbca56099e793be0c8d7aacf592a9d78495068297bb5890
29 DIST bitcoin-v0.13.0.tgz 5836862 BLAKE2B 3ce77a7e15f2de66e2d5424bb2d686839ce0eb52d61fa37f21065205052428c264080a98e00fea7118c83d0bf92fec57c9bd629a1582a952b9521b5d528bc803 SHA512 ed49df78cab36ba30c83591724f1a21f7d2c49aa9cd5185ac09b52473aebcb7f406885d593cc7d99ffc87e3607bbeb8a7668a15a892fc6c654d31a5cfe3f53c1
30 DIST bitcoin-v0.13.1.tgz 5955845 BLAKE2B a86d155f44681aa93720c9620d823070224c547dd7c2a6c075f4c8dec5b0e93b28f12ec3fd8c8c97f3eddd20e8f5763df086be473ed155da9f71479c2ed74779 SHA512 396196fa5325b650c61b966820454712d7e6c3e7a61cb95bacab59a0b6257d113c60105393a2ad1c33623ae81026e15c7356433fd7bafe2888e6b961487259c3
31 DIST bitcoin-v0.13.2.tgz 6088472 BLAKE2B d6b13613d90d0abf33c937ec0cd003756c4984b95bd320f026c5867ba264cb1773d869bfbb170b2b6df6801eca34af71c5dbd3225b9baa5e94ec50ba22da3f54 SHA512 2c053f1f55a426499e50cbadfccfd7c47be25fd10bb8e3d21fb6f408261c5a0c35f2745891e0eeb0fe953428337e40b6dc730499fcd3ba465315d592352833ca
32 +DIST bitcoin-v0.15.1.tar.gz 7550228 BLAKE2B 0cbb7d0e9d0e5e8eb33502a28289c3f9c86b7c531ed179f7e3e8b601a69a423fa736238a2caae890fd8850eb505533995e578e676860a4014922fbc238185ebb SHA512 a09b6cb64a1649d11e3fd6deeb13a07b1bf4bed504a2fc1c585919459ca8ac1af8e5ecc89dee487359e831a8f12625d54f408f95bb341033d6380b82c290c0d9
33
34 diff --git a/net-p2p/bitcoin-qt/bitcoin-qt-0.15.1.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-0.15.1.ebuild
35 new file mode 100644
36 index 00000000000..64339edd7ca
37 --- /dev/null
38 +++ b/net-p2p/bitcoin-qt/bitcoin-qt-0.15.1.ebuild
39 @@ -0,0 +1,253 @@
40 +# Copyright 2010-2017 Gentoo Foundation
41 +# Distributed under the terms of the GNU General Public License v2
42 +
43 +EAPI=6
44 +
45 +DB_VER="4.8"
46 +inherit autotools bash-completion-r1 db-use gnome2-utils xdg-utils
47 +
48 +MyPV="${PV/_/}"
49 +MyPN="bitcoin"
50 +MyP="${MyPN}-${MyPV}"
51 +BITCOINCORE_COMMITHASH="7b57bc998f334775b50ebc8ca5e78ca728db4c58"
52 +KNOTS_PV="${PV}.knots20171111"
53 +KNOTS_P="${MyPN}-${KNOTS_PV}"
54 +
55 +IUSE="+asm +bip70 +bitcoin_policy_rbf dbus kde +libevent knots libressl +qrcode +http test +tor upnp +wallet zeromq"
56 +LANGS="af af:af_ZA am ar be:be_BY bg bg:bg_BG bn bs ca ca@valencia ca:ca_ES cs cy da de de:de_DE el el:el_GR en en_AU en_GB en_US eo es es_419 es_AR es_CL es_CO es_DO es_ES es_MX es_UY es_VE et et:et_EE eu:eu_ES fa fa:fa_IR fi fr fr_CA fr:fr_FR gl he he:he_IL hi:hi_IN hr hu hu:hu_HU id id:id_ID is it it:it_IT ja ja:ja_JP ka kk:kk_KZ ko:ko_KR ku:ku_IQ ky la lt lv:lv_LV mk:mk_MK mn ms ms:ms_MY my nb nb:nb_NO ne nl nl:nl_NL pam pl pl:pl_PL pt pt_BR pt_PT ro ro:ro_RO ru ru:ru_RU si sk sl:sl_SI sn sq sr sr-Latn:sr@latin sv ta te th th:th_TH tr tr:tr_TR uk ur_PK uz@Cyrl vi vi:vi_VN zh zh_CN zh_HK zh_TW"
57 +KNOTS_LANGS="am hu_HU is ms pl_PL pt sn"
58 +
59 +DESCRIPTION="An end-user Qt GUI for the Bitcoin crypto-currency"
60 +HOMEPAGE="http://bitcoincore.org/ http://bitcoinknots.org/"
61 +LICENSE="MIT"
62 +SLOT="0"
63 +KEYWORDS="~amd64 ~amd64-linux ~arm ~arm64 ~mips ~ppc ~x86 ~x86-linux"
64 +
65 +SRC_URI="
66 + https://github.com/${MyPN}/${MyPN}/archive/${BITCOINCORE_COMMITHASH}.tar.gz -> ${MyPN}-v${PV}.tar.gz
67 + http://bitcoinknots.org/files/0.15.x/${KNOTS_PV}/${KNOTS_P}.patches.txz -> ${KNOTS_P}.patches.tar.xz
68 +"
69 +CORE_DESC="https://bitcoincore.org/en/2017/11/11/release-${PV}/"
70 +KNOTS_DESC="http://bitcoinknots.org/files/0.15.x/${KNOTS_PV}/${KNOTS_P}.desc.html"
71 +
72 +RDEPEND="
73 + !libressl? ( dev-libs/openssl:0=[-bindist] )
74 + libressl? ( dev-libs/libressl:0= )
75 + libevent? ( dev-libs/libevent )
76 + >=dev-libs/libsecp256k1-0.0.0_pre20151118[recovery]
77 + dev-libs/univalue
78 + >=dev-libs/boost-1.52.0:=[threads(+)]
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 + virtual/bitcoin-leveldb
83 + bip70? ( dev-libs/protobuf )
84 + qrcode? (
85 + media-gfx/qrencode
86 + )
87 + dev-qt/qtcore:5
88 + dev-qt/qtgui:5
89 + dev-qt/qtnetwork:5
90 + dev-qt/qtwidgets:5
91 + dbus? (
92 + dev-qt/qtdbus:5
93 + )
94 +"
95 +DEPEND="${RDEPEND}
96 + dev-qt/linguist-tools:5
97 + knots? (
98 + gnome-base/librsvg
99 + media-gfx/imagemagick[png]
100 + )
101 +"
102 +REQUIRED_USE="
103 + http? ( libevent ) tor? ( libevent ) libevent? ( http tor )
104 +"
105 +
106 +declare -A LANG2USE USE2LANGS
107 +bitcoin_langs_prep() {
108 + local lang l10n
109 + for lang in ${LANGS}; do
110 + l10n="${lang/:*/}"
111 + l10n="${l10n/[@_]/-}"
112 + lang="${lang/*:/}"
113 + LANG2USE["${lang}"]="${l10n}"
114 + USE2LANGS["${l10n}"]+=" ${lang}"
115 + done
116 +}
117 +bitcoin_langs_prep
118 +
119 +bitcoin_lang2use() {
120 + local l
121 + for l; do
122 + echo l10n_${LANG2USE["${l}"]}
123 + done
124 +}
125 +
126 +IUSE+=" $(bitcoin_lang2use ${!LANG2USE[@]})"
127 +
128 +bitcoin_lang_requireduse() {
129 + local lang l10n knots_exclusive
130 + for l10n in ${!USE2LANGS[@]}; do
131 + for lang in ${USE2LANGS["${l10n}"]}; do
132 + if ! has $lang $KNOTS_LANGS; then
133 + continue 2
134 + fi
135 + done
136 + echo "l10n_${l10n}? ( knots )"
137 + done
138 +}
139 +REQUIRED_USE+=" $(bitcoin_lang_requireduse)"
140 +
141 +DOCS=( doc/bips.md doc/files.md doc/release-notes.md )
142 +
143 +S="${WORKDIR}/${MyPN}-${BITCOINCORE_COMMITHASH}"
144 +
145 +pkg_pretend() {
146 + if use knots; then
147 + einfo "You are building ${PN} from Bitcoin Knots."
148 + einfo "For more information, see ${KNOTS_DESC}"
149 + else
150 + einfo "You are building ${PN} from Bitcoin Core."
151 + einfo "For more information, see ${CORE_DESC}"
152 + fi
153 + if use bitcoin_policy_rbf; then
154 + einfo "Replace By Fee policy is enabled: Your node will preferentially mine and relay transactions paying the highest fee, regardless of receive order."
155 + else
156 + einfo "Replace By Fee policy is disabled: Your node will only accept the first transaction seen consuming a conflicting input, regardless of fee offered by later ones."
157 + fi
158 +}
159 +
160 +KNOTS_PATCH() { echo "${WORKDIR}/${KNOTS_P}.patches/${KNOTS_P}.$@.patch"; }
161 +
162 +src_prepare() {
163 + sed -i 's/^\(complete -F _bitcoind \)bitcoind \(bitcoin-qt\)$/\1\2/' contrib/bitcoind.bash-completion || die
164 +
165 + eapply "$(KNOTS_PATCH syslibs)"
166 +
167 + if use knots; then
168 + eapply "$(KNOTS_PATCH f)"
169 + eapply "$(KNOTS_PATCH branding)"
170 + eapply "$(KNOTS_PATCH ts)"
171 + fi
172 +
173 + eapply_user
174 +
175 + if ! use bitcoin_policy_rbf; then
176 + sed -i 's/\(DEFAULT_ENABLE_REPLACEMENT = \)true/\1false/' src/validation.h || die
177 + fi
178 +
179 + echo '#!/bin/true' >share/genbuild.sh || die
180 + mkdir -p src/obj || die
181 + echo "#define BUILD_SUFFIX gentoo${PVR#${PV}}" >src/obj/build.h || die
182 +
183 + sed -i 's/^\(Icon=\).*$/\1bitcoin-qt/;s/^\(Categories=.*\)$/\1P2P;Network;Qt;/' contrib/debian/bitcoin-qt.desktop || die
184 +
185 + local filt= yeslang= nolang= lan ts x
186 +
187 + for lan in $LANGS; do
188 + lan="${lan/*:/}"
189 + if [ ! -e src/qt/locale/bitcoin_$lan.ts ]; then
190 + if has $lan $KNOTS_LANGS && ! use knots; then
191 + # Expected
192 + continue
193 + fi
194 + die "Language '$lan' no longer supported. Ebuild needs update."
195 + fi
196 + done
197 +
198 + for ts in src/qt/locale/*.ts
199 + do
200 + x="${ts/*bitcoin_/}"
201 + x="${x/.ts/}"
202 + if ! use "$(bitcoin_lang2use "$x")"; then
203 + nolang="$nolang $x"
204 + rm "$ts" || die
205 + filt="$filt\\|$x"
206 + else
207 + yeslang="$yeslang $x"
208 + fi
209 + done
210 + filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)"
211 + sed "/${filt}/d" -i 'src/qt/bitcoin_locale.qrc' || die
212 + sed "s/locale\/${filt}/bitcoin.qrc/" -i 'src/Makefile.qt.include' || die
213 + einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
214 +
215 + eautoreconf
216 + rm -r src/leveldb src/secp256k1 || die
217 +}
218 +
219 +src_configure() {
220 + local my_econf=(
221 + $(use_enable asm experimental-asm)
222 + $(use_enable bip70)
223 + $(use_with dbus qtdbus)
224 + $(use_with libevent)
225 + $(use_with qrcode qrencode)
226 + $(use_with upnp miniupnpc)
227 + $(use_enable upnp upnp-default)
228 + $(use_enable test tests)
229 + $(use_enable wallet)
230 + $(use_enable zeromq zmq)
231 + --with-gui=qt5
232 + --disable-util-cli
233 + --disable-util-tx
234 + --disable-bench
235 + --without-libs
236 + --without-daemon
237 + --disable-ccache
238 + --disable-static
239 + --with-system-leveldb
240 + --with-system-libsecp256k1
241 + --with-system-univalue
242 + )
243 + econf "${my_econf[@]}"
244 +}
245 +
246 +src_install() {
247 + default
248 +
249 + rm -f "${ED%/}/usr/bin/test_bitcoin" || die
250 +
251 + insinto /usr/share/pixmaps
252 + if use knots; then
253 + newins "src/qt/res/rendered_icons/bitcoin.ico" "${PN}.ico"
254 + else
255 + newins "share/pixmaps/bitcoin.ico" "${PN}.ico"
256 + fi
257 + insinto /usr/share/applications
258 + doins "contrib/debian/bitcoin-qt.desktop"
259 +
260 + use libevent && dodoc doc/REST-interface.md doc/tor.md
261 +
262 + use zeromq && dodoc doc/zmq.md
263 +
264 + newbashcomp contrib/bitcoind.bash-completion ${PN}
265 +
266 + if use kde; then
267 + insinto /usr/share/kde4/services
268 + doins contrib/debian/bitcoin-qt.protocol
269 + dosym "../kde4/services/bitcoin-qt.protocol" "/usr/share/kservices5/bitcoin-qt.protocol"
270 + fi
271 +}
272 +
273 +pkg_preinst() {
274 + gnome2_icon_savelist
275 +}
276 +
277 +update_caches() {
278 + gnome2_icon_cache_update
279 + xdg_desktop_database_update
280 +}
281 +
282 +pkg_postinst() {
283 + update_caches
284 +
285 + if use tor; then
286 + einfo "To have ${PN} automatically use Tor when it's running, be sure your 'torrc' config file has 'ControlPort' and 'CookieAuthentication' setup correctly, and add your that user to the 'tor' user group"
287 + fi
288 +}
289 +
290 +pkg_postrm() {
291 + update_caches
292 +}
293
294 diff --git a/net-p2p/bitcoin-qt/metadata.xml b/net-p2p/bitcoin-qt/metadata.xml
295 index a396da394df..60c0dfd8151 100644
296 --- a/net-p2p/bitcoin-qt/metadata.xml
297 +++ b/net-p2p/bitcoin-qt/metadata.xml
298 @@ -10,6 +10,8 @@
299 <name>Proxy Maintainers</name>
300 </maintainer>
301 <use>
302 + <flag name="asm">Enable assembly for optimization</flag>
303 + <flag name="bip70">Enable support for the BIP70 payment protocol</flag>
304 <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>
305 <flag name="bitcoin_policy_spamfilter">Enhanced spam filter policy: Notorious spammers will not be assisted by your node</flag>
306 <flag name="http">Enable support for the JSON-RPC and REST HTTP server (builtin net-p2p/bitcoind)</flag>
307 @@ -24,5 +26,6 @@
308 </use>
309 <upstream>
310 <remote-id type="github">bitcoin/bitcoin</remote-id>
311 + <remote-id type="github">bitcoinknots/bitcoin</remote-id>
312 </upstream>
313 </pkgmetadata>