diff options
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/Manifest.gz | bin | 6101 -> 6099 bytes | |||
-rw-r--r-- | net-p2p/bitcoin-core/Manifest | 3 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/bitcoin-core-29.0_rc2.ebuild | 415 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/files/29.0-cmake-syslibs.patch | 81 |
4 files changed, 499 insertions, 0 deletions
diff --git a/net-p2p/Manifest.gz b/net-p2p/Manifest.gz Binary files differindex d997a7ae3bcb..2d65c6bed196 100644 --- a/net-p2p/Manifest.gz +++ b/net-p2p/Manifest.gz diff --git a/net-p2p/bitcoin-core/Manifest b/net-p2p/bitcoin-core/Manifest index bab6deae0f9e..fb5ddd07a0d3 100644 --- a/net-p2p/bitcoin-core/Manifest +++ b/net-p2p/bitcoin-core/Manifest @@ -1,11 +1,14 @@ AUX 26.0-init.patch 6487 BLAKE2B 22e7934a4eebc7cefa1ad0db7273f95a74e4e2605d9cc816267a74e030a531177ceec0bf1ffcdb1d31481073aa03474b83b7eb36e2d0ca50bc417f9f1ccdf1a5 SHA512 53994b0f1ad315e5dc490b3d3f1e0cfc692b2cb0ac1be10feb25395083f57a5c5a28df3035808ee83cd7c1769d5fb3e6c7ae9281dbee55bd5d12fac30f18b2fa AUX 28.0-syslibs.patch 10157 BLAKE2B 83bb56a5168a38a3d048318565c96892b703aabc2adf21fe44355f2d2900aeb0742fe132ba389c03bb8feb8f3654b9af0577fc449ad9bce022bcf833bb91843b SHA512 590645ee78c1d463502884c20846fce420067bd9945920fb0049b1f81de952f7ddeae1f4bc37acf07e5e9e424e511b6184c0478358e6c76bf76c3b18528ee573 +AUX 29.0-cmake-syslibs.patch 3058 BLAKE2B 62099a73953abf58c38bfff9c0cabaeb67823cc9ae7a62bba777c1516d222151da8127546cc6df8df0998c8256882dd0279413abea4dfe454bd9eed75b1f5353 SHA512 dd2e45db8828ec337bfb34344ada9846d84d0b2c2d0db0e265f41de1d98d3206709a7e737f1a59efe9db01ce63820b670573c4d0324e2d8bab30ecebc519be05 AUX bitcoin-qt.protocol 150 BLAKE2B b18645f52a6884fc0e475a85809d5b79e207adc346307623c5f1edececcb4564ac17bdb9a0deeb5c12c41409a34f83c1f22ab89f32852c58d948affa1de57edb SHA512 6b71d9d3fc9e05e6c6595aaaa307be9b5007c25f4b11162c5d873e200576d35156c2c660f229799400a3fba6dc8a9663ff8824371d83242d52ee6472687118ab AUX bitcoind.logrotate-r1 113 BLAKE2B ad27bb7f4f136c17117ca1f149b504da13f7a4ed1f7dce04f1ada2723a8900e94a0e2611aaa0f6d7545fc11d5ca3ecd6925e41875a2c3ed8a4f3e778bfcfb2a4 SHA512 51c77cddd6ff1c852112669b0c4180b04a6a91d8bfdce9d1df6560ac5ef5ebdfcc3998d81a0a47f24834b7314fe132fd9e90386c7eb8933b9c14d59bcc95d876 AUX bitcoind.openrc 2690 BLAKE2B ef44f88f5d03e488ba4793954ff22949fdb293fac64c4264041a7ccd3e261e98ee0d8037f1b4f851a0753295a44168f9ed352a3d09b423d52ffa289fdf7fd1e1 SHA512 827f049acdfff90b3d7dc211a199e86c66c59780a0590d586b1cedf164bfdfc73223b3881001b75d3bc9e5350e41f08a867f3d8fb8b154b284e4ddb90f9c2dd9 AUX org.bitcoin.bitcoin-qt.desktop 465 BLAKE2B 7ce8818cd967e478e6d41106b7111616b81856ae83db742ee53a28dde203cc6a2230daa562c78e7b59d1014bfe1633b4074685acb404966b2b9649c22c356262 SHA512 4f9e20094a6fb99dc47a799c9fd752d328efa2539aaab2230f9225cb80f8889fa7a28e1277694d04db72f7a052d208d6a208671dd3d0c77a9ec9d7a95169f148 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 EBUILD bitcoin-core-28.0.ebuild 12940 BLAKE2B fdcb90a8d8399c99ebfe2839224df94b31c008332724564ed729a0378688c9f1e0c2689d11c2a20954cd668cddd19b99703b5213c6aaf8718c76a8d26dee622b SHA512 e34c429ee7d76cf85255dee72c3e5a443dc5fd0c4662ff094524f5079c0c153d3d2c889e7d2aba4509bed2f8a8143d4c94bd4daa8cb3483ba6e91afc60db313f EBUILD bitcoin-core-28.1.ebuild 12779 BLAKE2B 0ec5c91a7f1adf317c861dc02561099feec17cd0ca513c7c29c5231409879184171856fbbeca4d598db37eb4d74e0ed92d225c6c3c267eebe7d08543607b5147 SHA512 d4c74162be296253135eac5bdf2c1ae477b536fb4c3e9a1a34a1ae76f4b8d5adc5c009decd0232443e96a93c81b3e242a49a6dc5ac1443bed6e8d01756957e34 +EBUILD bitcoin-core-29.0_rc2.ebuild 12698 BLAKE2B 97fa61a0c08a6322b703823bc9db978d8c038683a2969598e4112f783c843415bdfc16e70b1f5d5e0c6a060dd2b0e13c0f748f6497cd1dac8a748dbccccf7b1b SHA512 5fe4b177cb2b30c22905a87008957f253ec1ed4ec17a941748f9f8b67e9c0e3a0e93d22f0237c1ff3812dbc894f7317a20d581ecfb12af04d2efab3d911f2922 MISC metadata.xml 1643 BLAKE2B 35c9743c369e297d04428ba65a0389ff52db29a3fa42849332dca48d5bd8329447baf7e1311e16d5729fe5b2900cac56fb385f61f06a6d098ad5a6941a3ee6eb SHA512 3d69748916f62c2cf397100853e451bb10ce1a09d926bd7a280a1d5c80ef875adc34e227f9408dc7453bb3d155db1ef70d282cc59c5a701873368a5e63050c7c 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) |