1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 BITCOINCORE_COMMITHASH="58ba7c314d552cea8cb024960a8504577aee586f"
9 KNOTS_PV="${PV}.knots20200304"
10 KNOTS_P="bitcoin-${KNOTS_PV}"
12 DESCRIPTION="Bitcoin Core consensus library"
13 HOMEPAGE="https://bitcoincore.org/ https://bitcoinknots.org/"
15 https://github.com/bitcoin/bitcoin/archive/${BITCOINCORE_COMMITHASH}.tar.gz -> bitcoin-v${PV}.tar.gz
16 https://bitcoinknots.org/files/0.19.x/${KNOTS_PV}/${KNOTS_P}.patches.txz -> ${KNOTS_P}.patches.tar.xz
21 KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
22 IUSE="+asm knots libressl"
25 >dev-libs/libsecp256k1-0.1_pre20170321:=[recovery]
26 !libressl? ( dev-libs/openssl:0=[-bindist] )
27 libressl? ( dev-libs/libressl:0= )
31 DOCS=( doc/bips.md doc/release-notes.md doc/shared-libraries.md )
33 S="${WORKDIR}/bitcoin-${BITCOINCORE_COMMITHASH}"
37 elog "You are building ${PN} from Bitcoin Knots."
38 elog "For more information, see:"
39 elog "https://bitcoinknots.org/files/0.19.x/${KNOTS_PV}/${KNOTS_P}.desc.html"
41 elog "You are building ${PN} from Bitcoin Core."
42 elog "For more information, see:"
43 elog "https://bitcoincore.org/en/2020/03/04/release-${PV}/"
48 local knots_patchdir="${WORKDIR}/${KNOTS_P}.patches/"
50 eapply "${knots_patchdir}/${KNOTS_P}.syslibs.patch"
53 eapply "${knots_patchdir}/${KNOTS_P}.f.patch"
54 eapply "${knots_patchdir}/${KNOTS_P}.branding.patch"
55 eapply "${knots_patchdir}/${KNOTS_P}.ts.patch"
60 echo '#!/bin/true' >share/genbuild.sh || die
61 mkdir -p src/obj || die
62 echo "#define BUILD_SUFFIX gentoo${PVR#${PV}}" >src/obj/build.h || die
65 rm -r src/leveldb src/secp256k1 || die
88 --with-system-libsecp256k1
90 econf "${my_econf[@]}"
96 find "${D}" -name '*.la' -delete || die