1 |
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=7
|
|
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
inherit autotools bash-completion-r1 flag-o-matic
|
7 |
|
|
8 |
|
BITCOINCORE_COMMITHASH="a0988140b71485ad12c3c3a4a9573f7c21b1eff8"
|
9 |
|
KNOTS_PV="${PV}.knots20211108"
|
10 |
|
KNOTS_P="bitcoin-${KNOTS_PV}"
|
|
6 |
inherit autotools bash-completion-r1
|
11 |
7 |
|
12 |
8 |
DESCRIPTION="Command-line Bitcoin transaction tool"
|
13 |
|
HOMEPAGE="https://bitcoincore.org/ https://bitcoinknots.org/"
|
|
9 |
HOMEPAGE="https://bitcoincore.org/"
|
14 |
10 |
SRC_URI="
|
15 |
|
https://github.com/bitcoin/bitcoin/archive/${BITCOINCORE_COMMITHASH}.tar.gz -> bitcoin-v${PV}.tar.gz
|
16 |
|
https://bitcoinknots.org/files/$(ver_cut 1).x/${KNOTS_PV}/${KNOTS_P}.patches.txz -> ${KNOTS_P}.patches.tar.xz
|
|
11 |
https://bitcoincore.org/bin/bitcoin-core-${PV}/${P/-tx}.tar.gz
|
17 |
12 |
"
|
|
13 |
S="${WORKDIR}"/${P/-tx}
|
18 |
14 |
|
19 |
15 |
LICENSE="MIT"
|
20 |
16 |
SLOT="0"
|
21 |
|
KEYWORDS="amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
|
22 |
|
IUSE="knots"
|
|
17 |
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
|
23 |
18 |
|
|
19 |
# TODO: Can we drop virtual/bitcoin-leveldb from some bitcoin-*?
|
|
20 |
# (only bitcoin-qt, bitcoind should need it?)
|
24 |
21 |
RDEPEND="
|
25 |
|
dev-libs/boost:=
|
26 |
|
>dev-libs/libsecp256k1-0.1_pre20200911:0/0[recovery,schnorr]
|
27 |
|
!>=dev-libs/libsecp256k1-0.1_pre20210628
|
28 |
|
>=dev-libs/univalue-1.0.4:=
|
|
22 |
>=dev-libs/boost-1.64.0:=
|
|
23 |
>=dev-libs/libsecp256k1-0.2:=[recovery,schnorr]
|
|
24 |
virtual/bitcoin-leveldb
|
29 |
25 |
"
|
30 |
26 |
DEPEND="${RDEPEND}"
|
31 |
|
BDEPEND="
|
32 |
|
>=sys-devel/automake-1.13
|
33 |
|
|| ( >=sys-devel/gcc-7[cxx] >=sys-devel/clang-5 )
|
34 |
|
"
|
35 |
27 |
|
36 |
28 |
DOCS=(
|
37 |
29 |
doc/bips.md
|
38 |
30 |
doc/release-notes.md
|
39 |
31 |
)
|
40 |
32 |
|
41 |
|
S="${WORKDIR}/bitcoin-${BITCOINCORE_COMMITHASH}"
|
|
33 |
PATCHES=(
|
|
34 |
"${FILESDIR}"/24.0.1-syslibs.patch
|
|
35 |
"${FILESDIR}"/24.0.1-gcc13.patch
|
|
36 |
)
|
42 |
37 |
|
43 |
38 |
pkg_pretend() {
|
44 |
|
if use knots; then
|
45 |
|
elog "You are building ${PN} from Bitcoin Knots."
|
46 |
|
elog "For more information, see:"
|
47 |
|
elog "https://bitcoinknots.org/files/22.x/${KNOTS_PV}/${KNOTS_P}.desc.html"
|
48 |
|
else
|
49 |
|
elog "You are building ${PN} from Bitcoin Core."
|
50 |
|
elog "For more information, see:"
|
51 |
|
elog "https://bitcoincore.org/en/2021/09/13/release-${PV}/"
|
52 |
|
fi
|
53 |
|
|
54 |
|
if [[ ${MERGE_TYPE} != "binary" ]] ; then
|
55 |
|
if ! test-flag-CXX -std=c++17 ; then
|
56 |
|
die "Building ${CATEGORY}/${P} requires at least GCC 7 or Clang 5"
|
57 |
|
fi
|
58 |
|
fi
|
|
39 |
elog "You are building ${PN} from Bitcoin Core."
|
|
40 |
elog "For more information, see:"
|
|
41 |
elog "https://bitcoincore.org/en/releases/${PV}/"
|
59 |
42 |
}
|
60 |
43 |
|
61 |
44 |
src_prepare() {
|
62 |
|
local knots_patchdir="${WORKDIR}/${KNOTS_P}.patches/"
|
63 |
|
|
64 |
|
eapply "${knots_patchdir}/${KNOTS_P}_p1-syslibs.patch"
|
65 |
|
eapply "${FILESDIR}/${PV}-fix_build_without_leveldb.patch"
|
66 |
|
|
67 |
|
if use knots; then
|
68 |
|
eapply "${knots_patchdir}/${KNOTS_P}_p2-fixes.patch"
|
69 |
|
eapply "${knots_patchdir}/${KNOTS_P}_p3-features.patch"
|
70 |
|
eapply "${knots_patchdir}/${KNOTS_P}_p4-branding.patch"
|
71 |
|
eapply "${knots_patchdir}/${KNOTS_P}_p5-ts.patch"
|
72 |
|
fi
|
73 |
|
|
74 |
45 |
default
|
75 |
46 |
|
76 |
47 |
eautoreconf
|
... | ... | |
78 |
49 |
}
|
79 |
50 |
|
80 |
51 |
src_configure() {
|
81 |
|
local my_econf=(
|
|
52 |
local myeconfargs=(
|
82 |
53 |
--disable-asm
|
83 |
54 |
--without-qtdbus
|
84 |
55 |
--disable-ebpf
|
... | ... | |
99 |
70 |
--disable-fuzz
|
100 |
71 |
--disable-fuzz-binary
|
101 |
72 |
--disable-ccache
|
102 |
|
--disable-static
|
103 |
73 |
--with-system-libsecp256k1
|
104 |
74 |
--with-system-univalue
|
105 |
75 |
)
|
106 |
|
econf "${my_econf[@]}"
|
|
76 |
econf "${myeconfargs[@]}"
|
107 |
77 |
}
|
108 |
78 |
|
109 |
79 |
src_install() {
|