From 1120bb17c88985259de31aa3d3ccc936144455fa Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Sat, 6 Sep 2025 12:14:02 -0400 Subject: [PATCH 1/6] gdal: use macOS expat --- Formula/g/gdal.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Formula/g/gdal.rb b/Formula/g/gdal.rb index b0643151c7ffc..1c9edf659f8fd 100644 --- a/Formula/g/gdal.rb +++ b/Formula/g/gdal.rb @@ -35,7 +35,6 @@ class Gdal < Formula depends_on "c-blosc" depends_on "cfitsio" depends_on "epsilon" - depends_on "expat" depends_on "freexl" depends_on "geos" depends_on "giflib" @@ -75,6 +74,7 @@ class Gdal < Formula depends_on "zstd" uses_from_macos "curl" + uses_from_macos "expat" uses_from_macos "zlib" on_macos do @@ -93,7 +93,18 @@ def python3 "python3.13" end + # Work around superenv to avoid mixing `expat` usage in libraries across dependency tree. + # Brew `expat` usage in Python has low impact as it isn't loaded unless pyexpat is used. + # TODO: Consider adding a DSL for this or change how we handle Python's `expat` dependency + def remove_brew_expat + env_vars = %w[CMAKE_PREFIX_PATH HOMEBREW_INCLUDE_PATHS HOMEBREW_LIBRARY_PATHS PATH PKG_CONFIG_PATH] + ENV.remove env_vars, /(^|:)#{Regexp.escape(Formula["expat"].opt_prefix)}[^:]*/ + ENV.remove "HOMEBREW_DEPENDENCIES", "expat" + end + def install + remove_brew_expat if OS.mac? && MacOS.version < :sequoia + site_packages = prefix/Language::Python.site_packages(python3) # Work around Homebrew's "prefix scheme" patch which causes non-pip installs # to incorrectly try to write into HOMEBREW_PREFIX/lib since Python 3.10. From 482c80412792b6a8614def2354fce2daea06cc6b Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Sat, 6 Sep 2025 12:56:00 -0400 Subject: [PATCH 2/6] osm2pgrouting: use macOS expat --- Formula/o/osm2pgrouting.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Formula/o/osm2pgrouting.rb b/Formula/o/osm2pgrouting.rb index af564707c86e0..6f886adbf6bfa 100644 --- a/Formula/o/osm2pgrouting.rb +++ b/Formula/o/osm2pgrouting.rb @@ -20,17 +20,29 @@ class Osm2pgrouting < Formula depends_on "cmake" => :build depends_on "boost" - depends_on "expat" depends_on "libpq" depends_on "libpqxx" depends_on "pgrouting" depends_on "postgis" + uses_from_macos "expat" + # Fix build failure due to missing include # src/osm_elements/osm_tag.cpp:34:18: error: 'transform' is not a member of 'std' patch :DATA + # Work around superenv to avoid mixing `expat` usage in libraries across dependency tree. + # Brew `expat` usage in Python has low impact as it isn't loaded unless pyexpat is used. + # TODO: Consider adding a DSL for this or change how we handle Python's `expat` dependency + def remove_brew_expat + env_vars = %w[CMAKE_PREFIX_PATH HOMEBREW_INCLUDE_PATHS HOMEBREW_LIBRARY_PATHS PATH PKG_CONFIG_PATH] + ENV.remove env_vars, /(^|:)#{Regexp.escape(Formula["expat"].opt_prefix)}[^:]*/ + ENV.remove "HOMEBREW_DEPENDENCIES", "expat" + end + def install + remove_brew_expat if OS.mac? && MacOS.version < :sequoia + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args system "cmake", "--build", "build" system "cmake", "--install", "build" From b95253ef8fe6b87a945418b764cfd6f073710598 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Sat, 6 Sep 2025 12:56:53 -0400 Subject: [PATCH 3/6] osmcoastline: use macOS expat --- Formula/o/osmcoastline.rb | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Formula/o/osmcoastline.rb b/Formula/o/osmcoastline.rb index 24d63f8b2af93..9a3f7195fd9f2 100644 --- a/Formula/o/osmcoastline.rb +++ b/Formula/o/osmcoastline.rb @@ -20,25 +20,27 @@ class Osmcoastline < Formula depends_on "cmake" => :build depends_on "libosmium" => :build depends_on "protozero" => :build - depends_on "expat" depends_on "gdal" depends_on "geos" depends_on "libspatialite" depends_on "lz4" uses_from_macos "bzip2" + uses_from_macos "expat" uses_from_macos "sqlite" uses_from_macos "zlib" + # Work around superenv to avoid mixing `expat` usage in libraries across dependency tree. + # Brew `expat` usage in Python has low impact as it isn't loaded unless pyexpat is used. + # TODO: Consider adding a DSL for this or change how we handle Python's `expat` dependency + def remove_brew_expat + env_vars = %w[CMAKE_PREFIX_PATH HOMEBREW_INCLUDE_PATHS HOMEBREW_LIBRARY_PATHS PATH PKG_CONFIG_PATH] + ENV.remove env_vars, /(^|:)#{Regexp.escape(Formula["expat"].opt_prefix)}[^:]*/ + ENV.remove "HOMEBREW_DEPENDENCIES", "expat" + end + def install - # Work around an Xcode 15 linker issue which causes linkage against LLVM's - # libunwind due to it being present in a library search path. - if DevelopmentTools.clang_build_version >= 1500 - recursive_dependencies - .select { |d| d.name.match?(/^llvm(@\d+)?$/) } - .map { |llvm_dep| llvm_dep.to_formula.opt_lib } - .each { |llvm_lib| ENV.remove "HOMEBREW_LIBRARY_PATHS", llvm_lib } - end + remove_brew_expat if OS.mac? && MacOS.version < :sequoia protozero = Formula["protozero"].opt_include args = %W[ @@ -50,13 +52,13 @@ def install end test do - (testpath/"input.opl").write <<~EOS + (testpath/"input.opl").write <<~OPL n100 v1 x1.01 y1.01 n101 v1 x1.04 y1.01 n102 v1 x1.04 y1.04 n103 v1 x1.01 y1.04 w200 v1 Tnatural=coastline Nn100,n101,n102,n103,n100 - EOS + OPL system bin/"osmcoastline", "-v", "-o", "output.db", "input.opl" end end From 409d742e3a34c6dfea6a7be9fafed9646ad4070a Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Sat, 6 Sep 2025 21:38:03 +0000 Subject: [PATCH 4/6] gdal: update 3.11.3_4 bottle. --- Formula/g/gdal.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Formula/g/gdal.rb b/Formula/g/gdal.rb index 1c9edf659f8fd..ce97eacb45434 100644 --- a/Formula/g/gdal.rb +++ b/Formula/g/gdal.rb @@ -12,13 +12,14 @@ class Gdal < Formula end bottle do - sha256 arm64_sequoia: "fea0b9cda334378e06851d5c291df1cbf4ae7e4220610570f157783ad5e4c4d8" - sha256 arm64_sonoma: "0ff3c467ebfa62e83b552490211239b0fc01783d6aec69ba2b28842b20541a79" - sha256 arm64_ventura: "84cf20543815f7e25778455d1cc8814c4c813e5f97449030a76388170287a10d" - sha256 sonoma: "210cc7349ee41c49e047b618409c2183465eec4512f0c12227a476549699ecb0" - sha256 ventura: "0938d276cb4040177e9dfeeb9638a90f7294446f8d11fc5f63e8d7417f922f42" - sha256 arm64_linux: "bdfc2573bc414670d808ca968c126ece02f9adcef3468a16b564c9c2d8fae11c" - sha256 x86_64_linux: "b3d4b31c48736a51188ab9c2d92429ca26ce02e58acbbfcc6543a8bc3a147305" + rebuild 1 + sha256 arm64_sequoia: "d9191b89632150ddcf0b77f74b908795b1fdf359dac6abbb53121957dd7bf9a3" + sha256 arm64_sonoma: "500c686b1689b1ed0b9a556c7bc620233d5b7bf4580bd73725809bae3d8f7d5e" + sha256 arm64_ventura: "bf68ca5785f0f1165e287b152e4280e37500d7ffea5b596065186566a07ea085" + sha256 sonoma: "38e6fec46b4151827847a7ae281ab44fc8108bce40ad3632059ba9574c93b3f3" + sha256 ventura: "ae1afcd4ef70cb3b57e5d3c282e4569352762e9b68fbc828d3cfde471af4891d" + sha256 arm64_linux: "50da8ced232b17b6e41a222937ca9bdb813cbe91d432c8356a9eae046d42618c" + sha256 x86_64_linux: "03a5b2bc8188f4982d70275d8286258a6716cafd0fde28c5b302271d6eb465bf" end head do From 7e018b2ed148a34be95ed1eb704468d536cd9e12 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Sat, 6 Sep 2025 21:38:04 +0000 Subject: [PATCH 5/6] osm2pgrouting: update 2.3.8_17 bottle. --- Formula/o/osm2pgrouting.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Formula/o/osm2pgrouting.rb b/Formula/o/osm2pgrouting.rb index 6f886adbf6bfa..b119d3c1f9f05 100644 --- a/Formula/o/osm2pgrouting.rb +++ b/Formula/o/osm2pgrouting.rb @@ -10,12 +10,13 @@ class Osm2pgrouting < Formula no_autobump! because: :requires_manual_review bottle do - sha256 cellar: :any, arm64_sequoia: "14fb9c2006e86553e4d41bd2f51bf9e1a1bfaa417568ff0ecb0fa43deaf3c493" - sha256 cellar: :any, arm64_sonoma: "a5f667c57e12e3d40f0c5299b2f409fc8b97bf1a7ecc35176effb72db7fecb5b" - sha256 cellar: :any, arm64_ventura: "67c2f5cafb319a50c79aa142585d1dc7c7ccd722979bb73933af3bdfa9a5eba2" - sha256 cellar: :any, sonoma: "2e5b3b6b47c1dbd612d1b277bbf0028ff98100aee1eb01cdf4d0cb6ba3781077" - sha256 cellar: :any, ventura: "8f7219980749e1d34008b5e003fe242d126a644f338857ce45b80e65e5444cbb" - sha256 cellar: :any_skip_relocation, x86_64_linux: "974b9e601d21160fe5a186447872f943398b7579553eeb3fe522904dcd9746a2" + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "98b32784353c589877d2c2f192a879df3699aef5715bebddd9ce17b1d0af22d3" + sha256 cellar: :any, arm64_sonoma: "3b7e79d8ba1e24d0a54a528e40c8c0117e844874dbe07541758c2b7b9880af72" + sha256 cellar: :any, arm64_ventura: "1488bde56531bd16ca795364651236755b3f2549a60db5b566ff3ea2f4cc6d12" + sha256 cellar: :any, sonoma: "e07980e3e300a819dd87ff80f87034a4423fce2e2fc3b9a0c8126025c32ec276" + sha256 cellar: :any, ventura: "64fa667af838151ab67056f402a3d50a1145a9a146cd4b9e0f80c6ed7659880e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "84b05e22f51e109013269732427342871cf46b73a629a3a95ce03b8f754361f8" end depends_on "cmake" => :build From c775083f90e701aef9fa1465badc7145f5a09c51 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Sat, 6 Sep 2025 21:38:04 +0000 Subject: [PATCH 6/6] osmcoastline: update 2.4.1_1 bottle. --- Formula/o/osmcoastline.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Formula/o/osmcoastline.rb b/Formula/o/osmcoastline.rb index 9a3f7195fd9f2..32c541e5ecdab 100644 --- a/Formula/o/osmcoastline.rb +++ b/Formula/o/osmcoastline.rb @@ -7,14 +7,14 @@ class Osmcoastline < Formula revision 1 bottle do - rebuild 1 - sha256 cellar: :any, arm64_sequoia: "e916b8467a227287c206c34a792a829864578ba2c98c69206e07ca78c6bb05ca" - sha256 cellar: :any, arm64_sonoma: "f1ace5b789f7744191de53a328cd7927b446e7c1df4a0829faa66abcb46e6c72" - sha256 cellar: :any, arm64_ventura: "50450c237463b39c7bd5a4e128882b1f64ad20d7e96f1681a8c0f3cc44eee082" - sha256 cellar: :any, sonoma: "ce1a8e0d975c410c41b5a640e43963d7ee3cc40831bc1fa2deb9f6178f8457c2" - sha256 cellar: :any, ventura: "8f35bf9cd5ddf6ae48700da2485759bedbe60cf24d8c5ac57b2569609ff11e2b" - sha256 cellar: :any_skip_relocation, arm64_linux: "5476fe8a3f601975b8382daddd4db0cc107ae7c332d2db1155c87b46b9521602" - sha256 cellar: :any_skip_relocation, x86_64_linux: "b40f19c65b043198073b51666bd582f44a150e3712d0c3287ab35f375372e17a" + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "7461510ebcdfa1d486b69e15595105eb324bd15c9a4e6339b811c42b5a0e7ffe" + sha256 cellar: :any, arm64_sonoma: "fe78194e9aa2964afbc350073fd162a2fdc75bd6495faf3fd70949e58cd494b7" + sha256 cellar: :any, arm64_ventura: "0865ee2f7d54ac95a1ed2981e1e0f4440757163881dcb1a56fff16267ea1b689" + sha256 cellar: :any, sonoma: "1d94935f700e30bb7b65234701104deea79fdf34cd68be53b01b94e36f9a221c" + sha256 cellar: :any, ventura: "ae0525b18cc02254813fc116b75df743a637485e32d34a047dfbbb3fa894566f" + sha256 cellar: :any_skip_relocation, arm64_linux: "214c62abaed4acdc317d89a83681fa13e7798f3e79b82b6da59ee4374d0b088a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4deb169fe2a9cc48ddd8963591cf758b0c5f895bfa3562416ac5d538963ccd42" end depends_on "cmake" => :build