From 90da91792ae2bce3253c589170da6c90301e87b3 Mon Sep 17 00:00:00 2001 From: "Daniel A. Maierhofer" Date: Mon, 29 May 2023 10:29:12 +0200 Subject: [PATCH] bitcoin: update to 25.0. --- srcpkgs/bitcoin-devel | 1 + srcpkgs/bitcoin-qt | 1 + srcpkgs/bitcoin/patches/fix-test.patch | 22 ++++++++ srcpkgs/bitcoin/template | 71 ++++++++++++++++++++++++++ srcpkgs/bitcoin/update | 2 + 5 files changed, 97 insertions(+) create mode 120000 srcpkgs/bitcoin-devel create mode 120000 srcpkgs/bitcoin-qt create mode 100644 srcpkgs/bitcoin/patches/fix-test.patch create mode 100644 srcpkgs/bitcoin/template create mode 100644 srcpkgs/bitcoin/update diff --git a/srcpkgs/bitcoin-devel b/srcpkgs/bitcoin-devel new file mode 120000 index 00000000000..f3c13956326 --- /dev/null +++ b/srcpkgs/bitcoin-devel @@ -0,0 +1 @@ +bitcoin \ No newline at end of file diff --git a/srcpkgs/bitcoin-qt b/srcpkgs/bitcoin-qt new file mode 120000 index 00000000000..f3c13956326 --- /dev/null +++ b/srcpkgs/bitcoin-qt @@ -0,0 +1 @@ +bitcoin \ No newline at end of file diff --git a/srcpkgs/bitcoin/patches/fix-test.patch b/srcpkgs/bitcoin/patches/fix-test.patch new file mode 100644 index 00000000000..0004fd7358a --- /dev/null +++ b/srcpkgs/bitcoin/patches/fix-test.patch @@ -0,0 +1,22 @@ +Index: bitcoin-22.0/src/wallet/test/init_tests.cpp +=================================================================== +--- bitcoin-22.0.orig/src/wallet/test/init_tests.cpp ++++ bitcoin-22.0/src/wallet/test/init_tests.cpp +@@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE(walletinit_verify_w + BOOST_CHECK(result == true); + fs::path walletdir = gArgs.GetArg("-walletdir", ""); + fs::path expected_path = fs::canonical(m_walletdir_path_cases["default"]); +- BOOST_CHECK_EQUAL(walletdir, expected_path); ++ BOOST_TEST(fs::equivalent(walletdir, expected_path)); + } + + BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_no_trailing2) +@@ -79,7 +79,7 @@ BOOST_AUTO_TEST_CASE(walletinit_verify_w + BOOST_CHECK(result == true); + fs::path walletdir = gArgs.GetArg("-walletdir", ""); + fs::path expected_path = fs::canonical(m_walletdir_path_cases["default"]); +- BOOST_CHECK_EQUAL(walletdir, expected_path); ++ BOOST_TEST(fs::equivalent(walletdir, expected_path)); + } + + BOOST_AUTO_TEST_SUITE_END() diff --git a/srcpkgs/bitcoin/template b/srcpkgs/bitcoin/template new file mode 100644 index 00000000000..271f3edaad7 --- /dev/null +++ b/srcpkgs/bitcoin/template @@ -0,0 +1,71 @@ +# Template file for 'bitcoin' +pkgname=bitcoin +version=25.0 +revision=1 +build_style=gnu-configure +configure_args="--with-incompatible-bdb --disable-ccache --disable-static + --enable-hardening --with-boost=${XBPS_CROSS_BASE}/usr --with-gui" +hostmakedepends="automake libtool pkg-config yasm" +makedepends="db-devel boost-devel miniupnpc-devel qt5-tools-devel + libevent-devel qrencode-devel sqlite-devel" +short_desc="Bitcoin is a peer-to-peer network based digital currency" +maintainer="Daniel A. Maierhofer " +license="MIT" +homepage="https://bitcoincore.org/" +distfiles="https://bitcoincore.org/bin/bitcoin-core-${version}/bitcoin-${version}.tar.gz + https://raw.githubusercontent.com/bitcoin-core/packaging/main/debian/bitcoin-qt.desktop + https://raw.githubusercontent.com/bitcoin/bitcoin/v${version}/share/pixmaps/bitcoin128.png" +checksum="5df67cf42ca3b9a0c38cdafec5bbb517da5b58d251f32c8d2a47511f9be1ebc2 + 0a46bbadda140599e807be38999e6848c89f9c3523d26fede02d34d62d50f632 + ad880c8459ecfdb96abe6a4689af06bdd27906e0edcd39d0915482f2da91e722" +conflicts="litecoin" # Both provide libbitcoinconsensus.so.0 +skip_extraction="bitcoin-qt.desktop bitcoin128.png" + +if [ "$CROSS_BUILD" ]; then + hostmakedepends+=" qt5-host-tools" +fi + +pre_configure() { + autoreconf -fi + case "$XBPS_TARGET_MACHINE" in + aarch64*) + CFLAGS=${CFLAGS/armv8-a/armv8-a+crc+crypto} + CXXFLAGS=${CXXFLAGS/armv8-a/armv8-a+crc+crypto} + ;; + esac +} + +pre_build() { + export BITCOIN_GENBUILD_NO_GIT=1 +} + +post_install() { + rm "${DESTDIR}"/usr/bin/{test,bench}_bitcoin + + vlicense COPYING +} + +bitcoin-devel_package() { + depends="${sourcepkg}>=${version}_${revision}" + conflicts="litecoin" # Both provide libbitcoinconsensus.so.0 + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.so" + vdoc doc/shared-libraries.md # Provides information on libbitcoinconsensus + } +} + +bitcoin-qt_package() { + depends="desktop-file-utils" + short_desc+=" - QT GUI" + pkg_install() { + vmove usr/bin/bitcoin-qt + vmove usr/share/man/man1/bitcoin-qt.1 + vinstall ${XBPS_SRCDISTDIR}/${sourcepkg}-${version}/bitcoin-qt.desktop 644 usr/share/applications + vinstall ${XBPS_SRCDISTDIR}/${sourcepkg}-${version}/bitcoin128.png 644 usr/share/pixmaps + vlicense COPYING + rm "${DESTDIR}"/usr/bin/test_bitcoin-qt + } +} diff --git a/srcpkgs/bitcoin/update b/srcpkgs/bitcoin/update new file mode 100644 index 00000000000..b28ea45c089 --- /dev/null +++ b/srcpkgs/bitcoin/update @@ -0,0 +1,2 @@ +site="https://bitcoin.org/bin/" +pattern='bitcoin-core-\K[\d.]+'