@@ -67,6 +67,52 @@ compile_bitcoin_from_source()
6767 git clone --branch " v${target_bitcoin_version} " --depth 1 --quiet -c advice.detachedHead=false " ${BITCOIN_CORE_REPO} .git" " ${COMPILE_DIRECTORY} " 2> /dev/null
6868 cd " ${COMPILE_DIRECTORY} " /
6969
70+ log_info ' Configuring the build environment.'
71+ case " ${TARGET_OPERATING_SYSTEM} " in
72+ NetBSD)
73+ cmake -B build \
74+ -DCMAKE_C_COMPILER=" /usr/pkg/gcc12/bin/gcc" \
75+ -DCMAKE_CXX_COMPILER=" /usr/pkg/gcc12/bin/g++" \
76+ > /dev/null 2>&1
77+ ;;
78+ gentoo)
79+ cmake -B build \
80+ > /dev/null 2>&1
81+ ;;
82+ * )
83+ cmake -B build \
84+ -DBUILD_GUI=ON \
85+ > /dev/null 2>&1
86+ ;;
87+ esac
88+
89+ log_info ' Compiling source code. Please wait.'
90+ cmake --build build --parallel " ${compile_num_jobs:- ${SYS_CORES_PLUS_ONE} } " > /dev/null 2>&1
91+
92+ log_info ' Running compile checks. Please wait.'
93+ ctest --test-dir build --parallel " ${compile_num_jobs:- ${SYS_CORES_PLUS_ONE} } " > /dev/null 2>&1
94+
95+ log_info " Installing Bitcoin Core ${target_bitcoin_version} ."
96+ cmake --install build > /dev/null 2>&1 || sudo cmake --install build > /dev/null
97+ }
98+
99+ # TODO: use make on old releases and cmake on >= 29.0
100+ # shellcheck disable=SC2317
101+ compile_bitcoin_from_source_make ()
102+ {
103+ log_info ' Ensuring compile dependencies.'
104+ readonly COMPILE_DIRECTORY=" ${TEMP_DIRECTORY} /compile_bitcoin"
105+ readonly STDERR_COMPILE_LOG_FILE=" ${TEMP_DIRECTORY} /stderr_install.log"
106+ install_build_dependencies
107+
108+ log_info ' Downloading Bitcoin source code.'
109+ # shellcheck disable=SC2015
110+ command -v torsocks > /dev/null 2>&1 &&
111+ [ " ${TARGET_KERNEL} " != ' Darwin' ] &&
112+ torsocks git clone --branch " v${target_bitcoin_version} " --depth 1 --quiet -c advice.detachedHead=false " ${BITCOIN_CORE_REPO} .git" " ${COMPILE_DIRECTORY} " 2> /dev/null ||
113+ git clone --branch " v${target_bitcoin_version} " --depth 1 --quiet -c advice.detachedHead=false " ${BITCOIN_CORE_REPO} .git" " ${COMPILE_DIRECTORY} " 2> /dev/null
114+ cd " ${COMPILE_DIRECTORY} " /
115+
70116 log_info ' Analyzing hardware configuration.'
71117 command -v autoreconf > /dev/null 2>&1 ||
72118 throw_error " Build dependencies failed to install. Manually install 'autoconf' and try again."
@@ -879,9 +925,6 @@ install_build_dependencies_dnf()
879925 ;;
880926 esac
881927
882- dnf list installed epel-release > /dev/null 2>&1 ||
883- sudo dnf --assumeyes install " https://dl.fedoraproject.org/pub/epel/epel-release-latest-${OS_MAJOR_VERSION_ID} .noarch.rpm"
884-
885928 command -v torsocks > /dev/null 2>&1 &&
886929 dependencies=$( torsocks curl --fail --silent --show-error --location --retry 2 " ${BUILD_DEPENDENCIES_URL} " ) ||
887930 dependencies=$( curl --fail --silent --show-error --location --retry 5 " ${BUILD_DEPENDENCIES_URL} " )
@@ -934,34 +977,21 @@ install_build_dependencies_openbsd()
934977{
935978 readonly BUILD_DEPENDENCIES_URL=" ${DEPENDENCIES_BASE_URL} /build_dependencies_openbsd.txt"
936979 command -v torsocks > /dev/null 2>&1 &&
937- dependencies=$( torsocks curl --fail --silent --show-error --location --retry 2 " ${BUILD_DEPENDENCIES_URL} " ) ||
938- dependencies=$( curl --fail --silent --show-error --location --retry 5 " ${BUILD_DEPENDENCIES_URL} " )
980+ dependencies=$( torsocks curl --fail --silent --show-error --location --retry 2 " ${BUILD_DEPENDENCIES_URL} " | tr -d ' \r ' ) ||
981+ dependencies=$( curl --fail --silent --show-error --location --retry 5 " ${BUILD_DEPENDENCIES_URL} " | tr -d ' \r ' )
939982 [ -z " ${dependencies:- } " ] && throw_error " The list of dependencies is empty."
940983 for package in ${dependencies} ; do
941984 if [ " ${package} " = ' sqlite3' ]; then
942985 sudo pkg_add " ${package} " > /dev/null
943986 else
944987 package_latest_version=" $( pkg_info -Q " ${package} " | grep " ^${package} \-" | grep -v " ${package} \-[A-Za-z0-9]*\-" | sort -V | tail -1) "
945- [ " ${package} " = ' autoconf' ] && autoconf_package_latest_version=" ${package_latest_version} "
946- [ " ${package} " = ' automake' ] && automake_package_latest_version=" ${package_latest_version} "
947988 if [ -z " ${package_latest_version} " ]; then
948989 throw_error " Package '${package} ' was not found in pkg_info."
949990 elif [ " $( echo " ${package_latest_version} " | cut -d' ' -f2) " != ' (installed)' ]; then
950991 sudo pkg_add " ${package_latest_version} " > /dev/null
951992 fi
952993 fi
953994 done
954-
955- # major-minor version only
956- AUTOCONF_VERSION=" $( echo " ${autoconf_package_latest_version} " | cut -d' ' -f1 | cut -d- -f2 | cut -d. -f1,2) " &&
957- export AUTOCONF_VERSION
958- AUTOMAKE_VERSION=" $( echo " ${automake_package_latest_version} " | cut -d' ' -f1 | cut -d- -f2 | cut -d. -f1,2) " &&
959- export AUTOMAKE_VERSION
960-
961- [ -f /usr/local/bin/autoconf-2.72 ] &&
962- sudo ln -s /usr/local/bin/autoconf-2.72 /usr/local/bin/autoconf-2.72p0
963- [ -f /usr/local/bin/autoreconf-2.72 ] &&
964- sudo ln -s /usr/local/bin/autoreconf-2.72 /usr/local/bin/autoreconf-2.72p0
965995}
966996
967997install_build_dependencies_pacman ()
@@ -993,7 +1023,7 @@ install_build_dependencies_zypper()
9931023 dependencies=$( curl --fail --silent --show-error --location --retry 5 " ${BUILD_DEPENDENCIES_URL} " )
9941024 [ -z " ${dependencies:- } " ] && throw_error " The list of dependencies is empty."
9951025 printf ' %s\n' " ${dependencies} " | tr -d ' \r' | xargs sudo zypper --non-interactive --quiet install
996- export CXX=g++-13
1026+ export CXX=' g++-14 '
9971027}
9981028
9991029install_runtime_dependencies ()
@@ -1543,10 +1573,10 @@ readonly VALID_BITCOIN_VERSION_LIST='0.9.5 0.10.0 0.10.1 0.10.2 0.10.3 0.10.4 \
15431573 0.16.3 0.17.0 0.17.0.1 0.17.1 0.17.2 0.18.0 0.18.1 0.19.0 0.19.0.1 0.19.1 \
15441574 0.20.0 0.20.1 0.20.2 0.21.0 0.21.1 0.21.2 22.0 22.1 23.0 23.1 23.2 24.0 \
15451575 24.0.1 24.1 24.2 25.0 25.1 25.2 26.0 26.1 26.2 27.0 27.1 27.2 28.0 28.1 \
1546- 28.2'
1576+ 28.2 29.0 '
15471577
15481578# Bump this variable for new Bitcoin Core releases
1549- target_bitcoin_version=' 28.2 '
1579+ target_bitcoin_version=' 29.0 '
15501580
15511581# Instantiate the parameter variables
15521582compile_bitcoin_flag=' false'
@@ -1660,7 +1690,8 @@ readonly TARGET_OPERATING_SYSTEM_RELEASE
16601690
16611691readonly BITCOIN_CORE_REPO=' https://github.com/bitcoin/bitcoin'
16621692readonly NODEBUILDER_REPO=' https://github.com/bitcoin-tools/nodebuilder'
1663- readonly NODEBUILDER_DEPENDENCIES_TAG=' v1.12.0'
1693+ # TODO: during next release v2.0.0, change NODEBUILDER_DEPENDENCIES_TAG from master to the release tag
1694+ readonly NODEBUILDER_DEPENDENCIES_TAG=' master'
16641695readonly DEPENDENCIES_BASE_URL=" ${NODEBUILDER_REPO} /raw/${NODEBUILDER_DEPENDENCIES_TAG} /resources/dependencies"
16651696
16661697if [ " ${TARGET_KERNEL} " = ' NetBSD' ] && is_running_in_ci; then
0 commit comments