From aa7e6b47770ba0b3c506ef14a8a1b019c26d1188 Mon Sep 17 00:00:00 2001 From: Nathan Owens Date: Sun, 8 Nov 2020 15:05:03 -0600 Subject: [PATCH] bitcoin: update to 0.20.1 --- srcpkgs/bitcoin/patches/aarch64.patch | 91 +++++++++++++++++++++++++++ srcpkgs/bitcoin/patches/qt5.15.patch | 10 --- srcpkgs/bitcoin/template | 19 ++++-- 3 files changed, 104 insertions(+), 16 deletions(-) create mode 100644 srcpkgs/bitcoin/patches/aarch64.patch delete mode 100644 srcpkgs/bitcoin/patches/qt5.15.patch diff --git a/srcpkgs/bitcoin/patches/aarch64.patch b/srcpkgs/bitcoin/patches/aarch64.patch new file mode 100644 index 00000000000..56df7e78629 --- /dev/null +++ b/srcpkgs/bitcoin/patches/aarch64.patch @@ -0,0 +1,91 @@ +From 14337d0d80b5a4cb2674a8a3a44dfb7b30370c70 Mon Sep 17 00:00:00 2001 +From: Luke Dashjr +Date: Sat, 28 Jul 2018 19:32:41 +0000 +Subject: [PATCH] crypto/sha256: Use pragmas to enforce necessary intrinsics + for GCC and Clang + +This avoids problems when the user specifies CXXFLAGS explicitly disabling the relevant optimisations. +--- + src/crypto/sha256_avx2.cpp | 10 ++++++++++ + src/crypto/sha256_shani.cpp | 10 ++++++++++ + src/crypto/sha256_sse41.cpp | 10 ++++++++++ + 3 files changed, 30 insertions(+) + +diff --git src/crypto/sha256_avx2.cpp src/crypto/sha256_avx2.cpp +index 624bdb42e474..adddf4338a71 100644 +--- src/crypto/sha256_avx2.cpp ++++ src/crypto/sha256_avx2.cpp +@@ -9,6 +9,12 @@ + + #include + ++#if defined(__clang__) ++#pragma clang attribute push(__attribute__((__target__("avx,avx2"))), apply_to = function) ++#elif defined(__GNUC__) ++#pragma GCC target ("avx,avx2") ++#endif ++ + namespace sha256d64_avx2 { + namespace { + +@@ -325,4 +331,8 @@ void Transform_8way(unsigned char* out, const unsigned char* in) + + } + ++#if defined(__clang__) ++#pragma clang attribute pop ++#endif ++ + #endif +diff --git src/crypto/sha256_shani.cpp src/crypto/sha256_shani.cpp +index 3473f6e39f34..42957a9e1e35 100644 +--- src/crypto/sha256_shani.cpp ++++ src/crypto/sha256_shani.cpp +@@ -11,6 +11,12 @@ + #include + #include + ++#if defined(__clang__) ++#pragma clang attribute push(__attribute__((__target__("sse4,sha"))), apply_to = function) ++#elif defined(__GNUC__) ++#pragma GCC target ("sse4,sha") ++#endif ++ + namespace { + + alignas(__m128i) const uint8_t MASK[16] = {0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04, 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c}; +@@ -353,4 +359,8 @@ void Transform_2way(unsigned char* out, const unsigned char* in) + + } + ++#if defined(__clang__) ++#pragma clang attribute pop ++#endif ++ + #endif +diff --git src/crypto/sha256_sse41.cpp src/crypto/sha256_sse41.cpp +index 4eaf7d7b188c..000132fcf6f2 100644 +--- src/crypto/sha256_sse41.cpp ++++ src/crypto/sha256_sse41.cpp +@@ -9,6 +9,12 @@ + + #include + ++#if defined(__clang__) ++#pragma clang attribute push(__attribute__((__target__("sse4.1"))), apply_to = function) ++#elif defined(__GNUC__) ++#pragma GCC target ("sse4.1") ++#endif ++ + namespace sha256d64_sse41 { + namespace { + +@@ -317,4 +323,8 @@ void Transform_4way(unsigned char* out, const unsigned char* in) + + } + ++#if defined(__clang__) ++#pragma clang attribute pop ++#endif ++ + #endif diff --git a/srcpkgs/bitcoin/patches/qt5.15.patch b/srcpkgs/bitcoin/patches/qt5.15.patch deleted file mode 100644 index adfe3604717..00000000000 --- a/srcpkgs/bitcoin/patches/qt5.15.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/qt/trafficgraphwidget.cpp 2020-03-04 13:13:02.000000000 +0100 -+++ - 2020-07-02 17:58:16.576242713 +0200 -@@ -6,6 +6,7 @@ - #include - #include - -+#include - #include - #include - #include diff --git a/srcpkgs/bitcoin/template b/srcpkgs/bitcoin/template index df1ab218e16..2ba79d5a2c3 100644 --- a/srcpkgs/bitcoin/template +++ b/srcpkgs/bitcoin/template @@ -1,13 +1,14 @@ # Template file for 'bitcoin' pkgname=bitcoin -version=0.19.1 -revision=3 +version=0.20.1 +revision=1 build_style=gnu-configure configure_args="--with-incompatible-bdb --disable-ccache --disable-static --enable-hardening --with-boost=${XBPS_CROSS_BASE}/usr" -hostmakedepends="pkg-config yasm protobuf" -makedepends="db-devel protobuf-devel libprotoc-devel boost-devel +hostmakedepends="pkg-config yasm autoconf automake libtool" +makedepends="db-devel boost-devel miniupnpc-devel libevent-devel qrencode-devel libatomic-devel" +depends="desktop-file-utils" short_desc="Bitcoin is a peer-to-peer network based digital currency" maintainer="Orphaned " license="MIT" @@ -15,7 +16,7 @@ homepage="https://bitcoin.org/" distfiles="https://bitcoin.org/bin/bitcoin-core-${version}/bitcoin-${version}.tar.gz https://raw.github.com/bitcoin-core/packaging/master/debian/bitcoin-qt.desktop https://raw.github.com/bitcoin/bitcoin/v${version}/share/pixmaps/bitcoin128.png" -checksum="f2591d555b8e8c2e1bd780e40d53a91e165d8b3c7e0391ae2d24a0c0f23a7cc0 +checksum="4bbd62fd6acfa5e9864ebf37a24a04bc2dcfe3e3222f056056288d854c53b978 0a46bbadda140599e807be38999e6848c89f9c3523d26fede02d34d62d50f632 ad880c8459ecfdb96abe6a4689af06bdd27906e0edcd39d0915482f2da91e722" conflicts="litecoin>=0" # Both provide libbitcoinconsensus.so.0 @@ -29,11 +30,17 @@ if [ -z "$CROSS_BUILD" ]; then subpackages+=" bitcoin-qt" fi +export BITCOIN_GENBUILD_NO_GIT=1 + +pre_configure() { + autoreconf -fi +} + post_install() { rm "${DESTDIR}"/usr/bin/{test,bench}_bitcoin for b in bitcoind bitcoin-cli bitcoin-tx; do - vinstall contrib/${b}.bash-completion 644 usr/share/bash-completion $b + vcompletion contrib/${b}.bash-completion bash "$b" done vlicense COPYING