[packages/bitcoin] fix build with current libunivalue (from debian)

atler atler at pld-linux.org
Sun Aug 15 23:27:10 CEST 2021


commit a0ab82736cb5deac41d464d883dbb8bc5b65ded3
Author: Jan Palus <atler at pld-linux.org>
Date:   Sun Aug 15 23:26:38 2021 +0200

    fix build with current libunivalue (from debian)

 bitcoin.spec   |  2 ++
 univalue.patch | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+)
---
diff --git a/bitcoin.spec b/bitcoin.spec
index c53ec59..53cebd7 100644
--- a/bitcoin.spec
+++ b/bitcoin.spec
@@ -11,6 +11,7 @@ Group:		X11/Applications
 Source0:	https://bitcoin.org/bin/bitcoin-core-%{version}/bitcoin-%{version}.tar.gz
 # Source0-md5:	46e632b4f42a5162e6f100a01cf4ee00
 Patch0:		qt-5.15.patch
+Patch1:		univalue.patch
 URL:		http://www.bitcoin.org/
 BuildRequires:	Qt5Core-devel >= 5.0
 BuildRequires:	Qt5DBus-devel >= 5.0
@@ -88,6 +89,7 @@ Portfel na bitcoiny oparty na Qt.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
diff --git a/univalue.patch b/univalue.patch
new file mode 100644
index 0000000..d0928c0
--- /dev/null
+++ b/univalue.patch
@@ -0,0 +1,19 @@
+Description: fix convert atomic to non-atomic integer for UniValue
+ Fixes Bitcoin 0.20.1 build failure when linked with mainline UniValue:
+ rpc/blockchain.cpp:2077:35: error: cannot convert 'std::atomic<int>' to 'const UniValue&'
+Author: Jonas Smedegaard <dr at jones.dk>
+License: Expat
+Last-Update: 2020-11-26
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/rpc/blockchain.cpp
++++ b/src/rpc/blockchain.cpp
+@@ -2187,7 +2187,7 @@
+             // no scan in progress
+             return NullUniValue;
+         }
+-        result.pushKV("progress", g_scan_progress);
++        result.pushKV("progress", (int)g_scan_progress);
+         return result;
+     } else if (request.params[0].get_str() == "abort") {
+         CoinsViewScanReserver reserver;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/bitcoin.git/commitdiff/a0ab82736cb5deac41d464d883dbb8bc5b65ded3



More information about the pld-cvs-commit mailing list