Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix more MacOS references #157331

Merged
merged 11 commits into from
Dec 14, 2023
7 changes: 5 additions & 2 deletions Formula/t/tectonic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 10 additions & 6 deletions Formula/t/tmux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Formula/t/trafficserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion Formula/t/travis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion Formula/t/tta.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion Formula/v/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions Formula/v/vorbis-tools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 7 additions & 4 deletions Formula/v/vrpn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Formula/w/wrk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
13 changes: 7 additions & 6 deletions Formula/y/yaws.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Formula/z/zeromq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading