Diff bitcoind-0.21.0-r1 with a bitcoind-22.0-r1

/usr/portage/net-p2p/bitcoind/bitcoind-22.0-r1.ebuild 2023-10-09 14:52:34.736368482 +0300
4 4
EAPI=7
5 5

  
6 6
DB_VER="4.8"
7
inherit autotools bash-completion-r1 db-use systemd
7
inherit autotools bash-completion-r1 db-use systemd flag-o-matic
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="Original Bitcoin crypto-currency wallet for automated services"
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 ~mips ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
23
IUSE="+asm examples knots +sqlite system-leveldb test upnp +wallet zeromq"
23
IUSE="+asm +berkdb examples +external-signer knots nat-pmp sqlite systemtap test upnp +wallet zeromq"
24 24
RESTRICT="!test? ( test )"
25 25

  
26
DEPEND="
26
REQUIRED_USE="
27
	sqlite? ( wallet )
28
	berkdb? ( wallet )
29
	wallet? ( || ( berkdb sqlite ) )
30
"
31
RDEPEND="
27 32
	acct-group/bitcoin
28 33
	acct-user/bitcoin
29 34
	dev-libs/boost:=
......
31 36
	>dev-libs/libsecp256k1-0.1_pre20200911:0/0[recovery,schnorr]
32 37
	!>=dev-libs/libsecp256k1-0.1_pre20210628
33 38
	>=dev-libs/univalue-1.0.4:=
34
	system-leveldb? ( virtual/bitcoin-leveldb )
39
	nat-pmp? ( net-libs/libnatpmp )
40
	virtual/bitcoin-leveldb
35 41
	sqlite? ( >=dev-db/sqlite-3.7.17:= )
36 42
	upnp? ( >=net-libs/miniupnpc-1.9.20150916:= )
37
	wallet? ( sys-libs/db:$(db_ver_to_slot "${DB_VER}")=[cxx] )
43
	berkdb? ( sys-libs/db:$(db_ver_to_slot "${DB_VER}")=[cxx] )
38 44
	zeromq? ( net-libs/zeromq:= )
39 45
"
40
RDEPEND="${DEPEND}"
46
DEPEND="${RDEPEND}
47
	systemtap? ( dev-util/systemtap )
48
"
41 49
BDEPEND="
42
	>=sys-devel/autoconf-2.69
43 50
	>=sys-devel/automake-1.13
51
	|| ( >=sys-devel/gcc-7[cxx] >=sys-devel/clang-5 )
44 52
"
45 53

  
46 54
DOCS=(
......
50 58
	doc/files.md
51 59
	doc/JSON-RPC-interface.md
52 60
	doc/psbt.md
61
	doc/reduce-memory.md
53 62
	doc/reduce-traffic.md
54 63
	doc/release-notes.md
55 64
	doc/REST-interface.md
......
62 71
	if use knots; then
63 72
		elog "You are building ${PN} from Bitcoin Knots."
64 73
		elog "For more information, see:"
65
		elog "https://bitcoinknots.org/files/0.21.x/${KNOTS_PV}/${KNOTS_P}.desc.html"
74
		elog "https://bitcoinknots.org/files/22.x/${KNOTS_PV}/${KNOTS_P}.desc.html"
66 75
	else
67 76
		elog "You are building ${PN} from Bitcoin Core."
68 77
		elog "For more information, see:"
69
		elog "https://bitcoincore.org/en/2021/01/14/release-${PV}/"
78
		elog "https://bitcoincore.org/en/2021/09/13/release-${PV}/"
70 79
	fi
80
	elog
71 81
	elog "Replace By Fee policy is now always enabled by default: Your node will"
72 82
	elog "preferentially mine and relay transactions paying the highest fee, regardless"
73
	elog "of receive order. To disable RBF, set mempoolreplacement=never in bitcoin.conf"
83
	if use knots; then
84
		elog "of receive order. To disable RBF, set mempoolreplacement=never in bitcoin.conf"
85
	else  # Bitcoin Core doesn't support disabling RBF anymore
86
		elog "of receive order. To disable RBF, rebuild with USE=knots to get ${PN}"
87
		elog "from Bitcoin Knots, and set mempoolreplacement=never in bitcoin.conf"
88
	fi
89
	if has_version "<${CATEGORY}/${PN}-0.21.1" ; then
90
		ewarn "CAUTION: BITCOIN PROTOCOL CHANGE INCLUDED"
91
		ewarn "This release adds enforcement of the Taproot protocol change to the Bitcoin"
92
		ewarn "rules, beginning in November. Protocol changes require user consent to be"
93
		ewarn "effective, and if enforced inconsistently within the community may compromise"
94
		ewarn "your security or others! If you do not know what you are doing, learn more"
95
		ewarn "before November. (You must make a decision either way - simply not upgrading"
96
		ewarn "is insecure in all scenarios.)"
97
		ewarn "To learn more, see https://bitcointaproot.cc"
98
	fi
99

  
100
	if [[ ${MERGE_TYPE} != "binary" ]] ; then
101
		if ! test-flag-CXX -std=c++17 ; then
102
			die "Building ${CATEGORY}/${P} requires at least GCC 7 or Clang 5"
103
		fi
104
	fi
74 105
}
75 106

  
76 107
src_prepare() {
......
78 109

  
79 110
	local knots_patchdir="${WORKDIR}/${KNOTS_P}.patches/"
80 111

  
81
	eapply "${knots_patchdir}/${KNOTS_P}.syslibs.patch"
112
	eapply "${knots_patchdir}/${KNOTS_P}_p1-syslibs.patch"
82 113

  
83 114
	if use knots; then
84
		eapply "${knots_patchdir}/${KNOTS_P}.f.patch"
85
		eapply "${knots_patchdir}/${KNOTS_P}.branding.patch"
86
		eapply "${knots_patchdir}/${KNOTS_P}.ts.patch"
115
		eapply "${knots_patchdir}/${KNOTS_P}_p2-fixes.patch"
116
		eapply "${knots_patchdir}/${KNOTS_P}_p3-features.patch"
117
		eapply "${knots_patchdir}/${KNOTS_P}_p4-branding.patch"
118
		eapply "${knots_patchdir}/${KNOTS_P}_p5-ts.patch"
87 119
	fi
88 120

  
89
	eapply "${FILESDIR}/${PN}-0.20.1-boost-1.77-compat.patch"
90

  
91 121
	default
92 122

  
93
	echo '#!/bin/true' >share/genbuild.sh || die
94
	mkdir -p src/obj || die
95
	echo "#define BUILD_SUFFIX gentoo${PVR#${PV}}" >src/obj/build.h || die
96

  
97 123
	eautoreconf
98
	rm -r src/secp256k1 || die
99
	if use system-leveldb; then
100
		rm -r src/leveldb || die
101
	fi
124
	rm -r src/leveldb src/secp256k1 || die
102 125
}
103 126

  
104 127
src_configure() {
105 128
	local my_econf=(
106 129
		$(use_enable asm)
107 130
		--without-qtdbus
131
		$(use_enable systemtap ebpf)
132
		$(use_enable external-signer)
133
		$(use_with nat-pmp natpmp)
134
		$(use_with nat-pmp natpmp-default)
108 135
		--without-qrencode
109 136
		$(use_with upnp miniupnpc)
110 137
		$(use_enable upnp upnp-default)
......
114 141
		--with-daemon
115 142
		--disable-util-cli
116 143
		--disable-util-tx
144
		--disable-util-util
117 145
		--disable-util-wallet
118 146
		--disable-bench
119 147
		--without-libs
120 148
		--without-gui
121 149
		--disable-fuzz
150
		--disable-fuzz-binary
122 151
		--disable-ccache
123 152
		--disable-static
153
		$(use_with berkdb bdb)
124 154
		$(use_with sqlite)
125
		$(use_with system-leveldb)
155
		--with-system-leveldb
126 156
		--with-system-libsecp256k1
127 157
		--with-system-univalue
128 158
	)
Thank you!