ENV: don't help include libxml2 on macOS SDK 10.15.4 and later
This commit is contained in:
parent
28a1497c2b
commit
32497bd511
@ -97,12 +97,14 @@ module Stdenv
|
||||
end
|
||||
|
||||
# Some configure scripts won't find libxml2 without help
|
||||
# This is a no-op with macOS SDK 10.15.4 and later
|
||||
def libxml2
|
||||
if !MacOS.sdk_path_if_needed
|
||||
sdk = MacOS.sdk_path_if_needed
|
||||
if !sdk
|
||||
append "CPPFLAGS", "-I/usr/include/libxml2"
|
||||
else
|
||||
elsif !(sdk/"usr/include/libxml").directory?
|
||||
# Use the includes form the sdk
|
||||
append "CPPFLAGS", "-I#{MacOS.sdk_path}/usr/include/libxml2"
|
||||
append "CPPFLAGS", "-I#{sdk}/usr/include/libxml2"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -42,9 +42,17 @@ module Superenv
|
||||
paths
|
||||
end
|
||||
|
||||
# @private
|
||||
def libxml2_include_needed?
|
||||
return false if deps.any? { |d| d.name == "libxml2" }
|
||||
return false if Pathname("#{self["HOMEBREW_SDKROOT"]}/usr/include/libxml").directory?
|
||||
|
||||
true
|
||||
end
|
||||
|
||||
def homebrew_extra_isystem_paths
|
||||
paths = []
|
||||
paths << "#{self["HOMEBREW_SDKROOT"]}/usr/include/libxml2" unless deps.any? { |d| d.name == "libxml2" }
|
||||
paths << "#{self["HOMEBREW_SDKROOT"]}/usr/include/libxml2" if libxml2_include_needed?
|
||||
paths << "#{self["HOMEBREW_SDKROOT"]}/usr/include/apache2" if MacOS::Xcode.without_clt?
|
||||
paths << MacOS::X11.include.to_s << "#{MacOS::X11.include}/freetype2" if x11?
|
||||
paths << "#{self["HOMEBREW_SDKROOT"]}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers"
|
||||
@ -64,7 +72,7 @@ module Superenv
|
||||
|
||||
def homebrew_extra_cmake_include_paths
|
||||
paths = []
|
||||
paths << "#{self["HOMEBREW_SDKROOT"]}/usr/include/libxml2" unless deps.any? { |d| d.name == "libxml2" }
|
||||
paths << "#{self["HOMEBREW_SDKROOT"]}/usr/include/libxml2" if libxml2_include_needed?
|
||||
paths << "#{self["HOMEBREW_SDKROOT"]}/usr/include/apache2" if MacOS::Xcode.without_clt?
|
||||
paths << MacOS::X11.include.to_s << "#{MacOS::X11.include}/freetype2" if x11?
|
||||
paths << "#{self["HOMEBREW_SDKROOT"]}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user