commit b649d3ae98308e91ad2366b75b604ff817aa2cb7
Author: Jakub Bogusz <[email protected]>
Date:   Sun Sep 22 21:41:36 2024 +0200

    - updated to 27.0 + patch for miniupnpc API 18

 bitcoin-miniupnpc.patch | 14 ++++++++++++++
 bitcoin.spec            | 38 +++++++++++++++++++++++---------------
 includes.patch          | 30 ------------------------------
 univalue.patch          | 19 -------------------
 4 files changed, 37 insertions(+), 64 deletions(-)
---
diff --git a/bitcoin.spec b/bitcoin.spec
index f2e4348..c99d1a1 100644
--- a/bitcoin.spec
+++ b/bitcoin.spec
@@ -1,18 +1,21 @@
 # TODO: Readd missing icons/*.destktop deleted from contrib/debian during 
0.14.0 -> 0.14.2
 # TODO: Consider running as system-wide service (check contrib/init) with own 
user/group
+#
+# Conditional build:
+%bcond_with    ccache  # ccache for build speedup
+
 Summary:       Bitcoin is a peer-to-peer currency
 Summary(pl.UTF-8):     Bitcoin - waluta peer-to-peer
 Name:          bitcoin
-Version:       22.0
-Release:       4
+Version:       27.0
+Release:       1
 License:       MIT
 Group:         X11/Applications
 # Source0:     
https://github.com/bitcoin/bitcoin/archive/v%{version}/%{name}-%{version}.tar.gz
 Source0:       
https://bitcoin.org/bin/bitcoin-core-%{version}/bitcoin-%{version}.tar.gz
-# Source0-md5: f822f7e798fbdc36e8fc18b355ab446d
-Patch0:                includes.patch
-Patch1:                univalue.patch
-URL:           http://www.bitcoin.org/
+# Source0-md5: 0850dc36e811ad780123f12083974a5f
+Patch0:                %{name}-miniupnpc.patch
+URL:           https://bitcoin.org/
 BuildRequires: Qt5Core-devel >= 5.0
 BuildRequires: Qt5DBus-devel >= 5.0
 BuildRequires: Qt5Gui-devel >= 5.0
@@ -21,21 +24,28 @@ BuildRequires:      Qt5Widgets-devel >= 5.0
 BuildRequires: autoconf >= 2.69
 BuildRequires: automake >= 1:1.13
 BuildRequires: boost-devel >= 1.49
+%{?with_ccache:BuildRequires:  ccache}
 BuildRequires: db-cxx-devel >= 4.8
 BuildRequires: gettext-tools
-BuildRequires: libevent-devel >= 2
+BuildRequires: libevent-devel >= 2.1.8
+BuildRequires: libmultiprocess-devel
+BuildRequires: libnatpmp-devel
 # -std=c++11
 BuildRequires: libstdc++-devel >= 6:4.7
 BuildRequires: libtool >= 2:2
-BuildRequires: libunivalue-devel >= 1.0.4
-BuildRequires: miniupnpc-devel >= 1.5
+# bundled library is used as of 27.x
+#BuildRequires:        libunivalue-devel >= 1.0.4
+# API >= 17
+BuildRequires: miniupnpc-devel >= 2.1
 BuildRequires: openssl-devel
 BuildRequires: pkgconfig
 BuildRequires: protobuf-devel
 BuildRequires: python3 >= 1:3.5
 BuildRequires: qrencode-devel
+BuildRequires: sqlite3-devel >= 3.7.17
 BuildRequires: zeromq-devel >= 4
-Requires:      libunivalue >= 1.0.4
+Requires:      libevent >= 2.1.8
+#Requires:     libunivalue >= 1.0.4
 Requires:      perl-base
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -89,7 +99,6 @@ Portfel na bitcoiny oparty na Qt.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
 
 %build
 %{__libtoolize}
@@ -101,18 +110,17 @@ cd src/secp256k1
 %{__libtoolize}
 %{__aclocal} -I build-aux/m4
 %{__autoconf}
-%{__autoheader}
 %{__automake}
 cd ../..
 %configure \
+       %{!?with_ccache:--disable-ccache} \
        --disable-silent-rules \
        --with-boost \
-       --with-gui=qt4 \
+       --with-gui=qt5 \
        --with-incompatible-bdb \
        --with-miniupnpc \
        --with-qrencode \
-       --with-qtdbus \
-       --with-system-univalue
+       --with-qtdbus
 
 %{__make}
 
diff --git a/bitcoin-miniupnpc.patch b/bitcoin-miniupnpc.patch
new file mode 100644
index 0000000..61296f2
--- /dev/null
+++ b/bitcoin-miniupnpc.patch
@@ -0,0 +1,14 @@
+--- bitcoin-27.0/src/mapport.cpp.orig  2024-09-22 19:47:34.086129582 +0200
++++ bitcoin-27.0/src/mapport.cpp       2024-09-22 19:47:36.999480228 +0200
+@@ -164,7 +164,11 @@ static bool ProcessUpnp()
+     struct IGDdatas data;
+     int r;
+ 
++#if MINIUPNPC_API_VERSION < 18
+     r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
++#else
++    r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr), 
NULL, 0);
++#endif
+     if (r == 1)
+     {
+         if (fDiscover) {
diff --git a/includes.patch b/includes.patch
deleted file mode 100644
index 110760c..0000000
--- a/includes.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- bitcoin-22.0/src/support/lockedpool.cpp.orig       2021-09-08 
20:16:07.000000000 +0200
-+++ bitcoin-22.0/src/support/lockedpool.cpp    2023-07-04 11:29:13.358676698 
+0200
-@@ -26,6 +26,7 @@
- #include <iomanip>
- #include <iostream>
- #endif
-+#include <stdexcept>
- 
- LockedPoolManager* LockedPoolManager::_instance = nullptr;
- 
---- bitcoin-22.0/src/util/bip32.h.orig 2021-09-08 20:16:07.000000000 +0200
-+++ bitcoin-22.0/src/util/bip32.h      2023-07-04 11:31:38.309474568 +0200
-@@ -6,6 +6,7 @@
- #define BITCOIN_UTIL_BIP32_H
- 
- #include <attributes.h>
-+#include <cstdint>
- #include <string>
- #include <vector>
- 
---- bitcoin-22.0/src/util/string.h.orig        2021-09-08 20:16:07.000000000 
+0200
-+++ bitcoin-22.0/src/util/string.h     2023-07-04 11:34:16.117022848 +0200
-@@ -9,6 +9,7 @@
- 
- #include <algorithm>
- #include <array>
-+#include <cstdint>
- #include <cstring>
- #include <locale>
- #include <sstream>
diff --git a/univalue.patch b/univalue.patch
deleted file mode 100644
index d0928c0..0000000
--- a/univalue.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-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 <[email protected]>
-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/b649d3ae98308e91ad2366b75b604ff817aa2cb7

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to