4 |
4 |
EAPI=7
|
5 |
5 |
|
6 |
6 |
DB_VER="4.8"
|
7 |
|
inherit autotools bash-completion-r1 db-use desktop xdg-utils
|
|
7 |
inherit autotools bash-completion-r1 db-use desktop flag-o-matic xdg-utils
|
8 |
8 |
|
9 |
|
BITCOINCORE_COMMITHASH="95ea54ba089610019a74c1176a2c7c0dba144b1c"
|
10 |
|
KNOTS_PV="${PV}.knots20210130"
|
|
9 |
BITCOINCORE_COMMITHASH="a0988140b71485ad12c3c3a4a9573f7c21b1eff8"
|
|
10 |
KNOTS_PV="${PV}.knots20211108"
|
11 |
11 |
KNOTS_P="bitcoin-${KNOTS_PV}"
|
12 |
12 |
|
13 |
13 |
DESCRIPTION="An end-user Qt GUI for the Bitcoin crypto-currency"
|
14 |
14 |
HOMEPAGE="https://bitcoincore.org/ https://bitcoinknots.org/"
|
15 |
15 |
SRC_URI="
|
16 |
16 |
https://github.com/bitcoin/bitcoin/archive/${BITCOINCORE_COMMITHASH}.tar.gz -> bitcoin-v${PV}.tar.gz
|
17 |
|
https://bitcoinknots.org/files/$(ver_cut 1-2).x/${KNOTS_PV}/${KNOTS_P}.patches.txz -> ${KNOTS_P}.patches.tar.xz
|
|
17 |
https://bitcoinknots.org/files/$(ver_cut 1).x/${KNOTS_PV}/${KNOTS_P}.patches.txz -> ${KNOTS_P}.patches.tar.xz
|
18 |
18 |
"
|
19 |
19 |
|
20 |
20 |
LICENSE="MIT"
|
21 |
21 |
SLOT="0"
|
22 |
22 |
KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
|
23 |
23 |
|
24 |
|
IUSE="+asm dbus kde knots +qrcode sqlite +system-leveldb test upnp +wallet zeromq"
|
|
24 |
IUSE="+asm +berkdb dbus +external-signer kde knots nat-pmp +qrcode sqlite systemtap test upnp +wallet zeromq"
|
25 |
25 |
RESTRICT="!test? ( test )"
|
26 |
26 |
|
|
27 |
REQUIRED_USE="
|
|
28 |
sqlite? ( wallet )
|
|
29 |
berkdb? ( wallet )
|
|
30 |
wallet? ( || ( berkdb sqlite ) )
|
|
31 |
"
|
27 |
32 |
RDEPEND="
|
28 |
33 |
dev-libs/boost:=
|
29 |
34 |
>dev-libs/libsecp256k1-0.1_pre20200911:0/0[recovery,schnorr]
|
... | ... | |
33 |
38 |
dev-qt/qtgui:5
|
34 |
39 |
dev-qt/qtnetwork:5
|
35 |
40 |
dev-qt/qtwidgets:5
|
36 |
|
system-leveldb? ( virtual/bitcoin-leveldb )
|
|
41 |
virtual/bitcoin-leveldb
|
37 |
42 |
dbus? ( dev-qt/qtdbus:5 )
|
38 |
43 |
dev-libs/libevent:=
|
|
44 |
nat-pmp? ( net-libs/libnatpmp )
|
39 |
45 |
qrcode? (
|
40 |
46 |
media-gfx/qrencode:=
|
41 |
47 |
)
|
42 |
48 |
sqlite? ( >=dev-db/sqlite-3.7.17:= )
|
43 |
49 |
upnp? ( >=net-libs/miniupnpc-1.9.20150916:= )
|
44 |
|
wallet? ( sys-libs/db:$(db_ver_to_slot "${DB_VER}")=[cxx] )
|
|
50 |
berkdb? ( sys-libs/db:$(db_ver_to_slot "${DB_VER}")=[cxx] )
|
45 |
51 |
zeromq? ( net-libs/zeromq:= )
|
46 |
52 |
"
|
47 |
|
DEPEND="${RDEPEND}"
|
|
53 |
DEPEND="${RDEPEND}
|
|
54 |
systemtap? ( dev-util/systemtap )
|
|
55 |
"
|
48 |
56 |
BDEPEND="
|
49 |
|
>=sys-devel/autoconf-2.69
|
50 |
57 |
>=sys-devel/automake-1.13
|
|
58 |
|| ( >=sys-devel/gcc-7[cxx] >=sys-devel/clang-5 )
|
51 |
59 |
dev-qt/linguist-tools:5
|
52 |
60 |
knots? (
|
53 |
61 |
gnome-base/librsvg
|
... | ... | |
62 |
70 |
doc/files.md
|
63 |
71 |
doc/JSON-RPC-interface.md
|
64 |
72 |
doc/psbt.md
|
|
73 |
doc/reduce-memory.md
|
65 |
74 |
doc/reduce-traffic.md
|
66 |
75 |
doc/release-notes.md
|
67 |
76 |
doc/REST-interface.md
|
... | ... | |
74 |
83 |
if use knots; then
|
75 |
84 |
elog "You are building ${PN} from Bitcoin Knots."
|
76 |
85 |
elog "For more information, see:"
|
77 |
|
elog "https://bitcoinknots.org/files/0.21.x/${KNOTS_PV}/${KNOTS_P}.desc.html"
|
|
86 |
elog "https://bitcoinknots.org/files/22.x/${KNOTS_PV}/${KNOTS_P}.desc.html"
|
78 |
87 |
else
|
79 |
88 |
elog "You are building ${PN} from Bitcoin Core."
|
80 |
89 |
elog "For more information, see:"
|
81 |
|
elog "https://bitcoincore.org/en/2021/01/14/release-${PV}/"
|
|
90 |
elog "https://bitcoincore.org/en/2021/09/13/release-${PV}/"
|
82 |
91 |
fi
|
|
92 |
elog
|
83 |
93 |
elog "Replace By Fee policy is now always enabled by default: Your node will"
|
84 |
94 |
elog "preferentially mine and relay transactions paying the highest fee, regardless"
|
85 |
|
elog "of receive order. To disable RBF, set mempoolreplacement=never in bitcoin.conf"
|
|
95 |
if use knots; then
|
|
96 |
elog "of receive order. To disable RBF, set mempoolreplacement=never in bitcoin.conf"
|
|
97 |
else # Bitcoin Core doesn't support disabling RBF anymore
|
|
98 |
elog "of receive order. To disable RBF, rebuild with USE=knots to get ${PN}"
|
|
99 |
elog "from Bitcoin Knots, and set mempoolreplacement=never in bitcoin.conf"
|
|
100 |
fi
|
|
101 |
if has_version "<${CATEGORY}/${PN}-0.21.1" ; then
|
|
102 |
ewarn "CAUTION: BITCOIN PROTOCOL CHANGE INCLUDED"
|
|
103 |
ewarn "This release adds enforcement of the Taproot protocol change to the Bitcoin"
|
|
104 |
ewarn "rules, beginning in November. Protocol changes require user consent to be"
|
|
105 |
ewarn "effective, and if enforced inconsistently within the community may compromise"
|
|
106 |
ewarn "your security or others! If you do not know what you are doing, learn more"
|
|
107 |
ewarn "before November. (You must make a decision either way - simply not upgrading"
|
|
108 |
ewarn "is insecure in all scenarios.)"
|
|
109 |
ewarn "To learn more, see https://bitcointaproot.cc"
|
|
110 |
fi
|
|
111 |
|
|
112 |
if [[ ${MERGE_TYPE} != "binary" ]] ; then
|
|
113 |
if ! test-flag-CXX -std=c++17 ; then
|
|
114 |
die "Building ${CATEGORY}/${P} requires at least GCC 7 or Clang 5"
|
|
115 |
fi
|
|
116 |
fi
|
86 |
117 |
}
|
87 |
118 |
|
88 |
119 |
src_prepare() {
|
... | ... | |
93 |
124 |
|
94 |
125 |
local knots_patchdir="${WORKDIR}/${KNOTS_P}.patches/"
|
95 |
126 |
|
96 |
|
eapply "${knots_patchdir}/${KNOTS_P}.syslibs.patch"
|
|
127 |
eapply "${knots_patchdir}/${KNOTS_P}_p1-syslibs.patch"
|
97 |
128 |
|
98 |
129 |
if use knots; then
|
99 |
|
eapply "${knots_patchdir}/${KNOTS_P}.f.patch"
|
100 |
|
eapply "${knots_patchdir}/${KNOTS_P}.branding.patch"
|
101 |
|
eapply "${knots_patchdir}/${KNOTS_P}.ts.patch"
|
|
130 |
eapply "${knots_patchdir}/${KNOTS_P}_p2-fixes.patch"
|
|
131 |
eapply "${knots_patchdir}/${KNOTS_P}_p3-features.patch"
|
|
132 |
eapply "${knots_patchdir}/${KNOTS_P}_p4-branding.patch"
|
|
133 |
eapply "${knots_patchdir}/${KNOTS_P}_p5-ts.patch"
|
102 |
134 |
fi
|
103 |
135 |
|
104 |
|
eapply "${FILESDIR}/${PN}-0.20.1-boost-1.77-compat.patch"
|
105 |
|
|
106 |
136 |
eapply_user
|
107 |
137 |
|
108 |
|
echo '#!/bin/true' >share/genbuild.sh || die
|
109 |
|
mkdir -p src/obj || die
|
110 |
|
echo "#define BUILD_SUFFIX gentoo${PVR#${PV}}" >src/obj/build.h || die
|
111 |
|
|
112 |
138 |
eautoreconf
|
113 |
|
rm -r src/secp256k1 || die
|
114 |
|
if use system-leveldb; then
|
115 |
|
rm -r src/leveldb || die
|
116 |
|
fi
|
|
139 |
rm -r src/leveldb src/secp256k1 || die
|
117 |
140 |
}
|
118 |
141 |
|
119 |
142 |
src_configure() {
|
120 |
143 |
local my_econf=(
|
121 |
144 |
$(use_enable asm)
|
122 |
145 |
$(use_with dbus qtdbus)
|
|
146 |
$(use_enable systemtap ebpf)
|
|
147 |
$(use_enable external-signer)
|
|
148 |
$(use_with nat-pmp natpmp)
|
|
149 |
$(use_with nat-pmp natpmp-default)
|
123 |
150 |
$(use_with qrcode qrencode)
|
124 |
151 |
$(use_with upnp miniupnpc)
|
125 |
152 |
$(use_enable upnp upnp-default)
|
... | ... | |
129 |
156 |
--with-gui=qt5
|
130 |
157 |
--disable-util-cli
|
131 |
158 |
--disable-util-tx
|
|
159 |
--disable-util-util
|
132 |
160 |
--disable-util-wallet
|
133 |
161 |
--disable-bench
|
134 |
162 |
--without-libs
|
135 |
163 |
--without-daemon
|
136 |
164 |
--disable-fuzz
|
|
165 |
--disable-fuzz-binary
|
137 |
166 |
--disable-ccache
|
138 |
167 |
--disable-static
|
|
168 |
$(use_with berkdb bdb)
|
139 |
169 |
$(use_with sqlite)
|
140 |
|
$(use_with system-leveldb)
|
|
170 |
--with-system-leveldb
|
141 |
171 |
--with-system-libsecp256k1
|
142 |
172 |
--with-system-univalue
|
143 |
173 |
)
|