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

extconf: respect AR and RANLIB in recipes on darwin #3338

Merged
merged 3 commits into from
Nov 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions ext/nokogiri/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,14 @@ def aix?
RbConfig::CONFIG["target_os"].include?("aix")
end

def nix?
def unix?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL, naming things is hard

!(windows? || solaris? || darwin?)
end

def nix?
ENV.key?("NIX_CC")
end

def truffle?
RUBY_ENGINE == "truffleruby"
end
Expand Down Expand Up @@ -705,7 +709,7 @@ def needs_darwin_linker_hack

# Add SDK-specific include path for macOS and brew versions before v2.2.12 (2020-04-08) [#1851, #1801]
macos_mojave_sdk_include_path = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2"
if config_system_libraries? && darwin? && Dir.exist?(macos_mojave_sdk_include_path)
if config_system_libraries? && darwin? && Dir.exist?(macos_mojave_sdk_include_path) && !nix?
append_cppflags("-I#{macos_mojave_sdk_include_path}")
end

Expand Down Expand Up @@ -828,7 +832,7 @@ def configure
end
end

unless nix?
unless unix?
libiconv_recipe = process_recipe(
"libiconv",
dependencies["libiconv"]["version"],
Expand Down