From 58df39ec1ca6c3c1cf91f19b44cc60512500207a Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 14 Dec 2023 10:50:51 +0000 Subject: [PATCH 01/11] tectonic: fix MacOS references. Needed after https://github.com/Homebrew/brew/pull/16306. --- Formula/t/tectonic.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Formula/t/tectonic.rb b/Formula/t/tectonic.rb index 539bfba7f298..a384b5791dcd 100644 --- a/Formula/t/tectonic.rb +++ b/Formula/t/tectonic.rb @@ -38,8 +38,11 @@ class Tectonic < Formula def install ENV.cxx11 - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version.to_s # needed for CLT-only builds - ENV.delete("HOMEBREW_SDKROOT") if MacOS.version == :high_sierra + + if OS.mac? + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version.to_s # needed for CLT-only builds + ENV.delete("HOMEBREW_SDKROOT") if MacOS.version == :high_sierra + end # Ensure that the `openssl` crate picks up the intended library. # https://crates.io/crates/openssl#manual-configuration From defd6d81be1be58f137bef2fa2dc389100d0125b Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 14 Dec 2023 10:50:52 +0000 Subject: [PATCH 02/11] tmux: fix MacOS references. Needed after https://github.com/Homebrew/brew/pull/16306. --- Formula/t/tmux.rb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Formula/t/tmux.rb b/Formula/t/tmux.rb index feeb8df2246b..ce2ba4323546 100644 --- a/Formula/t/tmux.rb +++ b/Formula/t/tmux.rb @@ -68,12 +68,16 @@ def install --sysconfdir=#{etc} ] - # tmux finds the `tmux-256color` terminfo provided by our ncurses - # and uses that as the default `TERM`, but this causes issues for - # tools that link with the very old ncurses provided by macOS. - # https://github.com/Homebrew/homebrew-core/issues/102748 - args << "--with-TERM=screen-256color" if OS.mac? - args << "--enable-utf8proc" if MacOS.version >= :high_sierra || OS.linux? + if OS.mac? + # tmux finds the `tmux-256color` terminfo provided by our ncurses + # and uses that as the default `TERM`, but this causes issues for + # tools that link with the very old ncurses provided by macOS. + # https://github.com/Homebrew/homebrew-core/issues/102748 + args << "--with-TERM=screen-256color" + args << "--enable-utf8proc" if MacOS.version >= :high_sierra + else + args << "--enable-utf8proc" + end ENV.append "LDFLAGS", "-lresolv" system "./configure", *args From 2658c078bb58ca18211806a8feb7fbc7ce2f6577 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 14 Dec 2023 10:50:52 +0000 Subject: [PATCH 03/11] trafficserver: fix MacOS references. Needed after https://github.com/Homebrew/brew/pull/16306. --- Formula/t/trafficserver.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/t/trafficserver.rb b/Formula/t/trafficserver.rb index d6e3e886436f..03c002512fbe 100644 --- a/Formula/t/trafficserver.rb +++ b/Formula/t/trafficserver.rb @@ -49,7 +49,7 @@ class Trafficserver < Formula def install # Per https://luajit.org/install.html: If MACOSX_DEPLOYMENT_TARGET # is not set then it's forced to 10.4, which breaks compile on Mojave. - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version.to_s + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version.to_s if OS.mac? args = %W[ --prefix=#{prefix} From dc019d9153f6771247fedf2bfc288d717709f0db Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 14 Dec 2023 10:50:53 +0000 Subject: [PATCH 04/11] travis: fix MacOS references. Needed after https://github.com/Homebrew/brew/pull/16306. --- Formula/t/travis.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/t/travis.rb b/Formula/t/travis.rb index 5da38c5679cf..583663cb385b 100644 --- a/Formula/t/travis.rb +++ b/Formula/t/travis.rb @@ -184,7 +184,7 @@ class Travis < Formula def install ENV["GEM_HOME"] = libexec # gem issue on Mojave - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :mojave + ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? && MacOS.version == :mojave resources.each do |r| r.fetch From 129c10783ef546e83a80e43f3a841265fb3beb51 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 14 Dec 2023 10:50:53 +0000 Subject: [PATCH 05/11] tta: fix MacOS references. Needed after https://github.com/Homebrew/brew/pull/16306. --- Formula/t/tta.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Formula/t/tta.rb b/Formula/t/tta.rb index 94db75ab5a14..96b5712bfa82 100644 --- a/Formula/t/tta.rb +++ b/Formula/t/tta.rb @@ -29,7 +29,14 @@ class Tta < Formula def install args = ["--disable-silent-rules"] - args << "--enable-#{MacOS.version.requires_sse4? ? "sse4" : "sse2"}" if Hardware::CPU.intel? + if Hardware::CPU.intel? + sse = if OS.mac? && MacOS.version.requires_sse4? + "sse4" + else + "sse2" + end + args << "--enable-#{sse}" + end system "./configure", *std_configure_args, *args system "make", "install" From 95548f249f3fa628c340f49ffbf6c3a15ca86409 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 14 Dec 2023 10:50:53 +0000 Subject: [PATCH 06/11] v8@3.15: fix MacOS references. Needed after https://github.com/Homebrew/brew/pull/16306. --- Formula/v/v8@3.15.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Formula/v/v8@3.15.rb b/Formula/v/v8@3.15.rb index 35fea8aca087..5dfc192d4cb2 100644 --- a/Formula/v/v8@3.15.rb +++ b/Formula/v/v8@3.15.rb @@ -28,7 +28,8 @@ class V8AT315 < Formula def install # Bully GYP into correctly linking with c++11 ENV.cxx11 - ENV["GYP_DEFINES"] = "clang=1 mac_deployment_target=#{MacOS.version}" + ENV["GYP_DEFINES"] = "clang=1 mac_deployment_target=#{MacOS.version}" if OS.mac? + (buildpath/"build/gyp").install resource("gyp") # fix up libv8.dylib install_name From 0f699852cfe8d9722438fb6af667dd1de8c63e31 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 14 Dec 2023 10:50:53 +0000 Subject: [PATCH 07/11] vorbis-tools: fix MacOS references. Needed after https://github.com/Homebrew/brew/pull/16306. --- Formula/v/vorbis-tools.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Formula/v/vorbis-tools.rb b/Formula/v/vorbis-tools.rb index da08d8664f5d..4fce54eaa1b4 100644 --- a/Formula/v/vorbis-tools.rb +++ b/Formula/v/vorbis-tools.rb @@ -47,15 +47,15 @@ class VorbisTools < Formula end def install - # Prevent linkage with Homebrew Curl on macOS because of `using: :homebrew_curl` above. if OS.mac? + # Prevent linkage with Homebrew Curl on macOS because of `using: :homebrew_curl` above. ENV.remove "HOMEBREW_DEPENDENCIES", "curl" ENV.remove "HOMEBREW_INCLUDE_PATHS", Formula["curl"].opt_include ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["curl"].opt_lib - end - # Workaround for Xcode 14 ld. - system "autoreconf", "--force", "--install", "--verbose" if MacOS.version >= :monterey + # Workaround for Xcode 14 ld. + system "autoreconf", "--force", "--install", "--verbose" if MacOS.version >= :monterey + end # Fix compile with newer Clang ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 From 02f0913cde2e3d11e1ac170f8fa1e115c5f9c2e7 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 14 Dec 2023 10:50:53 +0000 Subject: [PATCH 08/11] vrpn: fix MacOS references. Needed after https://github.com/Homebrew/brew/pull/16306. --- Formula/v/vrpn.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Formula/v/vrpn.rb b/Formula/v/vrpn.rb index 4adeaac0dc22..76b9b6482bf3 100644 --- a/Formula/v/vrpn.rb +++ b/Formula/v/vrpn.rb @@ -24,10 +24,13 @@ class Vrpn < Formula def install mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DCMAKE_OSX_SYSROOT=#{MacOS.sdk_path}", - "-DVRPN_BUILD_CLIENTS:BOOL=OFF", - "-DVRPN_BUILD_JAVA:BOOL=OFF" + cmake_args = [ + "-DVRPN_BUILD_CLIENTS:BOOL=OFF", + "-DVRPN_BUILD_JAVA:BOOL=OFF", + ] + cmake_args << "-DCMAKE_OSX_SYSROOT=#{MacOS.sdk_path}" if OS.mac? + + system "cmake", "..", *std_cmake_args, *cmake_args system "make", "install" end end From 0342b54738a63fcaa2218c238f3ee1ab1bb9ef6b Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 14 Dec 2023 10:50:54 +0000 Subject: [PATCH 09/11] wrk: fix MacOS references. Needed after https://github.com/Homebrew/brew/pull/16306. --- Formula/w/wrk.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/w/wrk.rb b/Formula/w/wrk.rb index 874f612d14d4..697ed4a5b31f 100644 --- a/Formula/w/wrk.rb +++ b/Formula/w/wrk.rb @@ -34,7 +34,7 @@ class Wrk < Formula def install ENV.deparallelize - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version.to_s + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version.to_s if OS.mac? ENV.append_to_cflags "-I#{Formula["luajit"].opt_include}/luajit-2.1" args = %W[ WITH_LUAJIT=#{Formula["luajit"].opt_prefix} From c060d1d8177deaa8a7bad4fc81c5084442773015 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 14 Dec 2023 10:50:54 +0000 Subject: [PATCH 10/11] yaws: fix MacOS references. Needed after https://github.com/Homebrew/brew/pull/16306. --- Formula/y/yaws.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Formula/y/yaws.rb b/Formula/y/yaws.rb index a4f36914b2bf..2192a97f6bfa 100644 --- a/Formula/y/yaws.rb +++ b/Formula/y/yaws.rb @@ -40,12 +40,13 @@ class Yaws < Formula skip_clean "lib/yaws/examples/include" def install - # Ensure pam headers are found on Xcode-only installs - extra_args = %W[ - --with-extrainclude=#{MacOS.sdk_path}/usr/include/security - ] - if OS.linux? - extra_args = %W[ + extra_args = if OS.mac? + # Ensure pam headers are found on Xcode-only installs + %W[ + --with-extrainclude=#{MacOS.sdk_path}/usr/include/security + ] + else + %W[ --with-extrainclude=#{Formula["linux-pam"].opt_include}/security ] end From e113909202ea059b0e1fd48cb8ad70e7e21cee22 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 14 Dec 2023 10:50:54 +0000 Subject: [PATCH 11/11] zeromq: fix MacOS references. Needed after https://github.com/Homebrew/brew/pull/16306. --- Formula/z/zeromq.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/z/zeromq.rb b/Formula/z/zeromq.rb index 2dd393cf17bd..7235410c7086 100644 --- a/Formula/z/zeromq.rb +++ b/Formula/z/zeromq.rb @@ -37,7 +37,7 @@ class Zeromq < Formula def install # Work around "error: no member named 'signbit' in the global namespace" - if MacOS.version == :high_sierra + if OS.mac? && MacOS.version == :high_sierra ENV.delete("HOMEBREW_SDKROOT") ENV.delete("SDKROOT") end