ENV/super: simplify version checks.

This commit is contained in:
Mike McQuaid 2017-11-05 12:12:49 +00:00
parent 8c6defd9cf
commit 603d6fd1f5

View File

@ -91,18 +91,18 @@ module Superenv
generic_setup_build_environment(formula)
self["HOMEBREW_SDKROOT"] = effective_sysroot
if MacOS::Xcode.without_clt? || (MacOS::Xcode.installed? && MacOS::Xcode.version.to_i >= 7)
if MacOS::Xcode.without_clt? || MacOS::Xcode.version.to_i >= 7
self["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version.to_s
self["SDKROOT"] = MacOS.sdk_path
end
# Filter out symbols known not to be defined since GNU Autotools can't
# reliably figure this out with Xcode 8 and above.
if MacOS.version == "10.12" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "9.0"
if MacOS.version == "10.12" && MacOS::Xcode.version >= "9.0"
%w[fmemopen futimens open_memstream utimensat].each do |s|
ENV["ac_cv_func_#{s}"] = "no"
end
elsif MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0"
elsif MacOS.version == "10.11" && MacOS::Xcode.version >= "8.0"
%w[basename_r clock_getres clock_gettime clock_settime dirname_r
getentropy mkostemp mkostemps timingsafe_bcmp].each do |s|
ENV["ac_cv_func_#{s}"] = "no"