commit: cc461cdc0f9df3e304eb8d0052470de6f25d3788 Author: Matt Whitlock <gentoo <AT> mattwhitlock <DOT> name> AuthorDate: Sun Jan 18 06:54:55 2026 +0000 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> CommitDate: Tue Feb 10 08:49:26 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc461cdc
net-p2p/bitcoin-core: drop old Signed-off-by: Matt Whitlock <gentoo <AT> mattwhitlock.name> Part-of: https://github.com/gentoo/gentoo/pull/45409 Closes: https://github.com/gentoo/gentoo/pull/45409 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> net-p2p/bitcoin-core/Manifest | 1 - net-p2p/bitcoin-core/bitcoin-core-29.0.ebuild | 408 -------------------------- net-p2p/bitcoin-core/files/29.0-qt6.patch | 394 ------------------------- 3 files changed, 803 deletions(-) diff --git a/net-p2p/bitcoin-core/Manifest b/net-p2p/bitcoin-core/Manifest index 6cfe728f5d00..4a74cc9920e7 100644 --- a/net-p2p/bitcoin-core/Manifest +++ b/net-p2p/bitcoin-core/Manifest @@ -1,4 +1,3 @@ -DIST bitcoin-core-29.0.tar.gz 12931219 BLAKE2B ee4a9b67ceb3e7a1851f844a090a099267798f83fbeb4fb76e0dd30ec24ce3fb967ab032179492cb8c02f0e470b3c2546ad589f940487bb0a0cc4d469bf3e1f9 SHA512 1373348fff7ac978fd28a8e29eda9ba9af745f947153a2c6c099b1e997d0d55611627f4c5299e350be3a9b555406da6bf056d2c5f6c123077e2872f5db7b3459 DIST bitcoin-core-29.0-qt6.patch 16737 BLAKE2B bf863852ad8d313ad26612f149612944949b93f3b6f4f1891587226bbf11fcfc5c29b63a59965bfd56f7edec27c82cef2209e40201963d4227e46fa87664f694 SHA512 af19a7ddee9f0cce85684149a130715df8511b9e4f38e5e3a79cf14586f1f73bde671a5ed1d44da870b3f2352d3c8e561b1ffa01e224e253019c71dfc4544476 DIST bitcoin-core-29.2.tar.gz 12874820 BLAKE2B 43c57637f9ae842935cc27c8d16cfbdc7a2abe7ed55f58666f3bd3a2aa2826532a2207a35a27ed846b86ea2b304e22a99446d6d7138d202029ce9bde82353577 SHA512 1c3eb5988e1f6b0292f103de3e7911dc9430429687158988c510e647520d094e55b7cc63fd9044db9225111811368c1998b8320066bcec4f154e771e2beee7eb DIST bitcoin-core-29.3.tar.gz 12882742 BLAKE2B eac67459c29ceb38b685a5de9ebf382371f24175885e9d9ff2964746ee848bec56e71ac048e9727db5a2010dfd3c995ace05e266af00107c2af172889fd29703 SHA512 66e726eff5cca74c0baa58a4ac85ff054849567dc8b9c1dd221ca11dfbdf52887835afc5b8c9cf5c8acc1c8045c815e720cfb92ec8dfe07a06ecdf673e52294d diff --git a/net-p2p/bitcoin-core/bitcoin-core-29.0.ebuild b/net-p2p/bitcoin-core/bitcoin-core-29.0.ebuild deleted file mode 100644 index f9d55b3b221e..000000000000 --- a/net-p2p/bitcoin-core/bitcoin-core-29.0.ebuild +++ /dev/null @@ -1,408 +0,0 @@ -# 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" -fi -IUSE="asm +berkdb +cli +daemon dbus examples +external-signer gui qrcode +sqlite +system-libsecp256k1 systemtap test test-full zeromq" -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - dbus? ( 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. -COMMON_DEPEND=" - >=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] ) - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( - >=dev-qt/qtbase-6.2:6[dbus?,gui,network,widgets] - ) - 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:= ) -" -RDEPEND=" - ${COMMON_DEPEND} - !dev-util/bitcoin-tx - cli? ( !net-p2p/bitcoin-cli ) - daemon? ( !net-p2p/bitcoind ) - gui? ( !net-p2p/bitcoin-qt ) -" -DEPEND=" - ${COMMON_DEPEND} - systemtap? ( >=dev-debug/systemtap-4.8 ) -" -BDEPEND=" - >=dev-build/cmake-3.25 - virtual/pkgconfig - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( >=dev-qt/qttools-6.2:6[linguist] ) - 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/release-notes.md - doc/REST-interface.md - doc/tor.md -) - -PATCHES=( - "${FILESDIR}/29.0-qt6.patch" - "${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() { - # https://bugs.gentoo.org/958361 - # https://github.com/google/crc32c/commit/2bbb3be42e20a0e6c0f7b39dc07dc863d9ffbc07 - sed -e '/^cmake_minimum_required(VERSION 3\.1)$/s/)$/6)/' -i src/crc32c/CMakeLists.txt || die - - 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=( - -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON - -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) - -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" - 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 -} - -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-qt6.patch b/net-p2p/bitcoin-core/files/29.0-qt6.patch deleted file mode 100644 index d4d25f57f919..000000000000 --- a/net-p2p/bitcoin-core/files/29.0-qt6.patch +++ /dev/null @@ -1,394 +0,0 @@ -https://github.com/bitcoin/bitcoin/pull/30997 - -From 6d4214925fadc36d26aa58903db5788c742e68c6 Mon Sep 17 00:00:00 2001 -From: Hennadii Stepanov <[email protected]> -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)
