Diff libbitcoinconsensus-0.21.0 with a libbitcoinconsensus-22.0

/usr/portage/net-libs/libbitcoinconsensus/libbitcoinconsensus-22.0.ebuild 2023-10-09 14:52:34.476368476 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=7
5 5

  
6
inherit autotools
6
inherit autotools flag-o-matic
7 7

  
8
BITCOINCORE_COMMITHASH="95ea54ba089610019a74c1176a2c7c0dba144b1c"
9
KNOTS_PV="${PV}.knots20210130"
8
BITCOINCORE_COMMITHASH="a0988140b71485ad12c3c3a4a9573f7c21b1eff8"
9
KNOTS_PV="${PV}.knots20211108"
10 10
KNOTS_P="bitcoin-${KNOTS_PV}"
11 11

  
12 12
DESCRIPTION="Bitcoin Core consensus library"
13 13
HOMEPAGE="https://bitcoincore.org/ https://bitcoinknots.org/"
14 14
SRC_URI="
15 15
	https://github.com/bitcoin/bitcoin/archive/${BITCOINCORE_COMMITHASH}.tar.gz -> bitcoin-v${PV}.tar.gz
16
	https://bitcoinknots.org/files/$(ver_cut 1-2).x/${KNOTS_PV}/${KNOTS_P}.patches.txz -> ${KNOTS_P}.patches.tar.xz
16
	https://bitcoinknots.org/files/$(ver_cut 1).x/${KNOTS_PV}/${KNOTS_P}.patches.txz -> ${KNOTS_P}.patches.tar.xz
17 17
"
18 18

  
19 19
LICENSE="MIT"
......
21 21
KEYWORDS="amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
22 22
IUSE="+asm knots"
23 23

  
24
DEPEND="
24
RDEPEND="
25 25
	>dev-libs/libsecp256k1-0.1_pre20200911:=[recovery,schnorr]
26 26
"
27
RDEPEND="${DEPEND}"
27
DEPEND="${RDEPEND}"
28 28
BDEPEND="
29
	>=sys-devel/autoconf-2.69
30 29
	>=sys-devel/automake-1.13
30
	|| ( >=sys-devel/gcc-7[cxx] >=sys-devel/clang-5 )
31 31
"
32 32

  
33 33
DOCS=( doc/bips.md doc/release-notes.md doc/shared-libraries.md )
......
38 38
	if use knots; then
39 39
		elog "You are building ${PN} from Bitcoin Knots."
40 40
		elog "For more information, see:"
41
		elog "https://bitcoinknots.org/files/0.21.x/${KNOTS_PV}/${KNOTS_P}.desc.html"
41
		elog "https://bitcoinknots.org/files/22.x/${KNOTS_PV}/${KNOTS_P}.desc.html"
42 42
	else
43 43
		elog "You are building ${PN} from Bitcoin Core."
44 44
		elog "For more information, see:"
45
		elog "https://bitcoincore.org/en/2021/01/14/release-${PV}/"
45
		elog "https://bitcoincore.org/en/2021/09/13/release-${PV}/"
46
	fi
47
	if has_version "<${CATEGORY}/${PN}-0.21.1" ; then
48
		ewarn "CAUTION: BITCOIN PROTOCOL CHANGE INCLUDED"
49
		ewarn "This release adds enforcement of the Taproot protocol change to the Bitcoin"
50
		ewarn "rules, beginning in November. Protocol changes require user consent to be"
51
		ewarn "effective, and if enforced inconsistently within the community may compromise"
52
		ewarn "your security or others! If you do not know what you are doing, learn more"
53
		ewarn "before November. (You must make a decision either way - simply not upgrading"
54
		ewarn "is insecure in all scenarios.)"
55
		ewarn "To learn more, see https://bitcointaproot.cc"
56
	fi
57

  
58
	if [[ ${MERGE_TYPE} != "binary" ]] ; then
59
		if ! test-flag-CXX -std=c++17 ; then
60
			die "Building ${CATEGORY}/${P} requires at least GCC 7 or Clang 5"
61
		fi
46 62
	fi
47 63
}
48 64

  
49 65
src_prepare() {
50 66
	local knots_patchdir="${WORKDIR}/${KNOTS_P}.patches/"
51 67

  
52
	eapply "${knots_patchdir}/${KNOTS_P}.syslibs.patch"
68
	eapply "${knots_patchdir}/${KNOTS_P}_p1-syslibs.patch"
53 69

  
54 70
	if use knots; then
55
		eapply "${knots_patchdir}/${KNOTS_P}.f.patch"
56
		eapply "${knots_patchdir}/${KNOTS_P}.branding.patch"
57
		eapply "${knots_patchdir}/${KNOTS_P}.ts.patch"
71
		eapply "${knots_patchdir}/${KNOTS_P}_p2-fixes.patch"
72
		eapply "${knots_patchdir}/${KNOTS_P}_p3-features.patch"
73
		eapply "${knots_patchdir}/${KNOTS_P}_p4-branding.patch"
74
		eapply "${knots_patchdir}/${KNOTS_P}_p5-ts.patch"
58 75
	fi
59 76

  
60
	eapply_user
61

  
62
	echo '#!/bin/true' >share/genbuild.sh || die
63
	mkdir -p src/obj || die
64
	echo "#define BUILD_SUFFIX gentoo${PVR#${PV}}" >src/obj/build.h || die
77
	default
65 78

  
66 79
	eautoreconf
67 80
	rm -r src/leveldb src/secp256k1 || die
......
71 84
	local my_econf=(
72 85
		$(use_enable asm)
73 86
		--without-qtdbus
87
		--disable-ebpf
88
		--without-natpmp
74 89
		--without-qrencode
75 90
		--without-miniupnpc
76 91
		--disable-tests
......
79 94
		--with-libs
80 95
		--disable-util-cli
81 96
		--disable-util-tx
97
		--disable-util-util
82 98
		--disable-util-wallet
83 99
		--disable-bench
84 100
		--without-daemon
85 101
		--without-gui
86 102
		--disable-fuzz
103
		--disable-fuzz-binary
87 104
		--disable-ccache
88 105
		--disable-static
89 106
		--with-system-libsecp256k1
Thank you!