* [gentoo-commits] repo/gentoo:master commit in: net-p2p/bitcoin-core/files/, net-p2p/bitcoin-core/
@ 2024-08-08 11:08 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2024-08-08 11:08 UTC (permalink / raw
To: gentoo-commits
commit: 045c6968dbaa67827b95a371e125c78ceebd1b12
Author: Matt Whitlock <gentoo <AT> mattwhitlock <DOT> name>
AuthorDate: Thu Aug 8 08:06:53 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Aug 8 11:07:52 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=045c6968
net-p2p/bitcoin-core: patch for GCC 15 compatibility
Closes: https://bugs.gentoo.org/937531
Signed-off-by: Matt Whitlock <gentoo <AT> mattwhitlock.name>
Closes: https://github.com/gentoo/gentoo/pull/38015
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-p2p/bitcoin-core/bitcoin-core-25.1-r2.ebuild | 1 +
net-p2p/bitcoin-core/bitcoin-core-25.2.ebuild | 1 +
net-p2p/bitcoin-core/bitcoin-core-26.0-r1.ebuild | 1 +
net-p2p/bitcoin-core/bitcoin-core-26.1.ebuild | 1 +
net-p2p/bitcoin-core/bitcoin-core-26.2.ebuild | 1 +
net-p2p/bitcoin-core/bitcoin-core-27.0.ebuild | 2 +
net-p2p/bitcoin-core/bitcoin-core-27.1.ebuild | 2 +
net-p2p/bitcoin-core/files/25.0-gcc15.patch | 37 ++++++++++++++
net-p2p/bitcoin-core/files/27.0-gcc15.patch | 61 ++++++++++++++++++++++++
9 files changed, 107 insertions(+)
diff --git a/net-p2p/bitcoin-core/bitcoin-core-25.1-r2.ebuild b/net-p2p/bitcoin-core/bitcoin-core-25.1-r2.ebuild
index 52a3f31055e3..775041e6ebdd 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-25.1-r2.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-25.1-r2.ebuild
@@ -95,6 +95,7 @@ DOCS=(
PATCHES=(
"${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch"
+ "${FILESDIR}/25.0-gcc15.patch"
"${FILESDIR}/25.0-syslibs.patch"
"${FILESDIR}/init.patch"
)
diff --git a/net-p2p/bitcoin-core/bitcoin-core-25.2.ebuild b/net-p2p/bitcoin-core/bitcoin-core-25.2.ebuild
index d3b23526e37c..a5bf6b1f0433 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-25.2.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-25.2.ebuild
@@ -96,6 +96,7 @@ DOCS=(
PATCHES=(
"${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch"
+ "${FILESDIR}/25.0-gcc15.patch"
"${FILESDIR}/25.0-syslibs.patch"
"${FILESDIR}/init.patch"
)
diff --git a/net-p2p/bitcoin-core/bitcoin-core-26.0-r1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-26.0-r1.ebuild
index 27e0238e5b62..c89c35852110 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-26.0-r1.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-26.0-r1.ebuild
@@ -95,6 +95,7 @@ DOCS=(
PATCHES=(
"${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch"
+ "${FILESDIR}/25.0-gcc15.patch"
"${FILESDIR}/26.0-syslibs.patch"
"${FILESDIR}/26.0-init.patch"
)
diff --git a/net-p2p/bitcoin-core/bitcoin-core-26.1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-26.1.ebuild
index 5327852ba303..f134e690a97a 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-26.1.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-26.1.ebuild
@@ -96,6 +96,7 @@ DOCS=(
PATCHES=(
"${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch"
+ "${FILESDIR}/25.0-gcc15.patch"
"${FILESDIR}/26.0-syslibs.patch"
"${FILESDIR}/26.0-init.patch"
)
diff --git a/net-p2p/bitcoin-core/bitcoin-core-26.2.ebuild b/net-p2p/bitcoin-core/bitcoin-core-26.2.ebuild
index 8c33bb9af0a7..96303f672e91 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-26.2.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-26.2.ebuild
@@ -94,6 +94,7 @@ DOCS=(
)
PATCHES=(
+ "${FILESDIR}/25.0-gcc15.patch"
"${FILESDIR}/26.0-syslibs.patch"
"${FILESDIR}/26.0-init.patch"
)
diff --git a/net-p2p/bitcoin-core/bitcoin-core-27.0.ebuild b/net-p2p/bitcoin-core/bitcoin-core-27.0.ebuild
index f35da4dc4869..d29c9e015a1c 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-27.0.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-27.0.ebuild
@@ -96,6 +96,8 @@ DOCS=(
PATCHES=(
"${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch"
+ "${FILESDIR}/25.0-gcc15.patch"
+ "${FILESDIR}/27.0-gcc15.patch"
"${FILESDIR}/27.0-syslibs.patch"
"${FILESDIR}/26.0-init.patch"
)
diff --git a/net-p2p/bitcoin-core/bitcoin-core-27.1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-27.1.ebuild
index 9ee8d0810153..019dc6f4fbf1 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-27.1.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-27.1.ebuild
@@ -96,6 +96,8 @@ DOCS=(
PATCHES=(
"${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch"
+ "${FILESDIR}/25.0-gcc15.patch"
+ "${FILESDIR}/27.0-gcc15.patch"
"${FILESDIR}/27.0-syslibs.patch"
"${FILESDIR}/26.0-init.patch"
)
diff --git a/net-p2p/bitcoin-core/files/25.0-gcc15.patch b/net-p2p/bitcoin-core/files/25.0-gcc15.patch
new file mode 100644
index 000000000000..f63b23a8a3e3
--- /dev/null
+++ b/net-p2p/bitcoin-core/files/25.0-gcc15.patch
@@ -0,0 +1,37 @@
+From 74eebed6491d38d9c076bebc99d073cdd129003a Mon Sep 17 00:00:00 2001
+From: Matt Whitlock <bitcoin@mattwhitlock.name>
+Date: Wed, 7 Aug 2024 22:04:40 -0400
+Subject: [PATCH] add missing #include <cstdint> for GCC 15
+
+---
+ src/chainparamsbase.h | 1 +
+ src/node/interface_ui.h | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
+index d593cff722..09751b12b9 100644
+--- a/src/chainparamsbase.h
++++ b/src/chainparamsbase.h
+@@ -5,6 +5,7 @@
+ #ifndef BITCOIN_CHAINPARAMSBASE_H
+ #define BITCOIN_CHAINPARAMSBASE_H
+
++#include <cstdint>
+ #include <memory>
+ #include <string>
+
+diff --git a/src/node/interface_ui.h b/src/node/interface_ui.h
+index 22c241cb78..f0c804b7cf 100644
+--- a/src/node/interface_ui.h
++++ b/src/node/interface_ui.h
+@@ -6,6 +6,7 @@
+ #ifndef BITCOIN_NODE_INTERFACE_UI_H
+ #define BITCOIN_NODE_INTERFACE_UI_H
+
++#include <cstdint>
+ #include <functional>
+ #include <memory>
+ #include <string>
+--
+2.45.2
+
diff --git a/net-p2p/bitcoin-core/files/27.0-gcc15.patch b/net-p2p/bitcoin-core/files/27.0-gcc15.patch
new file mode 100644
index 000000000000..ab6c3df388fa
--- /dev/null
+++ b/net-p2p/bitcoin-core/files/27.0-gcc15.patch
@@ -0,0 +1,61 @@
+From e866aecd9b5697aee1291bc4daf48d09824804d4 Mon Sep 17 00:00:00 2001
+From: Matt Whitlock <bitcoin@mattwhitlock.name>
+Date: Wed, 7 Aug 2024 21:14:28 -0400
+Subject: [PATCH] policy/feerate.h: avoid constraint self-dependency
+
+In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/format:48,
+ from /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/chrono_io.h:39,
+ from /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/chrono:3362,
+ from ./util/time.h:9,
+ from ./primitives/block.h:12,
+ from ./blockencodings.h:8,
+ from blockencodings.cpp:5:
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/type_traits: In substitution of 'template<class _Up> requires !(is_same_v<std::optional<_Tp>, typename std::remove_cvref<_It2>::type>) && (is_constructible_v<_Tp, const _Up&>) && (__construct_from_contained_value<_Up, typename std::remove_cv< <template-parameter-1-1> >::type>) constexpr std::optional<CFeeRate>::optional(const std::optional<_Tp>&) [with _Up = CFeeRate]':
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/type_traits:1140:25: required by substitution of 'template<class _Tp, class ... _Args> using std::__is_constructible_impl = std::__bool_constant<__is_constructible(_Tp, _Args ...)> [with _Tp = CFeeRate; _Args = {std::optional<CFeeRate>&}]'
+ 1140 | = __bool_constant<__is_constructible(_Tp, _Args...)>;
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/type_traits:1145:12: required from 'struct std::is_constructible<CFeeRate, std::optional<CFeeRate>&>'
+ 1145 | struct is_constructible
+ | ^~~~~~~~~~~~~~~~
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/type_traits:178:35: required by substitution of 'template<class ... _Bn> std::__detail::__first_t<std::integral_constant<bool, false>, typename std::enable_if<(!(bool)(_Bn::value)), void>::type ...> std::__detail::__or_fn(int) [with _Bn = {std::is_constructible<CFeeRate, std::optional<CFeeRate>&>, std::is_convertible<std::optional<CFeeRate>&, CFeeRate>, std::is_constructible<CFeeRate, std::optional<CFeeRate> >, std::is_convertible<std::optional<CFeeRate>, CFeeRate>, std::is_constructible<CFeeRate, const std::optional<CFeeRate>&>, std::is_convertible<const std::optional<CFeeRate>&, CFeeRate>, std::is_constructible<CFeeRate, const std::optional<CFeeRate> >, std::is_convertible<const std::optional<CFeeRate>, CFeeRate>}]'
+ 178 | __enable_if_t<!bool(_Bn::value)>...>;
+ | ^~~~~
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/type_traits:196:41: required from 'struct std::__or_<std::is_constructible<CFeeRate, std::optional<CFeeRate>&>, std::is_convertible<std::optional<CFeeRate>&, CFeeRate>, std::is_constructible<CFeeRate, std::optional<CFeeRate> >, std::is_convertible<std::optional<CFeeRate>, CFeeRate>, std::is_constructible<CFeeRate, const std::optional<CFeeRate>&>, std::is_convertible<const std::optional<CFeeRate>&, CFeeRate>, std::is_constructible<CFeeRate, const std::optional<CFeeRate> >, std::is_convertible<const std::optional<CFeeRate>, CFeeRate> >'
+ 196 | : decltype(__detail::__or_fn<_Bn...>(0))
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/optional:824:45: required from 'constexpr const bool std::optional<CFeeRate>::__construct_from_contained_value<CFeeRate, CFeeRate>'
+ 824 | = !__converts_from_optional<_Tp, _From>::value;
+ | ^~~~~
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/optional:884:7: required by substitution of 'template<class _Up> requires !(is_same_v<std::optional<_Tp>, typename std::remove_cvref<_It2>::type>) && (is_constructible_v<_Tp, const _Up&>) && (__construct_from_contained_value<_Up, typename std::remove_cv< <template-parameter-1-1> >::type>) constexpr std::optional<CFeeRate>::optional(const std::optional<_Tp>&) [with _Up = CFeeRate]'
+ 884 | && __construct_from_contained_value<_Up>
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+./validation.h:164:41: required from here
+ 164 | return MempoolAcceptResult(state);
+ | ^
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/optional:886:2: required by the constraints of 'template<class _Tp> template<class _Up> requires !(is_same_v<std::optional<_Tp>, typename std::remove_cvref<_It2>::type>) && (is_constructible_v<_Tp, const _Up&>) && (__construct_from_contained_value<_Up, typename std::remove_cv< <template-parameter-1-1> >::type>) constexpr std::optional<_Tp>::optional(const std::optional<_From>&)'
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/optional:884:14: error: satisfaction of atomic constraint '__construct_from_contained_value<_Up, typename std::remove_cv< <template-parameter-1-1> >::type> [with _Tp = _Tp; _Up = _Up]' depends on itself
+ 884 | && __construct_from_contained_value<_Up>
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+---
+ src/policy/feerate.h | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/policy/feerate.h b/src/policy/feerate.h
+index 2e50172914..63ddf6827d 100644
+--- a/src/policy/feerate.h
++++ b/src/policy/feerate.h
+@@ -38,10 +38,8 @@ private:
+ public:
+ /** Fee rate of 0 satoshis per kvB */
+ CFeeRate() : nSatoshisPerK(0) { }
+- template<typename I>
++ template<std::integral I>
+ explicit CFeeRate(const I _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) {
+- // We've previously had bugs creep in from silent double->int conversion...
+- static_assert(std::is_integral<I>::value, "CFeeRate should be used without floats");
+ }
+
+ /**
+--
+2.45.2
+
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/bitcoin-core/files/, net-p2p/bitcoin-core/
@ 2024-09-02 5:06 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2024-09-02 5:06 UTC (permalink / raw
To: gentoo-commits
commit: 5aab337e0677f95eb102a0404c44d763504aea02
Author: Matt Whitlock <gentoo <AT> mattwhitlock <DOT> name>
AuthorDate: Mon Sep 2 03:31:44 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Sep 2 05:05:43 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5aab337e
net-p2p/bitcoin-core: add unkeyworded 28.0_rc1
Signed-off-by: Matt Whitlock <gentoo <AT> mattwhitlock.name>
Closes: https://github.com/gentoo/gentoo/pull/38376
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-p2p/bitcoin-core/Manifest | 1 +
net-p2p/bitcoin-core/bitcoin-core-28.0_rc1.ebuild | 423 ++++++++++++++++++++++
net-p2p/bitcoin-core/files/28.0-syslibs.patch | 296 +++++++++++++++
net-p2p/bitcoin-core/metadata.xml | 1 +
4 files changed, 721 insertions(+)
diff --git a/net-p2p/bitcoin-core/Manifest b/net-p2p/bitcoin-core/Manifest
index d5be9aa47104..fb0a5eb5b0fa 100644
--- a/net-p2p/bitcoin-core/Manifest
+++ b/net-p2p/bitcoin-core/Manifest
@@ -5,4 +5,5 @@ DIST bitcoin-core-26.1.tar.gz 12822211 BLAKE2B 9093133f025a47cc93cc02056c2588be0
DIST bitcoin-core-26.2.tar.gz 12889171 BLAKE2B 9a0d5ed49eb4e14e9bd4c88fb5665536a82ad054c8a6756bed7eeff15be1fb15bca280e73ecd97a2a09d5a4bc9ae6c400f815a83e62959eac26a22d0803a2282 SHA512 4069a903423d58e29a49c638274f0916d6b8e6e8761b987e570a230ecb3b5f6ceaa499b1d6e3dd52bc16f2c3c229ad31ab2ce1d0c91e61d85a65fdc477b0e3ba
DIST bitcoin-core-27.0.tar.gz 13087956 BLAKE2B f625eaa2ce98cd8ed771f97d5a7e66733e94523d2ddda99cd858777bfb88a6e7eafae71e10fbf1ddadfcf629f2e3f790fb48c39f0e016d3fb22f1da7e7c93614 SHA512 0833fbd654570bc3e50efbe4da1f0bcab7744b92becc76d0dfea39a551325bd1b64ae746f7d9824d9e93fc53c95bc5eb5977869f0af04e26bd8ccb992d4c6e7c
DIST bitcoin-core-27.1.tar.gz 13146683 BLAKE2B 9df45ca67565aa1f1cb851e86302ab5e7edbc573642cbd66585910cbd20ecbe8b3a89f7441fc7f299bb3ff32cf687a617f7449cd1a4164e9ac78637501f619da SHA512 b3c2f90b125705401dbf1318db44be586f3609473a9aa3b7330d6c7f48bf5b31951f822e494ae607ebb96e5ffb62b909bea51be14fd91ed71ea62324d2736862
+DIST bitcoin-core-28.0_rc1.tar.gz 12588747 BLAKE2B dc1900ad2dd58c504092127d60db83e22cea67cbb693f6d827b9284e4ddaed9c447a0107fcbc7109dd98a465b239aee46b10496c40f40301d5e02d02b16d86a3 SHA512 6d123330d8b3f4f50b21f84463c754d8bf179b0298f1004ef3249655213fb37855665de6eb3b2e226c3127e0e83bdb93a4ee0992d300f37025c5f033dbb1891e
DIST bitcoin-core-miniupnpc-2.2.8-compat.patch 1130 BLAKE2B 4b1e8eaf4c7f13e9317fa4f69f6c2bce5f1663d8e4731bfe5ca5b4622fcd140e6532acdae544259727a59050b7f3f7bd7dab6f7f23dccebef4caf8fdef0f0c83 SHA512 ec0890d90a5ec3555b2e5477ead75ea5874c57aa3312dc64df5688224f51569f3f7c59593ed2f4336b283fff71c87b5d4fd786ab3cfecbb6407ef143b5018ba5
diff --git a/net-p2p/bitcoin-core/bitcoin-core-28.0_rc1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-28.0_rc1.ebuild
new file mode 100644
index 000000000000..52d9e599d002
--- /dev/null
+++ b/net-p2p/bitcoin-core/bitcoin-core-28.0_rc1.ebuild
@@ -0,0 +1,423 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit autotools bash-completion-r1 check-reqs db-use desktop edo multiprocessing python-any-r1 systemd toolchain-funcs xdg-utils
+
+DESCRIPTION="Reference implementation of the Bitcoin cryptocurrency"
+HOMEPAGE="https://bitcoincore.org/"
+SRC_URI="
+ https://github.com/bitcoin/bitcoin/archive/v${PV/_rc/rc}.tar.gz -> ${P}.tar.gz
+"
+S="${WORKDIR}/${PN/-core}-${PV/_rc/rc}"
+
+LICENSE="MIT"
+SLOT="0"
+if [[ "${PV}" != *_rc* ]] ; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+fi
+IUSE="+asm +berkdb +cli +daemon dbus examples +external-signer gui kde +man nat-pmp +qrcode +sqlite system-leveldb +system-libsecp256k1 systemtap test test-full upnp zeromq"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+ dbus? ( gui )
+ kde? ( gui )
+ qrcode? ( gui )
+ system-leveldb? ( || ( daemon gui ) )
+ test-full? ( test )
+"
+# dev-libs/univalue is now bundled, as upstream dropped support for system copy
+# and their version in the Bitcoin repo has deviated a fair bit from upstream.
+# Upstream also seems very inactive.
+RDEPEND="
+ !dev-util/bitcoin-tx
+ >=dev-libs/boost-1.81.0:=
+ >=dev-libs/libevent-2.1.12:=
+ berkdb? ( >=sys-libs/db-4.8.30:$(db_ver_to_slot 4.8)=[cxx] )
+ cli? ( !net-p2p/bitcoin-cli )
+ daemon? (
+ !net-p2p/bitcoind
+ acct-group/bitcoin
+ acct-user/bitcoin
+ )
+ gui? (
+ !net-p2p/bitcoin-qt
+ >=dev-qt/qtcore-5.15.14:5
+ >=dev-qt/qtgui-5.15.14:5
+ >=dev-qt/qtnetwork-5.15.14:5
+ >=dev-qt/qtwidgets-5.15.14:5
+ dbus? ( >=dev-qt/qtdbus-5.15.14:5 )
+ )
+ nat-pmp? ( >=net-libs/libnatpmp-20230423:= )
+ qrcode? ( >=media-gfx/qrencode-4.1.1:= )
+ sqlite? ( >=dev-db/sqlite-3.38.5:= )
+ system-leveldb? ( virtual/bitcoin-leveldb )
+ system-libsecp256k1? ( >=dev-libs/libsecp256k1-0.4.0:=[ellswift,extrakeys,recovery,schnorr] )
+ upnp? ( >=net-libs/miniupnpc-2.2.7:= )
+ zeromq? ( >=net-libs/zeromq-4.3.4:= )
+"
+DEPEND="
+ ${RDEPEND}
+ systemtap? ( >=dev-debug/systemtap-4.8 )
+"
+BDEPEND="
+ virtual/pkgconfig
+ daemon? (
+ acct-group/bitcoin
+ acct-user/bitcoin
+ )
+ gui? ( >=dev-qt/linguist-tools-5.15.14:5 )
+ test? ( ${PYTHON_DEPS} )
+"
+IDEPEND="
+ gui? ( dev-util/desktop-file-utils )
+"
+
+DOCS=(
+ doc/bips.md
+ doc/bitcoin-conf.md
+ doc/descriptors.md
+ doc/files.md
+ doc/i2p.md
+ doc/JSON-RPC-interface.md
+ doc/multisig-tutorial.md
+ doc/p2p-bad-ports.md
+ doc/psbt.md
+ doc/reduce-memory.md
+ doc/reduce-traffic.md
+ doc/REST-interface.md
+ doc/tor.md
+)
+
+PATCHES=(
+ "${FILESDIR}/28.0-syslibs.patch"
+ "${FILESDIR}/26.0-init.patch"
+)
+
+efmt() {
+ : ${1:?} ; local l ; while read -r l ; do "${!#}" "${l}" ; done < <(fmt "${@:1:$#-1}")
+}
+
+pkg_pretend() {
+ if ! use daemon && ! use gui && ! has_version "${CATEGORY}/${PN}[-daemon,-gui(-),-qt5(-)]" ; then
+ efmt ewarn <<-EOF
+ You are enabling neither USE="daemon" nor USE="gui". This is a valid
+ configuration, but you will be unable to run a Bitcoin node using this
+ installation.
+ EOF
+ fi
+ if use daemon && ! use cli && ! has_version "${CATEGORY}/${PN}[daemon,-bitcoin-cli(-),-cli(-)]" ; then
+ efmt ewarn <<-EOF
+ You are enabling USE="daemon" but not USE="cli". This is a valid
+ configuration, but you will be unable to interact with your bitcoind node
+ via the command line using this installation.
+ EOF
+ fi
+ if ! use berkdb && ! use sqlite &&
+ { { use daemon && ! has_version "${CATEGORY}/${PN}[daemon,-berkdb,-sqlite]" ; } ||
+ { use gui && ! has_version "${CATEGORY}/${PN}[gui,-berkdb,-sqlite]" ; } ; }
+ then
+ efmt ewarn <<-EOF
+ You are enabling neither USE="berkdb" nor USE="sqlite". This is a valid
+ configuration, but your Bitcoin node will be unable to open any wallets.
+ EOF
+ fi
+
+ # test/functional/feature_pruning.py requires 4 GB disk space
+ # test/functional/wallet_pruning.py requires 1.3 GB disk space
+ use test && CHECKREQS_DISK_BUILD="6G" check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ if use test ; then
+ CHECKREQS_DISK_BUILD="6G" check-reqs_pkg_setup
+ python-any-r1_pkg_setup
+ fi
+}
+
+src_prepare() {
+ default
+ ! use system-leveldb || rm -r src/leveldb || die
+ if use system-libsecp256k1 ; then
+ rm -r src/secp256k1 || die
+ sed -e '/^DIST_SUBDIRS *=/s/\bsecp256k1\b//' -i src/Makefile.am || die
+ else
+ pushd src/secp256k1 >/dev/null || die
+ AT_NOELIBTOOLIZE=yes eautoreconf
+ popd >/dev/null || die
+ fi
+ eautoreconf
+
+ # we say --disable-util-util, so we can't test bitcoin-util
+ sed -ne '/^ {/{h;:0;n;H;/^ }/!b0;g;\|"exec": *"\./bitcoin-util"|d};p' \
+ -i test/util/data/bitcoin-util-test.json || die
+
+ sed -e 's/^\(complete -F _bitcoind\b\).*$/\1'"$(usev daemon ' bitcoind')$(usev gui ' bitcoin-qt')/" \
+ -i contrib/completions/bash/bitcoind.bash || die
+}
+
+src_configure() {
+ local wallet ; if use berkdb || use sqlite ; then wallet=enable ; else wallet=disable ; fi
+ local myeconfargs=(
+ --disable-static
+ --${wallet}-wallet
+ $(use_with sqlite)
+ $(use_with berkdb bdb)
+ $(use_enable systemtap usdt)
+ $(use_with upnp miniupnpc)
+ $(use_with nat-pmp natpmp)
+ $(use_enable test tests)
+ --disable-bench
+ --disable-fuzz{,-binary}
+ $(use_with qrcode qrencode)
+ --disable-ccache
+ $(use_enable asm)
+ $(use_enable zeromq zmq)
+ $(use_enable man)
+ $(use_enable external-signer)
+ --with-utils
+ $(use_enable {,util-}cli)
+ --enable-util-tx
+ --${wallet}-util-wallet
+ --disable-util-util
+ $(use_with daemon)
+ $(use_with gui gui qt5)
+ $(use_with dbus qtdbus)
+ $(use_with system-leveldb)
+ $(use_with system-libsecp256k1)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ default
+
+ if use daemon && ! tc-is-cross-compiler ; then
+ TOPDIR="${S}" bash contrib/devtools/gen-bitcoin-conf.sh || die
+ fi
+ sed -e 's/ To use, copy this file$//p;Tp;:0;n;/save the file\.$/!b0;d;:p;p' \
+ -ni share/examples/bitcoin.conf || die
+}
+
+src_test() {
+ emake check
+
+ use daemon && edo "${PYTHON}" test/functional/test_runner.py \
+ --ansi $(usev test-full --extended) --jobs="$(get_makeopts_jobs)" --timeout-factor="${TIMEOUT_FACTOR:-15}"
+}
+
+src_install() {
+ DOCS+=( doc/release-notes/*.md )
+ use external-signer && DOCS+=( doc/external-signer.md )
+ use berkdb || use sqlite && DOCS+=( doc/managing-wallets.md )
+ use systemtap && DOCS+=( doc/tracing.md )
+ use zeromq && DOCS+=( doc/zmq.md )
+
+ if use daemon ; then
+ # https://bugs.gentoo.org/757102
+ DOCS+=( share/rpcauth/rpcauth.py )
+ docompress -x "/usr/share/doc/${PF}/rpcauth.py"
+ fi
+
+ default
+
+ find "${ED}" -type f -name '*.la' -delete || die
+ ! use test || rm -f -- "${ED}"/usr/bin/test_bitcoin{,-qt} || die
+
+ newbashcomp contrib/completions/bash/bitcoin-tx.bash bitcoin-tx
+ use cli && newbashcomp contrib/completions/bash/bitcoin-cli.bash bitcoin-cli
+ if use daemon ; then
+ newbashcomp contrib/completions/bash/bitcoind.bash bitcoind
+ use gui && bashcomp_alias bitcoind bitcoin-qt
+ elif use gui ; then
+ newbashcomp contrib/completions/bash/bitcoind.bash bitcoin-qt
+ fi
+
+ if use daemon ; then
+ insinto /etc/bitcoin
+ doins share/examples/bitcoin.conf
+ fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
+ fperms 0660 /etc/bitcoin/bitcoin.conf
+
+ newconfd contrib/init/bitcoind.openrcconf bitcoind
+ newinitd "${FILESDIR}/bitcoind.openrc" bitcoind
+ systemd_newunit contrib/init/bitcoind.service bitcoind.service
+
+ keepdir /var/lib/bitcoind
+ fperms 0750 /var/lib/bitcoind
+ fowners bitcoin:bitcoin /var/lib/bitcoind
+ dosym -r {/etc/bitcoin,/var/lib/bitcoind}/bitcoin.conf
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
+ fi
+
+ if use gui ; then
+ insinto /usr/share/icons/hicolor/scalable/apps
+ newins src/qt/res/src/bitcoin.svg bitcoin128.svg
+
+ domenu "${FILESDIR}/org.bitcoin.bitcoin-qt.desktop"
+
+ if use kde ; then
+ insinto /usr/share/kservices5
+ doins "${FILESDIR}/bitcoin-qt.protocol"
+ fi
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc -r contrib/{linearize,qos}
+ use zeromq && dodoc -r contrib/zmq
+ fi
+}
+
+pkg_preinst() {
+ if use daemon && [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then
+ if [[ -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then
+ dosym -r /var/lib/bitcoin{d,/.bitcoin}
+ elif [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] ; then
+ efmt ewarn <<-EOF
+ Your bitcoind data directory is located at ${EPREFIX}/var/lib/bitcoin/.bitcoin,
+ a deprecated location. To perform an automated migration to
+ ${EPREFIX}/var/lib/bitcoind, first shut down any running bitcoind instances
+ that may be using the deprecated path, and then run:
+
+ # emerge --config ${CATEGORY}/${PN}
+ EOF
+ insinto /var/lib/bitcoin
+ mv -- "${ED}/var/lib/bitcoin"{d,/.bitcoin} || die
+ dosym -r {/etc/,/var/lib/bitcoin/.}bitcoin/bitcoin.conf
+ dosym -r /var/lib/bitcoin{/.bitcoin,d}
+ fi
+ fi
+
+ if use kde && [[ -d "${EROOT}/usr/share/kde4" ]] ; then
+ dosym -r /usr/share/{kservices5,kde4/services}/bitcoin-qt.protocol
+ fi
+}
+
+pkg_postinst() {
+ # we don't use xdg.eclass because it adds unconditional IDEPENDs
+ if use gui ; then
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ fi
+
+ if use daemon && [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ efmt -su elog <<-EOF
+ To have ${PN} automatically use Tor when it's running, be sure your \
+ 'torrc' config file has 'ControlPort' and 'CookieAuthentication' set up \
+ correctly, and:
+ - Using an init script: add the 'bitcoin' user to the 'tor' user group.
+ - Running bitcoind directly: add that user to the 'tor' user group.
+ EOF
+ fi
+
+ if use cli && use daemon ; then
+ efmt -su elog <<-EOF
+ To use bitcoin-cli with the /etc/init.d/bitcoind service:
+ - Add your user(s) to the 'bitcoin' group.
+ - Symlink ~/.bitcoin to /var/lib/bitcoind.
+ EOF
+ fi
+
+ if use berkdb ; then
+ # https://github.com/bitcoin/bitcoin/pull/28597
+ # https://bitcoincore.org/en/releases/26.0/#wallet
+ efmt ewarn <<-EOF
+ Creation of legacy (Berkeley DB) wallets is refused starting with Bitcoin
+ Core 26.0, pending the deprecation and eventual removal of support for
+ legacy wallets altogether in future releases. At present you can still
+ force support for the creation of legacy wallets by adding the following
+ line to your bitcoin.conf:
+
+ deprecatedrpc=create_bdb
+ EOF
+ fi
+}
+
+pkg_postrm() {
+ if use gui ; then
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ fi
+}
+
+pkg_config() {
+ if [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" && ! -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] &&
+ [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]]
+ then
+ in_use() {
+ : ${1:?} ; local each
+ if command -v fuser >/dev/null ; then
+ fuser "${@}" >/dev/null 2>&1
+ elif command -v lsof >/dev/null ; then
+ for each ; do
+ lsof -- "${each}" && return
+ done >/dev/null 2>&1
+ elif mountpoint -q /proc ; then
+ { find /proc/[0-9]*/{cwd,exe,fd} -type l -exec readlink -- {} +
+ awk '{ print $6 }' /proc/[0-9]*/maps
+ } 2>/dev/null | grep -Fqx -f <(printf '%s\n' "${@}" ; readlink -m -- "${@}")
+ else
+ return 13
+ fi
+ }
+ ebegin "Checking that ${EPREFIX}/var/lib/bitcoin/.bitcoin is not in use"
+ in_use "${EROOT}/var/lib/bitcoin/.bitcoin"{,/.lock}
+ case $? in
+ 0)
+ eend 1
+ efmt eerror <<-EOF
+ ${EPREFIX}/var/lib/bitcoin/.bitcoin is currently in use. Please stop any
+ running bitcoind instances that may be using this data directory, and then
+ retry this migration.
+ EOF
+ die "${EPREFIX}/var/lib/bitcoin/.bitcoin is in use"
+ ;;
+ 13)
+ eend 1
+ if [[ "${BITCOIND_IS_NOT_RUNNING}" != 1 ]] ; then
+ efmt eerror <<-EOF
+ Found no way to check whether ${EPREFIX}/var/lib/bitcoin/.bitcoin is in use.
+ Do you have /proc mounted? To force the migration without checking, re-run
+ this command with BITCOIND_IS_NOT_RUNNING=1.
+ EOF
+ die "could not check whether ${EPREFIX}/var/lib/bitcoin/.bitcoin is in use"
+ fi
+ ;;
+ *)
+ eend 0
+ ;;
+ esac
+
+ # find all relative symlinks that point outside the data dir
+ local -A symlinks
+ cd -- "${EROOT}/var/lib/bitcoin/.bitcoin" || die
+ local each ; while read -r -d '' each ; do
+ local target=$(readlink -- "${each}") && [[ "${target}" == ../* ]] &&
+ target=$(readlink -e -- "${each}") && [[ "${target}" != "${EROOT}/var/lib/bitcoin/.bitcoin/"* ]] &&
+ symlinks["${each}"]="${target}"
+ done < <(find -type l -print0)
+
+ einfo "Moving your ${EPREFIX}/var/lib/bitcoin/.bitcoin to ${EPREFIX}/var/lib/bitcoind."
+ rm -f -- "${EROOT}/var/lib/bitcoind" || die
+ mv --no-clobber --no-copy --no-target-directory -- "${EROOT}/var/lib/bitcoin"{/.bitcoin,d} ||
+ die "Failed to move your ${EPREFIX}/var/lib/bitcoin/.bitcoin to ${EPREFIX}/var/lib/bitcoind."
+
+ # fix up the relative symlinks
+ cd -- "${EROOT}/var/lib/bitcoind" || die
+ for each in "${!symlinks[@]}" ; do
+ ln -fnrs -- "${symlinks[${each}]}" "${each}" # keep going even if this fails
+ done
+
+ einfo 'Creating a transitional symlink for your convenience.'
+ ln -fnrsv -- "${EROOT}/var/lib/bitcoin"{d,/.bitcoin}
+ einfo 'You may remove this link when you no longer need it.'
+ else
+ einfo 'Nothing to do.'
+ fi
+}
diff --git a/net-p2p/bitcoin-core/files/28.0-syslibs.patch b/net-p2p/bitcoin-core/files/28.0-syslibs.patch
new file mode 100644
index 000000000000..ec52597a201e
--- /dev/null
+++ b/net-p2p/bitcoin-core/files/28.0-syslibs.patch
@@ -0,0 +1,296 @@
+From 19cd9d584f7bd7868898ae7592633e2eb255eb46 Mon Sep 17 00:00:00 2001
+From: Matt Whitlock <bitcoin@mattwhitlock.name>
+Date: Sun, 17 Sep 2023 10:29:27 -0400
+Subject: [PATCH] support linking against system-installed leveldb and
+ libsecp256k1
+
+- Abort if runtime leveldb != compiled-against leveldb.
+
+Originally based on 22.0-fix_build_without_leveldb.patch.
+---
+ configure.ac | 90 ++++++++++++++++++++++++++++++++++++++-
+ src/Makefile.am | 13 +++++-
+ src/Makefile.test.include | 2 +
+ src/dbwrapper.cpp | 27 +++++++++++-
+ src/dbwrapper.h | 8 ++++
+ src/kernel/checks.cpp | 7 +++
+ 6 files changed, 143 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3bc6b13efc..290f289bf7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1141,6 +1141,41 @@ if test "$enable_fuzz_binary" = "yes"; then
+ ]])])
+ fi
+
++dnl Check for libsecp256k1, only if explicitly requested
++AC_ARG_WITH([system-libsecp256k1],
++ [AS_HELP_STRING([[--with-system-libsecp256k1[=PKG]]],
++ [build using system-installed libsecp256k1 instead of bundled, passing PKG (default: libsecp256k1) to pkg-config (default is no; DANGEROUS; NOT SUPPORTED)])],
++ [AS_IF([test "x$withval" = xyes], [with_system_libsecp256k1=libsecp256k1])],
++ [with_system_libsecp256k1=no])
++AM_CONDITIONAL([EMBEDDED_LIBSECP256K1],[test "x$with_system_libsecp256k1" = xno])
++AM_COND_IF([EMBEDDED_LIBSECP256K1], [
++ libsecp256k1_CFLAGS='-I$(srcdir)/secp256k1/include'
++ libsecp256k1_LIBS='secp256k1/libsecp256k1.la'
++], [
++ saved_CPPFLAGS=$CPPFLAGS
++ saved_LIBS=$LIBS
++ PKG_CHECK_MODULES([libsecp256k1], [$with_system_libsecp256k1])
++ CPPFLAGS="$libsecp256k1_CFLAGS $CPPFLAGS"
++ LIBS="$libsecp256k1_LIBS $LIBS"
++ missing_modules=
++ AC_DEFUN([CHECK_MODULE], [
++ AC_CHECK_HEADER([secp256k1_$1.h],
++ [AC_CHECK_FUNCS([$2], [], [missing_modules="${missing_modules} $1"])],
++ [missing_modules="${missing_modules} $1"])
++ ])
++ CHECK_MODULE([ellswift], [secp256k1_ellswift_encode])
++ CHECK_MODULE([extrakeys], [secp256k1_xonly_pubkey_parse])
++ CHECK_MODULE([recovery], [secp256k1_ecdsa_recover])
++ CHECK_MODULE([schnorrsig], [secp256k1_schnorrsig_verify])
++ AS_IF([test -n "${missing_modules}"], [
++ AC_MSG_ERROR([system-installed libsecp256k1 does not support these required modules:${missing_modules}])
++ ])
++ CPPFLAGS=$saved_CPPFLAGS
++ LIBS=$saved_LIBS
++])
++AC_SUBST(libsecp256k1_CFLAGS)
++AC_SUBST(libsecp256k1_LIBS)
++
+ if test "$enable_wallet" != "no"; then
+ dnl Check for libdb_cxx only if wallet enabled
+ if test "$use_bdb" != "no"; then
+@@ -1200,6 +1235,55 @@ if test "$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests" = "nononono"; th
+ use_zmq=no
+ fi
+
++dnl Check for leveldb, only if explicitly requested
++AC_ARG_WITH([system-leveldb],
++ [AS_HELP_STRING([--with-system-leveldb],
++ [Build with system LevelDB (default is no; DANGEROUS; NOT SUPPORTED)])],
++ [system_leveldb=$withval],
++ [system_leveldb=no])
++AC_ARG_VAR([leveldb_CFLAGS],[C compiler flags for system-leveldb])
++AC_ARG_VAR([leveldb_LIBS],[linker flags for system-leveldb])
++AS_IF([test x$system_leveldb != xno],[
++ TEMP_CPPFLAGS="$CPPFLAGS"
++ TEMP_LIBS="$LIBS"
++ CPPFLAGS="$leveldb_CFLAGS"
++ LIBS="$leveldb_LIBS"
++ AC_SEARCH_LIBS([leveldb_open],[leveldb],[leveldb_LIBS="$LIBS"],
++ [AC_MSG_ERROR([leveldb library not found; using --with-system-leveldb is not supported anyway])])
++ AC_CHECK_HEADER([leveldb/filter_policy.h],[],
++ [AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway])])
++ AC_CHECK_HEADER([leveldb/helpers/memenv.h],[],
++ [AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway])])
++
++ AC_MSG_CHECKING([for library containing leveldb::NewMemEnv])
++ for searchlib in "" "-lmemenv" ERR; do
++ if test "x$searchlib" = "xERR"; then
++ AC_MSG_RESULT([no])
++ AC_MSG_ERROR([LevelDB's memenv helper not found; using --with-system-leveldb is not supported anyway])
++ fi
++ LIBS="$searchlib $leveldb_LIBS"
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([
++ #include <leveldb/env.h>
++ #include <leveldb/helpers/memenv.h>
++ ],[
++ leveldb::Env *myenv = leveldb::NewMemEnv(leveldb::Env::Default());
++ delete myenv;
++ ])
++ ],[
++ AC_MSG_RESULT([$searchlib])
++ break
++ ])
++ done
++ leveldb_LIBS="$LIBS"
++ LIBS="$TEMP_LIBS"
++ CPPFLAGS="$TEMP_CPPFLAGS"
++],[
++ AC_DEFINE([EMBEDDED_LEVELDB],[1],[Define to use the bundled LevelDB sources])
++])
++AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$system_leveldb = xno])
++AC_SUBST(leveldb_CFLAGS)
++AC_SUBST(leveldb_LIBS)
++
+ dnl Check for libminiupnpc (optional)
+ if test "$use_upnp" != "no"; then
+ TEMP_CPPFLAGS="$CPPFLAGS"
+@@ -1693,8 +1777,10 @@ CPPFLAGS="$CPPFLAGS_TEMP"
+ if test -n "$use_sanitizers"; then
+ export SECP_CFLAGS="$SECP_CFLAGS $SANITIZER_CFLAGS"
+ fi
+-ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --disable-module-ecdh"
+-AC_CONFIG_SUBDIRS([src/secp256k1])
++AM_COND_IF([EMBEDDED_LIBSECP256K1],[
++ ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --disable-module-ecdh"
++ AC_CONFIG_SUBDIRS([src/secp256k1])
++])
+
+ AC_OUTPUT
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 1ccb5332c4..04e9d54962 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -25,7 +25,7 @@ check_PROGRAMS =
+ TESTS =
+ BENCHMARKS =
+
+-BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) -I$(srcdir)/secp256k1/include -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT)
++BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) $(libsecp256k1_CFLAGS) -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT)
+
+ LIBBITCOIN_NODE=libbitcoin_node.a
+ LIBBITCOIN_COMMON=libbitcoin_common.a
+@@ -34,7 +34,11 @@ LIBBITCOIN_CLI=libbitcoin_cli.a
+ LIBBITCOIN_UTIL=libbitcoin_util.a
+ LIBBITCOIN_CRYPTO_BASE=crypto/libbitcoin_crypto_base.la
+ LIBBITCOINQT=qt/libbitcoinqt.a
++if EMBEDDED_LIBSECP256K1
+ LIBSECP256K1=secp256k1/libsecp256k1.la
++else
++LIBSECP256K1=$(libsecp256k1_LIBS)
++endif
+
+ if ENABLE_ZMQ
+ LIBBITCOIN_ZMQ=libbitcoin_zmq.a
+@@ -66,8 +70,10 @@ LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_ARM_SHANI)
+ endif
+ noinst_LTLIBRARIES += $(LIBBITCOIN_CRYPTO)
+
++if EMBEDDED_LIBSECP256K1
+ $(LIBSECP256K1): $(wildcard secp256k1/src/*.h) $(wildcard secp256k1/src/*.c) $(wildcard secp256k1/include/*)
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
++endif
+
+ # Make is not made aware of per-object dependencies to avoid limiting building parallelization
+ # But to build the less dependent modules first, we manually select their order here:
+@@ -1110,8 +1116,13 @@ endif
+
+ include Makefile.minisketch.include
+
++if EMBEDDED_LEVELDB
+ include Makefile.crc32c.include
+ include Makefile.leveldb.include
++else
++LEVELDB_CPPFLAGS = $(leveldb_CFLAGS)
++LIBLEVELDB = $(leveldb_LIBS)
++endif
+
+ include Makefile.test_util.include
+ include Makefile.test_fuzz.include
+diff --git a/src/Makefile.test.include b/src/Makefile.test.include
+index c396cc2ebf..233f1a1c21 100644
+--- a/src/Makefile.test.include
++++ b/src/Makefile.test.include
+@@ -449,7 +449,9 @@ if ENABLE_BENCH
+ $(BENCH_BINARY) -sanity-check -priority-level=high
+ endif
+ endif
++if EMBEDDED_LIBSECP256K1
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
++endif
+
+ if ENABLE_TESTS
+ UNIVALUE_TESTS = univalue/test/object univalue/test/unitester
+diff --git a/src/dbwrapper.cpp b/src/dbwrapper.cpp
+index 479064d468..b476b42c85 100644
+--- a/src/dbwrapper.cpp
++++ b/src/dbwrapper.cpp
+@@ -22,7 +22,11 @@
+ #include <leveldb/db.h>
+ #include <leveldb/env.h>
+ #include <leveldb/filter_policy.h>
+-#include <leveldb/helpers/memenv/memenv.h>
++#if EMBEDDED_LEVELDB
++# include <leveldb/helpers/memenv/memenv.h>
++#else
++# include <leveldb/helpers/memenv.h>
++#endif
+ #include <leveldb/iterator.h>
+ #include <leveldb/options.h>
+ #include <leveldb/slice.h>
+@@ -51,6 +55,27 @@ static void HandleError(const leveldb::Status& status)
+ throw dbwrapper_error(errmsg);
+ }
+
++#if !EMBEDDED_LEVELDB
++#include <node/interface_ui.h>
++#include <util/translation.h>
++#include <leveldb/c.h>
++bool dbwrapper_SanityCheck()
++{
++ unsigned long header_version = (leveldb::kMajorVersion << 16) | leveldb::kMinorVersion;
++ unsigned long library_version = (leveldb_major_version() << 16) | leveldb_minor_version();
++
++ if (header_version != library_version) {
++ InitError(Untranslated(strprintf("Compiled with LevelDB %d.%d, but linked with LevelDB %d.%d (incompatible).",
++ leveldb::kMajorVersion, leveldb::kMinorVersion,
++ leveldb_major_version(), leveldb_minor_version()
++ )));
++ return false;
++ }
++
++ return true;
++}
++#endif
++
+ class CBitcoinLevelDBLogger : public leveldb::Logger {
+ public:
+ // This code is adapted from posix_logger.h, which is why it is using vsprintf.
+diff --git a/src/dbwrapper.h b/src/dbwrapper.h
+index 63c2f99d2a..406d03f1ea 100644
+--- a/src/dbwrapper.h
++++ b/src/dbwrapper.h
+@@ -5,6 +5,10 @@
+ #ifndef BITCOIN_DBWRAPPER_H
+ #define BITCOIN_DBWRAPPER_H
+
++#if defined(HAVE_CONFIG_H)
++#include <config/bitcoin-config.h>
++#endif
++
+ #include <attributes.h>
+ #include <serialize.h>
+ #include <span.h>
+@@ -46,6 +50,10 @@ struct DBParams {
+ DBOptions options{};
+ };
+
++#if !EMBEDDED_LEVELDB
++bool dbwrapper_SanityCheck();
++#endif
++
+ class dbwrapper_error : public std::runtime_error
+ {
+ public:
+diff --git a/src/kernel/checks.cpp b/src/kernel/checks.cpp
+index e4a13ee4cc..2ca51437bf 100644
+--- a/src/kernel/checks.cpp
++++ b/src/kernel/checks.cpp
+@@ -4,6 +4,7 @@
+
+ #include <kernel/checks.h>
+
++#include <dbwrapper.h>
+ #include <random.h>
+ #include <util/result.h>
+ #include <util/translation.h>
+@@ -14,6 +15,12 @@ namespace kernel {
+
+ util::Result<void> SanityChecks(const Context&)
+ {
++#if !EMBEDDED_LEVELDB
++ if (!dbwrapper_SanityCheck()) {
++ return util::Error{Untranslated("Database sanity check failure. Aborting.")};
++ }
++#endif
++
+ if (!Random_SanityCheck()) {
+ return util::Error{Untranslated("OS cryptographic RNG sanity check failure. Aborting.")};
+ }
+--
+2.46.0
+
diff --git a/net-p2p/bitcoin-core/metadata.xml b/net-p2p/bitcoin-core/metadata.xml
index 63568431d943..57e1f807773b 100644
--- a/net-p2p/bitcoin-core/metadata.xml
+++ b/net-p2p/bitcoin-core/metadata.xml
@@ -23,6 +23,7 @@
<flag name="system-leveldb">Link with <pkg>virtual/bitcoin-leveldb</pkg> rather than embedding an internal copy</flag>
<flag name="system-libsecp256k1">Link with <pkg>dev-libs/libsecp256k1</pkg> rather than embedding an internal copy</flag>
<flag name="systemtap">Enable SystemTap/DTrace tracing</flag>
+ <flag name="test-full">Run tests that take a long time</flag>
<flag name="upnp">Enable Universal Plug and Play</flag>
<flag name="zeromq">Report blocks and transactions via zeromq</flag>
</use>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/bitcoin-core/files/, net-p2p/bitcoin-core/
@ 2025-03-20 0:06 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2025-03-20 0:06 UTC (permalink / raw
To: gentoo-commits
commit: f09d0b1c85676ac3856a9a9c23e3fdcbe42a475d
Author: Matt Whitlock <gentoo <AT> mattwhitlock <DOT> name>
AuthorDate: Thu Mar 13 06:51:41 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 20 00:01:48 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f09d0b1c
net-p2p/bitcoin-core: add unkeyworded 29.0_rc2
See: https://github.com/bitcoin/bitcoin/releases/tag/v29.0rc2
Signed-off-by: Matt Whitlock <gentoo <AT> mattwhitlock.name>
Closes: https://github.com/gentoo/gentoo/pull/41047
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-p2p/bitcoin-core/Manifest | 1 +
net-p2p/bitcoin-core/bitcoin-core-29.0_rc2.ebuild | 415 +++++++++++++++++++++
.../bitcoin-core/files/29.0-cmake-syslibs.patch | 81 ++++
3 files changed, 497 insertions(+)
diff --git a/net-p2p/bitcoin-core/Manifest b/net-p2p/bitcoin-core/Manifest
index 0d31c0b6cb85..1af9e5140591 100644
--- a/net-p2p/bitcoin-core/Manifest
+++ b/net-p2p/bitcoin-core/Manifest
@@ -1,2 +1,3 @@
DIST bitcoin-core-28.0.tar.gz 12598313 BLAKE2B 20b189cc359d4ba1d2c61af6f69f050be32b3670a3df7e9d8fe53e55bd78fcac8dde07d6a5d32088981742aa97234aa38c19669d77837c5ab6b114260762e039 SHA512 67b2abf58c1bc57ce53b80d2d2bc9c83fc5b6d8ac08224073e03a7f13b7f6fef1127d9b825ff3594210a7c962098b520042f1eff9007ba26a5d8922f96f96e57
DIST bitcoin-core-28.1.tar.gz 12601466 BLAKE2B f6dd3c269b0e132798b3bea96a122a89b95e7544f01fd3401bfc2fd1ef11fc847a3570f8d5c0339778df0a3ecf17cf49af4148c2f68d7719d6f85ac2688e9d3c SHA512 859c5f0b2f927969766d3ebde64173469e5810694ba317629fac64c66311d847698ae093dbf585e327cf4e75983b722ff45a23ed3fe6f1f13752db4cf6846aa9
+DIST bitcoin-core-29.0_rc2.tar.gz 12927429 BLAKE2B 4d207fd7992f10804a45ef5890a35937875c95c9c202701a6dceed5addaa307d9a0f54fd749d6cc0780cdbcabed21a3742e02b58e14dd7dbc40ac2e45fff2276 SHA512 8896eaa0ee6199b5193d68339567cfa774e336506bc18153db1b57c589f4dff71a680a3a1a10781bfc496656c7ec3cb1d4510fa9fbea1cec57ea2d7be5b598c0
diff --git a/net-p2p/bitcoin-core/bitcoin-core-29.0_rc2.ebuild b/net-p2p/bitcoin-core/bitcoin-core-29.0_rc2.ebuild
new file mode 100644
index 000000000000..e4a12af72175
--- /dev/null
+++ b/net-p2p/bitcoin-core/bitcoin-core-29.0_rc2.ebuild
@@ -0,0 +1,415 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit bash-completion-r1 check-reqs cmake db-use desktop edo multiprocessing python-any-r1 systemd toolchain-funcs xdg-utils
+
+DESCRIPTION="Reference implementation of the Bitcoin cryptocurrency"
+HOMEPAGE="https://bitcoincore.org/"
+SRC_URI="
+ https://github.com/bitcoin/bitcoin/archive/v${PV/_rc/rc}.tar.gz -> ${P}.tar.gz
+"
+S="${WORKDIR}/${PN/-core}-${PV/_rc/rc}"
+
+LICENSE="MIT"
+SLOT="0"
+if [[ "${PV}" != *_rc* ]] ; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+fi
+IUSE="+asm +berkdb +cli +daemon dbus examples +external-signer gui kde +man +qrcode +sqlite +system-libsecp256k1 systemtap test test-full zeromq"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+ dbus? ( gui )
+ kde? ( gui )
+ qrcode? ( gui )
+ test-full? ( test )
+"
+# dev-libs/univalue is now bundled, as upstream dropped support for system copy
+# and their version in the Bitcoin repo has deviated a fair bit from upstream.
+# Upstream also seems very inactive.
+RDEPEND="
+ !dev-util/bitcoin-tx
+ >=dev-libs/boost-1.81.0:=
+ >=dev-libs/libevent-2.1.12:=
+ berkdb? ( >=sys-libs/db-4.8.30:$(db_ver_to_slot 4.8)=[cxx] )
+ cli? ( !net-p2p/bitcoin-cli )
+ daemon? (
+ !net-p2p/bitcoind
+ acct-group/bitcoin
+ acct-user/bitcoin
+ )
+ gui? (
+ !net-p2p/bitcoin-qt
+ >=dev-qt/qtcore-5.15.16:5
+ >=dev-qt/qtgui-5.15.16:5
+ >=dev-qt/qtnetwork-5.15.16:5
+ >=dev-qt/qtwidgets-5.15.16:5
+ dbus? ( >=dev-qt/qtdbus-5.15.16:5 )
+ )
+ qrcode? ( >=media-gfx/qrencode-4.1.1:= )
+ sqlite? ( >=dev-db/sqlite-3.38.5:= )
+ system-libsecp256k1? ( >=dev-libs/libsecp256k1-0.6.0:=[asm=,ellswift,extrakeys,recovery,schnorr] )
+ zeromq? ( >=net-libs/zeromq-4.3.4:= )
+"
+DEPEND="
+ ${RDEPEND}
+ systemtap? ( >=dev-debug/systemtap-4.8 )
+"
+BDEPEND="
+ >=dev-build/cmake-3.25
+ virtual/pkgconfig
+ daemon? (
+ acct-group/bitcoin
+ acct-user/bitcoin
+ )
+ gui? ( >=dev-qt/linguist-tools-5.15.16:5 )
+ test? (
+ ${PYTHON_DEPS}
+ gui? ( >=dev-qt/qttest-5.15.16:5 )
+ )
+"
+IDEPEND="
+ gui? ( dev-util/desktop-file-utils )
+"
+
+DOCS=(
+ doc/bips.md
+ doc/bitcoin-conf.md
+ doc/descriptors.md
+ doc/files.md
+ doc/i2p.md
+ doc/JSON-RPC-interface.md
+ doc/multisig-tutorial.md
+ doc/p2p-bad-ports.md
+ doc/psbt.md
+ doc/reduce-memory.md
+ doc/reduce-traffic.md
+ doc/release-notes.md
+ doc/REST-interface.md
+ doc/tor.md
+)
+
+PATCHES=(
+ "${FILESDIR}/29.0-cmake-syslibs.patch"
+ "${FILESDIR}/26.0-init.patch"
+)
+
+efmt() {
+ : ${1:?} ; local l ; while read -r l ; do "${!#}" "${l}" ; done < <(fmt "${@:1:$#-1}")
+}
+
+pkg_pretend() {
+ if ! use daemon && ! use gui && ! has_version "${CATEGORY}/${PN}[-daemon,-gui(-),-qt5(-)]" ; then
+ efmt ewarn <<-EOF
+ You are enabling neither USE="daemon" nor USE="gui". This is a valid
+ configuration, but you will be unable to run a Bitcoin node using this
+ installation.
+ EOF
+ fi
+ if use daemon && ! use cli && ! has_version "${CATEGORY}/${PN}[daemon,-bitcoin-cli(-),-cli(-)]" ; then
+ efmt ewarn <<-EOF
+ You are enabling USE="daemon" but not USE="cli". This is a valid
+ configuration, but you will be unable to interact with your bitcoind node
+ via the command line using this installation.
+ EOF
+ fi
+ if ! use berkdb && ! use sqlite &&
+ { { use daemon && ! has_version "${CATEGORY}/${PN}[daemon,-berkdb,-sqlite]" ; } ||
+ { use gui && ! has_version "${CATEGORY}/${PN}[gui,-berkdb,-sqlite]" ; } ; }
+ then
+ efmt ewarn <<-EOF
+ You are enabling neither USE="berkdb" nor USE="sqlite". This is a valid
+ configuration, but your Bitcoin node will be unable to open any wallets.
+ EOF
+ fi
+
+ # test/functional/feature_pruning.py requires 4 GB disk space
+ # test/functional/wallet_pruning.py requires 1.3 GB disk space
+ use test && CHECKREQS_DISK_BUILD="6G" check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ if use test ; then
+ CHECKREQS_DISK_BUILD="6G" check-reqs_pkg_setup
+ python-any-r1_pkg_setup
+ fi
+}
+
+src_prepare() {
+ eapply_user
+ ! use system-libsecp256k1 || rm -r src/secp256k1 || die
+ cmake_src_prepare
+
+ # we set BUILD_UTIL=OFF, so we can't test bitcoin-util
+ sed -ne '/^ {/{h;:0;n;H;/^ }/!b0;g;\|"exec": *"\./bitcoin-util"|d};p' \
+ -i test/util/data/bitcoin-util-test.json || die
+
+ sed -e 's/^\(complete -F _bitcoind\b\).*$/\1'"$(usev daemon ' bitcoind')$(usev gui ' bitcoin-qt')/" \
+ -i contrib/completions/bash/bitcoind.bash || die
+}
+
+src_configure() {
+ local wallet ; if use berkdb || use sqlite ; then wallet=ON ; else wallet=OFF ; fi
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=ON
+ -DENABLE_WALLET=${wallet}
+ -DWITH_SQLITE=$(usex sqlite)
+ -DWITH_BDB=$(usex berkdb)
+ -DWITH_USDT=$(usex systemtap)
+ -DBUILD_TESTS=$(usex test)
+ -DBUILD_BENCH=OFF
+ -DBUILD_{FOR_FUZZING,FUZZ_BINARY}=OFF
+ -DWITH_QRENCODE=$(usex qrcode)
+ -DWITH_CCACHE=OFF
+ -DWITH_ZMQ=$(usex zeromq)
+ -DINSTALL_MAN=$(usex man)
+ -DENABLE_EXTERNAL_SIGNER=$(usex external-signer)
+ -DBUILD_CLI=$(usex cli)
+ -DBUILD_TX=ON
+ -DBUILD_WALLET_TOOL=${wallet}
+ -DBUILD_UTIL=OFF
+ -DBUILD_DAEMON=$(usex daemon)
+ -DBUILD_GUI=$(usex gui)
+ -DWITH_DBUS=$(usex dbus)
+ -DWITH_SYSTEM_LIBSECP256K1=$(usex system-libsecp256k1 ON \
+ "OFF -DSECP256K1_ASM=$(usex asm AUTO OFF)")
+ )
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+
+ if use daemon && ! tc-is-cross-compiler ; then
+ TOPDIR="${S}" BUILDDIR="${BUILD_DIR}" bash contrib/devtools/gen-bitcoin-conf.sh || die
+ fi
+ sed -e 's/ To use, copy this file$//p;Tp;:0;n;/save the file\.$/!b0;d;:p;p' \
+ -ni share/examples/bitcoin.conf || die
+}
+
+src_test() {
+ cmake_src_test
+
+ if use daemon ; then
+ cd -- "${BUILD_DIR}" || die
+ edo "${PYTHON}" test/functional/test_runner.py \
+ --ansi $(usev test-full --extended) --jobs="$(get_makeopts_jobs)" --timeout-factor="${TIMEOUT_FACTOR:-15}"
+ fi
+}
+
+src_install() {
+ use external-signer && DOCS+=( doc/external-signer.md )
+ use berkdb || use sqlite && DOCS+=( doc/managing-wallets.md )
+ use systemtap && DOCS+=( doc/tracing.md )
+ use zeromq && DOCS+=( doc/zmq.md )
+
+ if use daemon ; then
+ # https://bugs.gentoo.org/757102
+ DOCS+=( share/rpcauth/rpcauth.py )
+ docompress -x "/usr/share/doc/${PF}/rpcauth.py"
+ fi
+
+ einstalldocs
+ cmake_src_install
+
+ find "${ED}" -type f -name '*.la' -delete || die
+ ! use test || rm -f -- "${ED}"/usr/bin/test_bitcoin{,-qt} || die
+
+ newbashcomp contrib/completions/bash/bitcoin-tx.bash bitcoin-tx
+ use cli && newbashcomp contrib/completions/bash/bitcoin-cli.bash bitcoin-cli
+ if use daemon ; then
+ newbashcomp contrib/completions/bash/bitcoind.bash bitcoind
+ use gui && bashcomp_alias bitcoind bitcoin-qt
+ elif use gui ; then
+ newbashcomp contrib/completions/bash/bitcoind.bash bitcoin-qt
+ fi
+
+ if use daemon ; then
+ insinto /etc/bitcoin
+ doins share/examples/bitcoin.conf
+ fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
+ fperms 0660 /etc/bitcoin/bitcoin.conf
+
+ newconfd contrib/init/bitcoind.openrcconf bitcoind
+ newinitd "${FILESDIR}/bitcoind.openrc" bitcoind
+ systemd_newunit contrib/init/bitcoind.service bitcoind.service
+
+ keepdir /var/lib/bitcoind
+ fperms 0750 /var/lib/bitcoind
+ fowners bitcoin:bitcoin /var/lib/bitcoind
+ dosym -r {/etc/bitcoin,/var/lib/bitcoind}/bitcoin.conf
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
+ fi
+
+ if use gui ; then
+ insinto /usr/share/icons/hicolor/scalable/apps
+ newins src/qt/res/src/bitcoin.svg bitcoin128.svg
+
+ domenu "${FILESDIR}/org.bitcoin.bitcoin-qt.desktop"
+
+ if use kde ; then
+ insinto /usr/share/kservices5
+ doins "${FILESDIR}/bitcoin-qt.protocol"
+ fi
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc -r contrib/{linearize,qos}
+ use zeromq && dodoc -r contrib/zmq
+ fi
+}
+
+pkg_preinst() {
+ if use daemon && [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then
+ if [[ -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then
+ dosym -r /var/lib/bitcoin{d,/.bitcoin}
+ elif [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] ; then
+ efmt ewarn <<-EOF
+ Your bitcoind data directory is located at ${EPREFIX}/var/lib/bitcoin/.bitcoin,
+ a deprecated location. To perform an automated migration to
+ ${EPREFIX}/var/lib/bitcoind, first shut down any running bitcoind instances
+ that may be using the deprecated path, and then run:
+
+ # emerge --config ${CATEGORY}/${PN}
+ EOF
+ insinto /var/lib/bitcoin
+ mv -- "${ED}/var/lib/bitcoin"{d,/.bitcoin} || die
+ dosym -r {/etc/,/var/lib/bitcoin/.}bitcoin/bitcoin.conf
+ dosym -r /var/lib/bitcoin{/.bitcoin,d}
+ fi
+ fi
+
+ if use kde && [[ -d "${EROOT}/usr/share/kde4" ]] ; then
+ dosym -r /usr/share/{kservices5,kde4/services}/bitcoin-qt.protocol
+ fi
+}
+
+pkg_postinst() {
+ # we don't use xdg.eclass because it adds unconditional IDEPENDs
+ if use gui ; then
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ fi
+
+ if use daemon && [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ efmt -su elog <<-EOF
+ To have ${PN} automatically use Tor when it's running, be sure your \
+ 'torrc' config file has 'ControlPort' and 'CookieAuthentication' set up \
+ correctly, and:
+ - Using an init script: add the 'bitcoin' user to the 'tor' user group.
+ - Running bitcoind directly: add that user to the 'tor' user group.
+ EOF
+ fi
+
+ if use cli && use daemon ; then
+ efmt -su elog <<-EOF
+ To use bitcoin-cli with the /etc/init.d/bitcoind service:
+ - Add your user(s) to the 'bitcoin' group.
+ - Symlink ~/.bitcoin to /var/lib/bitcoind.
+ EOF
+ fi
+
+ if use berkdb ; then
+ # https://github.com/bitcoin/bitcoin/pull/28597
+ # https://bitcoincore.org/en/releases/26.0/#wallet
+ efmt ewarn <<-EOF
+ Creation of legacy (Berkeley DB) wallets is refused starting with Bitcoin
+ Core 26.0, pending the deprecation and eventual removal of support for
+ legacy wallets altogether in future releases. At present you can still
+ force support for the creation of legacy wallets by adding the following
+ line to your bitcoin.conf:
+
+ deprecatedrpc=create_bdb
+ EOF
+ fi
+}
+
+pkg_postrm() {
+ if use gui ; then
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ fi
+}
+
+pkg_config() {
+ if [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" && ! -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] &&
+ [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]]
+ then
+ in_use() {
+ : ${1:?} ; local each
+ if command -v fuser >/dev/null ; then
+ fuser "${@}" >/dev/null 2>&1
+ elif command -v lsof >/dev/null ; then
+ for each ; do
+ lsof -- "${each}" && return
+ done >/dev/null 2>&1
+ elif mountpoint -q /proc ; then
+ { find /proc/[0-9]*/{cwd,exe,fd} -type l -exec readlink -- {} +
+ awk '{ print $6 }' /proc/[0-9]*/maps
+ } 2>/dev/null | grep -Fqx -f <(printf '%s\n' "${@}" ; readlink -m -- "${@}")
+ else
+ return 13
+ fi
+ }
+ ebegin "Checking that ${EPREFIX}/var/lib/bitcoin/.bitcoin is not in use"
+ in_use "${EROOT}/var/lib/bitcoin/.bitcoin"{,/.lock}
+ case $? in
+ 0)
+ eend 1
+ efmt eerror <<-EOF
+ ${EPREFIX}/var/lib/bitcoin/.bitcoin is currently in use. Please stop any
+ running bitcoind instances that may be using this data directory, and then
+ retry this migration.
+ EOF
+ die "${EPREFIX}/var/lib/bitcoin/.bitcoin is in use"
+ ;;
+ 13)
+ eend 1
+ if [[ "${BITCOIND_IS_NOT_RUNNING}" != 1 ]] ; then
+ efmt eerror <<-EOF
+ Found no way to check whether ${EPREFIX}/var/lib/bitcoin/.bitcoin is in use.
+ Do you have /proc mounted? To force the migration without checking, re-run
+ this command with BITCOIND_IS_NOT_RUNNING=1.
+ EOF
+ die "could not check whether ${EPREFIX}/var/lib/bitcoin/.bitcoin is in use"
+ fi
+ ;;
+ *)
+ eend 0
+ ;;
+ esac
+
+ # find all relative symlinks that point outside the data dir
+ local -A symlinks
+ cd -- "${EROOT}/var/lib/bitcoin/.bitcoin" || die
+ local each ; while read -r -d '' each ; do
+ local target=$(readlink -- "${each}") && [[ "${target}" == ../* ]] &&
+ target=$(readlink -e -- "${each}") && [[ "${target}" != "${EROOT}/var/lib/bitcoin/.bitcoin/"* ]] &&
+ symlinks["${each}"]="${target}"
+ done < <(find -type l -print0)
+
+ einfo "Moving your ${EPREFIX}/var/lib/bitcoin/.bitcoin to ${EPREFIX}/var/lib/bitcoind."
+ rm -f -- "${EROOT}/var/lib/bitcoind" || die
+ mv --no-clobber --no-copy --no-target-directory -- "${EROOT}/var/lib/bitcoin"{/.bitcoin,d} ||
+ die "Failed to move your ${EPREFIX}/var/lib/bitcoin/.bitcoin to ${EPREFIX}/var/lib/bitcoind."
+
+ # fix up the relative symlinks
+ cd -- "${EROOT}/var/lib/bitcoind" || die
+ for each in "${!symlinks[@]}" ; do
+ ln -fnrs -- "${symlinks[${each}]}" "${each}" # keep going even if this fails
+ done
+
+ einfo 'Creating a transitional symlink for your convenience.'
+ ln -fnrsv -- "${EROOT}/var/lib/bitcoin"{d,/.bitcoin}
+ einfo 'You may remove this link when you no longer need it.'
+ else
+ einfo 'Nothing to do.'
+ fi
+}
diff --git a/net-p2p/bitcoin-core/files/29.0-cmake-syslibs.patch b/net-p2p/bitcoin-core/files/29.0-cmake-syslibs.patch
new file mode 100644
index 000000000000..3c1be2e5203a
--- /dev/null
+++ b/net-p2p/bitcoin-core/files/29.0-cmake-syslibs.patch
@@ -0,0 +1,81 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3ad29249e9..4d775fbb89 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,7 +7,7 @@
+ #
+ # Centos Stream 9, https://www.centos.org/cl-vs-cs/#end-of-life, EOL in May 2027:
+ # - CMake 3.26.5, https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/
+-cmake_minimum_required(VERSION 3.22)
++cmake_minimum_required(VERSION 3.25)
+
+ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
+ message(FATAL_ERROR "In-source builds are not allowed.")
+@@ -163,6 +163,9 @@ if(WITH_MULTIPROCESS)
+ )
+ endif()
+
++option(WITH_SYSTEM_LIBSECP256K1 "Link with system-installed libsecp256k1." OFF)
++mark_as_advanced(WITH_SYSTEM_LIBSECP256K1)
++
+ cmake_dependent_option(BUILD_GUI_TESTS "Build test_bitcoin-qt executable." ON "BUILD_GUI;BUILD_TESTS" OFF)
+ if(BUILD_GUI)
+ set(qt_components Core Gui Widgets LinguistTools)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 41577b2ad6..01d601729f 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -19,6 +19,44 @@ include(../cmake/crc32c.cmake)
+ include(../cmake/leveldb.cmake)
+ include(../cmake/minisketch.cmake)
+ add_subdirectory(univalue)
++
++if(WITH_SYSTEM_LIBSECP256K1)
++
++find_package(PkgConfig REQUIRED)
++pkg_check_modules(libsecp256k1 REQUIRED IMPORTED_TARGET libsecp256k1)
++add_library(secp256k1 ALIAS PkgConfig::libsecp256k1)
++block()
++ string(APPEND CMAKE_REQUIRED_FLAGS " ${libsecp256k1_CFLAGS_OTHER}")
++ list(APPEND CMAKE_REQUIRED_INCLUDES ${libsecp256k1_INCLUDE_DIRS})
++ list(APPEND CMAKE_REQUIRED_LINK_OPTIONS ${libsecp256k1_LDFLAGS})
++ list(APPEND CMAKE_REQUIRED_LIBRARIES ${libsecp256k1_LIBRARIES})
++ unset(missing_modules)
++ include(CheckSymbolExists)
++ macro(check_secp256k1_module module symbol)
++ string(TOUPPER "${symbol}" VAR)
++ set(VAR "libsecp256k1_HAS_${VAR}")
++ unset(${VAR})
++ check_symbol_exists("${symbol}" "secp256k1_${module}.h" ${VAR})
++ if(NOT ${VAR})
++ list(APPEND missing_modules "${module}")
++ endif()
++ endmacro()
++ message(CHECK_START "Checking for required libsecp256k1 modules")
++ list(APPEND CMAKE_MESSAGE_INDENT " ")
++ check_secp256k1_module(ellswift secp256k1_ellswift_create)
++ check_secp256k1_module(extrakeys secp256k1_xonly_pubkey_parse)
++ check_secp256k1_module(recovery secp256k1_ecdsa_recover)
++ check_secp256k1_module(schnorrsig secp256k1_schnorrsig_verify)
++ list(POP_BACK CMAKE_MESSAGE_INDENT)
++ if(missing_modules)
++ list(JOIN missing_modules ", " missing_modules)
++ message(FATAL_ERROR "System-installed libsecp256k1 lacks these required modules: ${missing_modules}.")
++ endif()
++ message(CHECK_PASS "all were found")
++endblock()
++
++else() # !WITH_SYSTEM_LIBSECP256K1
++
+ #=============================
+ # secp256k1 subtree
+ #=============================
+@@ -68,6 +106,8 @@ set_target_properties(secp256k1 PROPERTIES
+ )
+ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
++endif() # !WITH_SYSTEM_LIBSECP256K1
++
+ # Set top-level target output locations.
+ if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/bitcoin-core/files/, net-p2p/bitcoin-core/
@ 2025-04-20 21:36 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2025-04-20 21:36 UTC (permalink / raw
To: gentoo-commits
commit: fda3c63f1901a294ba8fa1ad4db0c71276c08b2d
Author: Matt Whitlock <gentoo <AT> mattwhitlock <DOT> name>
AuthorDate: Sun Apr 20 20:50:58 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 20 21:36:08 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fda3c63f
net-p2p/bitcoin-core-29.0: import Qt 6 patch from upstream
Closes: https://bugs.gentoo.org/954108
Signed-off-by: Matt Whitlock <gentoo <AT> mattwhitlock.name>
Closes: https://github.com/gentoo/gentoo/pull/41677
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-p2p/bitcoin-core/Manifest | 1 -
net-p2p/bitcoin-core/bitcoin-core-29.0.ebuild | 3 +-
net-p2p/bitcoin-core/files/29.0-qt6.patch | 394 ++++++++++++++++++++++++++
3 files changed, 395 insertions(+), 3 deletions(-)
diff --git a/net-p2p/bitcoin-core/Manifest b/net-p2p/bitcoin-core/Manifest
index 71162880c567..32fb82b5ca09 100644
--- a/net-p2p/bitcoin-core/Manifest
+++ b/net-p2p/bitcoin-core/Manifest
@@ -1,3 +1,2 @@
DIST bitcoin-core-28.1.tar.gz 12601466 BLAKE2B f6dd3c269b0e132798b3bea96a122a89b95e7544f01fd3401bfc2fd1ef11fc847a3570f8d5c0339778df0a3ecf17cf49af4148c2f68d7719d6f85ac2688e9d3c SHA512 859c5f0b2f927969766d3ebde64173469e5810694ba317629fac64c66311d847698ae093dbf585e327cf4e75983b722ff45a23ed3fe6f1f13752db4cf6846aa9
-DIST bitcoin-core-29.0-qt6.patch 16090 BLAKE2B cfa30f07cb9aad43092598d9b7ab45062b41e5c68836e81199f9d5fc32531239b7dffa9680370808e02953d76c6001f79c2f2558def101c0195e97d8bd978e49 SHA512 f8e79a7a90e423a649baccbd89dc4bbaa6f40e4b327ace5a44b183ac363281c5e6e263406daff6f390af4e202c98bff115511ac3a334bcd81af42af6e97e5f24
DIST bitcoin-core-29.0.tar.gz 12931219 BLAKE2B ee4a9b67ceb3e7a1851f844a090a099267798f83fbeb4fb76e0dd30ec24ce3fb967ab032179492cb8c02f0e470b3c2546ad589f940487bb0a0cc4d469bf3e1f9 SHA512 1373348fff7ac978fd28a8e29eda9ba9af745f947153a2c6c099b1e997d0d55611627f4c5299e350be3a9b555406da6bf056d2c5f6c123077e2872f5db7b3459
diff --git a/net-p2p/bitcoin-core/bitcoin-core-29.0.ebuild b/net-p2p/bitcoin-core/bitcoin-core-29.0.ebuild
index beb2264add1e..af4809227550 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-29.0.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-29.0.ebuild
@@ -11,7 +11,6 @@ DESCRIPTION="Reference implementation of the Bitcoin cryptocurrency"
HOMEPAGE="https://bitcoincore.org/"
SRC_URI="
https://github.com/bitcoin/bitcoin/archive/v${PV/_rc/rc}.tar.gz -> ${P}.tar.gz
- https://github.com/bitcoin/bitcoin/pull/30997/commits/f9472962d1cdf58bfc1ad64c4bb44ddf5d0b4db2.patch?full_index=1 -> ${PN}-29.0-qt6.patch
"
S="${WORKDIR}/${PN/-core}-${PV/_rc/rc}"
@@ -92,7 +91,7 @@ DOCS=(
)
PATCHES=(
- "${DISTDIR}/${PN}-29.0-qt6.patch"
+ "${FILESDIR}/29.0-qt6.patch"
"${FILESDIR}/29.0-cmake-syslibs.patch"
"${FILESDIR}/26.0-init.patch"
)
diff --git a/net-p2p/bitcoin-core/files/29.0-qt6.patch b/net-p2p/bitcoin-core/files/29.0-qt6.patch
new file mode 100644
index 000000000000..d4d25f57f919
--- /dev/null
+++ b/net-p2p/bitcoin-core/files/29.0-qt6.patch
@@ -0,0 +1,394 @@
+https://github.com/bitcoin/bitcoin/pull/30997
+
+From 6d4214925fadc36d26aa58903db5788c742e68c6 Mon Sep 17 00:00:00 2001
+From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
+Date: Wed, 2 Apr 2025 09:11:48 +0100
+Subject: [PATCH] cmake: Require Qt 6 to build GUI
+
+---
+ .github/ISSUE_TEMPLATE/good_first_issue.yml | 2 +-
+ CMakeLists.txt | 2 +-
+ cmake/module/FindQt.cmake | 21 --------
+ doc/build-freebsd.md | 4 +-
+ doc/build-netbsd.md | 4 +-
+ doc/build-openbsd.md | 6 +--
+ doc/build-osx.md | 4 +-
+ doc/build-unix.md | 12 +++--
+ src/qt/CMakeLists.txt | 58 +++++++++++++++------
+ src/qt/sendcoinsdialog.cpp | 13 +++++
+ src/qt/sendcoinsdialog.h | 4 ++
+ src/qt/test/CMakeLists.txt | 2 +-
+ 12 files changed, 79 insertions(+), 53 deletions(-)
+
+diff --git a/.github/ISSUE_TEMPLATE/good_first_issue.yml b/.github/ISSUE_TEMPLATE/good_first_issue.yml
+index 133937c011af6..2a486b3f2b43b 100644
+--- a/.github/ISSUE_TEMPLATE/good_first_issue.yml
++++ b/.github/ISSUE_TEMPLATE/good_first_issue.yml
+@@ -28,7 +28,7 @@ body:
+ id: useful-skills
+ attributes:
+ label: Useful Skills
+- description: For example, “`std::thread`”, “Qt5 GUI and async GUI design” or “basic understanding of Bitcoin mining and the Bitcoin Core RPC interface”.
++ description: For example, “`std::thread`”, “Qt6 GUI and async GUI design” or “basic understanding of Bitcoin mining and the Bitcoin Core RPC interface”.
+ value: |
+ * Compiling Bitcoin Core from source
+ * Running the C++ unit tests and the Python functional tests
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bbcedcec2d617..119f4bea897f9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -174,7 +174,7 @@ if(BUILD_GUI)
+ if(BUILD_GUI_TESTS)
+ list(APPEND qt_components Test)
+ endif()
+- find_package(Qt 5.11.3 MODULE REQUIRED
++ find_package(Qt 6.2 MODULE REQUIRED
+ COMPONENTS ${qt_components}
+ )
+ unset(qt_components)
+diff --git a/cmake/module/FindQt.cmake b/cmake/module/FindQt.cmake
+index 2e43294a99699..d98af5bb56b1a 100644
+--- a/cmake/module/FindQt.cmake
++++ b/cmake/module/FindQt.cmake
+@@ -27,19 +27,6 @@ if(CMAKE_HOST_APPLE)
+ endif()
+ endif()
+
+-# Save CMAKE_FIND_ROOT_PATH_MODE_LIBRARY state.
+-unset(_qt_find_root_path_mode_library_saved)
+-if(DEFINED CMAKE_FIND_ROOT_PATH_MODE_LIBRARY)
+- set(_qt_find_root_path_mode_library_saved ${CMAKE_FIND_ROOT_PATH_MODE_LIBRARY})
+-endif()
+-
+-# The Qt config files internally use find_library() calls for all
+-# dependencies to ensure their availability. In turn, the find_library()
+-# inspects the well-known locations on the file system; therefore, it must
+-# be able to find platform-specific system libraries, for example:
+-# /usr/x86_64-w64-mingw32/lib/libm.a or /usr/arm-linux-gnueabihf/lib/libm.a.
+-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
+-
+ find_package(Qt${Qt_FIND_VERSION_MAJOR} ${Qt_FIND_VERSION}
+ COMPONENTS ${Qt_FIND_COMPONENTS}
+ HINTS ${_qt_homebrew_prefix}
+@@ -47,14 +34,6 @@ find_package(Qt${Qt_FIND_VERSION_MAJOR} ${Qt_FIND_VERSION}
+ )
+ unset(_qt_homebrew_prefix)
+
+-# Restore CMAKE_FIND_ROOT_PATH_MODE_LIBRARY state.
+-if(DEFINED _qt_find_root_path_mode_library_saved)
+- set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ${_qt_find_root_path_mode_library_saved})
+- unset(_qt_find_root_path_mode_library_saved)
+-else()
+- unset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY)
+-endif()
+-
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(Qt
+ REQUIRED_VARS Qt${Qt_FIND_VERSION_MAJOR}_DIR
+diff --git a/doc/build-freebsd.md b/doc/build-freebsd.md
+index 1c78b5c127a71..432a2ee2bec39 100644
+--- a/doc/build-freebsd.md
++++ b/doc/build-freebsd.md
+@@ -62,13 +62,13 @@ sh/bash: export BDB_PREFIX=[path displayed above]
+ ```
+
+ #### GUI Dependencies
+-###### Qt5
++###### Qt6
+
+ Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install
+ the necessary parts of Qt, the libqrencode and pass `-DBUILD_GUI=ON`. Skip if you don't intend to use the GUI.
+
+ ```bash
+-pkg install qt5-buildtools qt5-core qt5-gui qt5-linguisttools qt5-testlib qt5-widgets
++pkg install qt6-buildtools qt6-core qt6-gui qt6-linguisttools qt6-testlib qt6-widgets
+ ```
+
+ ###### libqrencode
+diff --git a/doc/build-netbsd.md b/doc/build-netbsd.md
+index 988f3b93a7a92..31cac3f6b6875 100644
+--- a/doc/build-netbsd.md
++++ b/doc/build-netbsd.md
+@@ -64,13 +64,13 @@ pkgin install db4
+ ```
+
+ #### GUI Dependencies
+-###### Qt5
++###### Qt6
+
+ Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install
+ the necessary parts of Qt, the libqrencode and pass `-DBUILD_GUI=ON`. Skip if you don't intend to use the GUI.
+
+ ```bash
+-pkgin install qt5-qtbase qt5-qttools
++pkgin install qt6-qtbase qt6-qttools
+ ```
+
+ ###### libqrencode
+diff --git a/doc/build-openbsd.md b/doc/build-openbsd.md
+index e55f2aec9e8b3..8beda3259fbf4 100644
+--- a/doc/build-openbsd.md
++++ b/doc/build-openbsd.md
+@@ -56,13 +56,13 @@ export BDB_PREFIX="[path displayed above]"
+ ```
+
+ #### GUI Dependencies
+-###### Qt5
++###### Qt6
+
+ Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install
+ the necessary parts of Qt, the libqrencode and pass `-DBUILD_GUI=ON`. Skip if you don't intend to use the GUI.
+
+ ```bash
+-pkg_add qtbase qttools
++pkg_add qt6-qtbase qt6-qttools
+ ```
+
+ ###### libqrencode
+@@ -100,7 +100,7 @@ pkg_add python py3-zmq # Select the newest version of the python package if nec
+ There are many ways to configure Bitcoin Core, here are a few common examples:
+
+ ##### Descriptor Wallet and GUI:
+-This enables descriptor wallet support and the GUI, assuming SQLite and Qt 5 are installed.
++This enables descriptor wallet support and the GUI, assuming SQLite and Qt 6 are installed.
+
+ ```bash
+ cmake -B build -DBUILD_GUI=ON
+diff --git a/doc/build-osx.md b/doc/build-osx.md
+index 4d92abfc21584..6f921b7782772 100644
+--- a/doc/build-osx.md
++++ b/doc/build-osx.md
+@@ -92,11 +92,9 @@ Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compi
+ Qt, libqrencode and pass `-DBUILD_GUI=ON`. Skip if you don't intend to use the GUI.
+
+ ``` bash
+-brew install qt@5
++brew install qt@6
+ ```
+
+-Note: Building may fail if Qt 6 is installed (`qt` or `qt@6`)
+-
+ Note: Building with Qt binaries downloaded from the Qt website is not officially supported.
+ See the notes in [#7714](https://github.com/bitcoin/bitcoin/issues/7714).
+
+diff --git a/doc/build-unix.md b/doc/build-unix.md
+index 7ebff97bbcb42..df7d6f3349bb1 100644
+--- a/doc/build-unix.md
++++ b/doc/build-unix.md
+@@ -73,11 +73,13 @@ GUI dependencies:
+ Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install
+ the necessary parts of Qt, the libqrencode and pass `-DBUILD_GUI=ON`. Skip if you don't intend to use the GUI.
+
+- sudo apt-get install qtbase5-dev qttools5-dev qttools5-dev-tools
++ sudo apt-get install qt6-base-dev qt6-tools-dev qt6-l10n-tools
++
++For Qt 6.5 and later, the `libxcb-cursor0` package must be installed at runtime.
+
+ Additionally, to support Wayland protocol for modern desktop environments:
+
+- sudo apt install qtwayland5
++ sudo apt install qt6-wayland
+
+ The GUI will be able to encode addresses in QR codes unless this feature is explicitly disabled. To install libqrencode, run:
+
+@@ -121,11 +123,13 @@ GUI dependencies:
+ Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install
+ the necessary parts of Qt, the libqrencode and pass `-DBUILD_GUI=ON`. Skip if you don't intend to use the GUI.
+
+- sudo dnf install qt5-qttools-devel qt5-qtbase-devel
++ sudo dnf install qt6-qtbase-devel qt6-qttools-devel
++
++For Qt 6.5 and later, the `xcb-util-cursor` package must be installed at runtime.
+
+ Additionally, to support Wayland protocol for modern desktop environments:
+
+- sudo dnf install qt5-qtwayland
++ sudo dnf install qt6-qtwayland
+
+ The GUI will be able to encode addresses in QR codes unless this feature is explicitly disabled. To install libqrencode, run:
+
+diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt
+index 797b49c624dd2..20c77e5bb3421 100644
+--- a/src/qt/CMakeLists.txt
++++ b/src/qt/CMakeLists.txt
+@@ -11,21 +11,35 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ string(APPEND CMAKE_OBJCXX_COMPILE_OBJECT " ${APPEND_CPPFLAGS} ${APPEND_CXXFLAGS}")
+ endif()
+
+-get_target_property(qt_lib_type Qt5::Core TYPE)
++get_target_property(qt_lib_type Qt6::Core TYPE)
+
+ function(import_plugins target)
+ if(qt_lib_type STREQUAL "STATIC_LIBRARY")
+- set(plugins Qt5::QMinimalIntegrationPlugin)
++ set(plugins Qt6::QMinimalIntegrationPlugin)
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+- list(APPEND plugins Qt5::QXcbIntegrationPlugin)
++ list(APPEND plugins Qt6::QXcbIntegrationPlugin)
+ elseif(WIN32)
+- list(APPEND plugins Qt5::QWindowsIntegrationPlugin Qt5::QWindowsVistaStylePlugin)
++ list(APPEND plugins Qt6::QWindowsIntegrationPlugin Qt6::QWindowsVistaStylePlugin)
+ elseif(APPLE)
+- list(APPEND plugins Qt5::QCocoaIntegrationPlugin Qt5::QMacStylePlugin)
++ list(APPEND plugins Qt6::QCocoaIntegrationPlugin Qt6::QMacStylePlugin)
+ endif()
+- qt5_import_plugins(${target}
++ qt6_import_plugins(${target}
+ INCLUDE ${plugins}
+- EXCLUDE_BY_TYPE imageformats iconengines
++ EXCLUDE_BY_TYPE
++ accessiblebridge
++ platforms
++ platforms_darwin
++ xcbglintegrations
++ platformthemes
++ platforminputcontexts
++ generic
++ iconengines
++ imageformats
++ egldeviceintegrations
++ styles
++ networkaccess
++ networkinformation
++ tls
+ )
+ endif()
+ endfunction()
+@@ -45,7 +59,7 @@ set(CMAKE_AUTOUIC_SEARCH_PATHS forms)
+ # to https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/main/update-translations.py
+ file(GLOB ts_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} locale/*.ts)
+ set_source_files_properties(${ts_files} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/locale)
+-qt5_add_translation(qm_files ${ts_files})
++qt6_add_translation(qm_files ${ts_files})
+
+ configure_file(bitcoin_locale.qrc bitcoin_locale.qrc USE_SOURCE_PERMISSIONS COPYONLY)
+
+@@ -128,7 +142,7 @@ set_property(SOURCE macnotificationhandler.mm
+ )
+ target_link_libraries(bitcoinqt
+ PUBLIC
+- Qt5::Widgets
++ Qt6::Widgets
+ PRIVATE
+ core_interface
+ bitcoin_cli
+@@ -206,19 +220,33 @@ if(ENABLE_WALLET)
+ target_link_libraries(bitcoinqt
+ PRIVATE
+ bitcoin_wallet
+- Qt5::Network
++ Qt6::Network
+ )
+ endif()
+
+ if(WITH_DBUS)
+- target_link_libraries(bitcoinqt PRIVATE Qt5::DBus)
++ target_link_libraries(bitcoinqt PRIVATE Qt6::DBus)
+ endif()
+
+ if(qt_lib_type STREQUAL "STATIC_LIBRARY")
+ # We want to define static plugins to link ourselves, thus preventing
+ # automatic linking against a "sane" set of default static plugins.
+- qt5_import_plugins(bitcoinqt
+- EXCLUDE_BY_TYPE bearer iconengines imageformats platforms styles
++ qt6_import_plugins(bitcoinqt
++ EXCLUDE_BY_TYPE
++ accessiblebridge
++ platforms
++ platforms_darwin
++ xcbglintegrations
++ platformthemes
++ platforminputcontexts
++ generic
++ iconengines
++ imageformats
++ egldeviceintegrations
++ styles
++ networkaccess
++ networkinformation
++ tls
+ )
+ endif()
+
+@@ -321,8 +349,8 @@ else()
+ file(GLOB ui_files ${CMAKE_CURRENT_SOURCE_DIR}/forms/*.ui)
+ add_custom_target(translate
+ COMMAND ${CMAKE_COMMAND} -E env XGETTEXT=${XGETTEXT_EXECUTABLE} COPYRIGHT_HOLDERS=${COPYRIGHT_HOLDERS} ${Python3_EXECUTABLE} ${PROJECT_SOURCE_DIR}/share/qt/extract_strings_qt.py ${translatable_sources}
+- COMMAND Qt5::lupdate -no-obsolete -I ${PROJECT_SOURCE_DIR}/src -locations relative ${CMAKE_CURRENT_SOURCE_DIR}/bitcoinstrings.cpp ${ui_files} ${qt_translatable_sources} -ts ${CMAKE_CURRENT_SOURCE_DIR}/locale/bitcoin_en.ts
+- COMMAND Qt5::lconvert -drop-translations -o ${CMAKE_CURRENT_SOURCE_DIR}/locale/bitcoin_en.xlf -i ${CMAKE_CURRENT_SOURCE_DIR}/locale/bitcoin_en.ts
++ COMMAND Qt6::lupdate -no-obsolete -I ${PROJECT_SOURCE_DIR}/src -locations relative ${CMAKE_CURRENT_SOURCE_DIR}/bitcoinstrings.cpp ${ui_files} ${qt_translatable_sources} -ts ${CMAKE_CURRENT_SOURCE_DIR}/locale/bitcoin_en.ts
++ COMMAND Qt6::lconvert -drop-translations -o ${CMAKE_CURRENT_SOURCE_DIR}/locale/bitcoin_en.xlf -i ${CMAKE_CURRENT_SOURCE_DIR}/locale/bitcoin_en.ts
+ COMMAND ${SED_EXECUTABLE} -i.old -e "s|source-language=\"en\" target-language=\"en\"|source-language=\"en\"|" -e "/<target xml:space=\"preserve\"><\\/target>/d" ${CMAKE_CURRENT_SOURCE_DIR}/locale/bitcoin_en.xlf
+ COMMAND ${CMAKE_COMMAND} -E rm ${CMAKE_CURRENT_SOURCE_DIR}/locale/bitcoin_en.xlf.old
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src
+diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
+index 0ee1b359fa91d..48496c5135517 100644
+--- a/src/qt/sendcoinsdialog.cpp
++++ b/src/qt/sendcoinsdialog.cpp
+@@ -88,7 +88,11 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p
+
+ // Coin Control
+ connect(ui->pushButtonCoinControl, &QPushButton::clicked, this, &SendCoinsDialog::coinControlButtonClicked);
++#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0))
++ connect(ui->checkBoxCoinControlChange, &QCheckBox::checkStateChanged, this, &SendCoinsDialog::coinControlChangeChecked);
++#else
+ connect(ui->checkBoxCoinControlChange, &QCheckBox::stateChanged, this, &SendCoinsDialog::coinControlChangeChecked);
++#endif
+ connect(ui->lineEditCoinControlChange, &QValidatedLineEdit::textEdited, this, &SendCoinsDialog::coinControlChangeEdited);
+
+ // Coin Control: clipboard actions
+@@ -183,8 +187,13 @@ void SendCoinsDialog::setModel(WalletModel *_model)
+ #endif
+
+ connect(ui->customFee, &BitcoinAmountField::valueChanged, this, &SendCoinsDialog::coinControlUpdateLabels);
++#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0))
++ connect(ui->optInRBF, &QCheckBox::checkStateChanged, this, &SendCoinsDialog::updateSmartFeeLabel);
++ connect(ui->optInRBF, &QCheckBox::checkStateChanged, this, &SendCoinsDialog::coinControlUpdateLabels);
++#else
+ connect(ui->optInRBF, &QCheckBox::stateChanged, this, &SendCoinsDialog::updateSmartFeeLabel);
+ connect(ui->optInRBF, &QCheckBox::stateChanged, this, &SendCoinsDialog::coinControlUpdateLabels);
++#endif
+ CAmount requiredFee = model->wallet().getRequiredFee(1000);
+ ui->customFee->SetMinValue(requiredFee);
+ if (ui->customFee->value() < requiredFee) {
+@@ -944,7 +953,11 @@ void SendCoinsDialog::coinControlButtonClicked()
+ }
+
+ // Coin Control: checkbox custom change address
++#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0))
++void SendCoinsDialog::coinControlChangeChecked(Qt::CheckState state)
++#else
+ void SendCoinsDialog::coinControlChangeChecked(int state)
++#endif
+ {
+ if (state == Qt::Unchecked)
+ {
+diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h
+index 4e861e55bb3b7..6ab26df177857 100644
+--- a/src/qt/sendcoinsdialog.h
++++ b/src/qt/sendcoinsdialog.h
+@@ -103,7 +103,11 @@ private Q_SLOTS:
+ void refreshBalance();
+ void coinControlFeatureChanged(bool);
+ void coinControlButtonClicked();
++#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0))
++ void coinControlChangeChecked(Qt::CheckState);
++#else
+ void coinControlChangeChecked(int);
++#endif
+ void coinControlChangeEdited(const QString &);
+ void coinControlUpdateLabels();
+ void coinControlClipboardQuantity();
+diff --git a/src/qt/test/CMakeLists.txt b/src/qt/test/CMakeLists.txt
+index 3acdfeade3421..cbfb144596bcc 100644
+--- a/src/qt/test/CMakeLists.txt
++++ b/src/qt/test/CMakeLists.txt
+@@ -20,7 +20,7 @@ target_link_libraries(test_bitcoin-qt
+ test_util
+ bitcoin_node
+ Boost::headers
+- Qt5::Test
++ Qt6::Test
+ )
+
+ import_plugins(test_bitcoin-qt)
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-20 21:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-02 5:06 [gentoo-commits] repo/gentoo:master commit in: net-p2p/bitcoin-core/files/, net-p2p/bitcoin-core/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2025-04-20 21:36 Sam James
2025-03-20 0:06 Sam James
2024-08-08 11:08 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox