From cc7668c32c2256818a3683540cf0af9087fffd8a Mon Sep 17 00:00:00 2001 From: fanquake Date: Sun, 12 Oct 2025 10:10:40 +0100 Subject: [PATCH 1/2] bitcoin: 30.0 --- Formula/b/bitcoin.rb | 74 +++++--------------------------------------- 1 file changed, 7 insertions(+), 67 deletions(-) diff --git a/Formula/b/bitcoin.rb b/Formula/b/bitcoin.rb index bbf83e912478f..b4a34993caf35 100644 --- a/Formula/b/bitcoin.rb +++ b/Formula/b/bitcoin.rb @@ -1,14 +1,14 @@ class Bitcoin < Formula desc "Decentralized, peer to peer payment network" homepage "https://bitcoincore.org/" - url "https://bitcoincore.org/bin/bitcoin-core-29.1/bitcoin-29.1.tar.gz" - sha256 "067f624ae273b0d85a1554ffd7c098923351a647204e67034df6cc1dfacfa06b" + url "https://bitcoincore.org/bin/bitcoin-core-30.0/bitcoin-30.0.tar.gz" + sha256 "9b472a4d51dfed9aa9d0ded2cb8c7bcb9267f8439a23a98f36eb509c1a5e6974" license all_of: [ "MIT", "BSD-3-Clause", # src/crc32c, src/leveldb "BSL-1.0", # src/tinyformat.h - "Sleepycat", # resource("bdb") ] + head "https://github.com/bitcoin/bitcoin.git", branch: "master" livecheck do url "https://bitcoincore.org/en/download/" @@ -24,16 +24,10 @@ class Bitcoin < Formula sha256 x86_64_linux: "b7290cd2f6e3e5b41170d1d3fd7c7460c4a715bdb97cd5205655a68c454383cc" end - head do - url "https://github.com/bitcoin/bitcoin.git", branch: "master" - - # Move to stable block when updated to v30.0 - depends_on "capnp" => :build - end - depends_on "boost" => :build depends_on "cmake" => :build depends_on "pkgconf" => :build + depends_on "capnp" depends_on "libevent" depends_on macos: :sonoma # Needs C++20 features not available on Ventura depends_on "zeromq" @@ -46,57 +40,14 @@ class Bitcoin < Formula end fails_with :gcc do - version "10" + version "11" cause "Requires C++ 20" end - # berkeley db should be kept at version 4 - # https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md - # https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md - resource "bdb" do - url "https://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz" - sha256 "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef" - - # Fix build with recent clang - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/4c55b1/berkeley-db%404/clang.diff" - sha256 "86111b0965762f2c2611b302e4a95ac8df46ad24925bbb95a1961542a1542e40" - end - # Fix -flat_namespace being used on Big Sur and later. - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" - sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" - directory "dist" - end - end - def install - # https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md#berkeley-db - # https://github.com/bitcoin/bitcoin/blob/master/depends/packages/bdb.mk - resource("bdb").stage do - with_env(CFLAGS: ENV.cflags) do - # Fix compile with newer Clang - ENV.append "CFLAGS", "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1200 - # Fix linking with static libdb - ENV.append "CFLAGS", "-fPIC" if OS.linux? - - args = ["--disable-replication", "--disable-shared", "--enable-cxx"] - args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - - # BerkeleyDB requires you to build everything from the build_unix subdirectory - cd "build_unix" do - system "../dist/configure", *args, *std_configure_args(prefix: buildpath/"bdb") - system "make", "libdb_cxx-4.8.a", "libdb-4.8.a" - system "make", "install_lib", "install_include" - end - end - end - ENV.runtime_cpu_detection ENV.llvm_clang if OS.mac? && MacOS.version == :ventura - args = %W[ - -DWITH_BDB=ON - -DBerkeleyDB_INCLUDE_DIR:PATH=#{buildpath}/bdb/include + args = %w[ -DWITH_ZMQ=ON ] system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args @@ -110,17 +61,6 @@ def install end test do - system bin/"test_bitcoin" - - # Test that we're using the right version of `berkeley-db`. - port = free_port - bitcoind = spawn bin/"bitcoind", "-regtest", "-rpcport=#{port}", "-listen=0", "-datadir=#{testpath}", - "-deprecatedrpc=create_bdb" - sleep 15 - # This command will fail if we have too new a version. - system bin/"bitcoin-cli", "-regtest", "-datadir=#{testpath}", "-rpcport=#{port}", - "createwallet", "test-wallet", "false", "false", "", "false", "false" - ensure - Process.kill "TERM", bitcoind + system bin/"bitcoin", "test" end end From 404ab4b09c69d9345e8d982e0fcfc7cdeaba562f Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Mon, 13 Oct 2025 21:15:54 +0000 Subject: [PATCH 2/2] bitcoin: update 30.0 bottle. --- Formula/b/bitcoin.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Formula/b/bitcoin.rb b/Formula/b/bitcoin.rb index b4a34993caf35..7a6d71640afee 100644 --- a/Formula/b/bitcoin.rb +++ b/Formula/b/bitcoin.rb @@ -16,12 +16,12 @@ class Bitcoin < Formula end bottle do - sha256 cellar: :any, arm64_tahoe: "d1d61311699d38d3a69471adb9fc6789a2d6b6ccb6b325cf186500ce0bc60ae8" - sha256 cellar: :any, arm64_sequoia: "84de602ee27ca2d2653952586d88ecc79f0d3cd5318182ff9474780bcb2f4a47" - sha256 cellar: :any, arm64_sonoma: "e5af87cb95089b561a98f2a13037570f1128ee427c54ec52e57f7a1ea08cfbcf" - sha256 cellar: :any, sonoma: "b62278e3ada8701c9a542bee64adeaf50a5c8b1aa5b7cf172f9a96ddf24aed3b" - sha256 arm64_linux: "d1ca6acf2612a816805f118f1625b04ba332b23f1a97d2c3febed168862207a7" - sha256 x86_64_linux: "b7290cd2f6e3e5b41170d1d3fd7c7460c4a715bdb97cd5205655a68c454383cc" + sha256 cellar: :any, arm64_tahoe: "b41df41b0bdf46fe7877a738e33eaaf0eabc97361eb3b759e2712e1ec93a23a7" + sha256 cellar: :any, arm64_sequoia: "7174a1ba2ff1ed54708af13bb36f27424c37cae053c8dfda0ac19d0ac1d2671b" + sha256 cellar: :any, arm64_sonoma: "672a522db69b84fa3c9d1111e3cbbfe4b780ab915c449b8a67f6f142503eff8b" + sha256 cellar: :any, sonoma: "353356a2b200c3ef5e1c3727a11cd8ac86058673c157758e9aa3fee027146fca" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad4203d3296dae07be3e8d6ffe961e77faf4b1e76a59de729b7929c87c51c428" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae10c54ebb004117d6b3ab91f62fb6b6dc6e3ed9c6953686a79a20a3de340b60" end depends_on "boost" => :build