os/mac: remove CLT header package stuff.
We never care about it and it's not relevant anywhere except 10.14.
This commit is contained in:
parent
dda80c6938
commit
8d3e7cf028
@ -41,10 +41,6 @@ class SystemConfig
|
|||||||
@clt ||= MacOS::CLT.version if MacOS::CLT.installed?
|
@clt ||= MacOS::CLT.version if MacOS::CLT.installed?
|
||||||
end
|
end
|
||||||
|
|
||||||
def clt_headers
|
|
||||||
@clt_headers ||= MacOS::CLT.headers_version if MacOS::CLT.headers_installed?
|
|
||||||
end
|
|
||||||
|
|
||||||
def xquartz
|
def xquartz
|
||||||
@xquartz ||= "#{MacOS::XQuartz.version} => #{describe_path(MacOS::XQuartz.prefix)}" if MacOS::XQuartz.installed?
|
@xquartz ||= "#{MacOS::XQuartz.version} => #{describe_path(MacOS::XQuartz.prefix)}" if MacOS::XQuartz.installed?
|
||||||
end
|
end
|
||||||
@ -54,7 +50,6 @@ class SystemConfig
|
|||||||
f.puts "macOS: #{MacOS.full_version}-#{kernel}"
|
f.puts "macOS: #{MacOS.full_version}-#{kernel}"
|
||||||
f.puts "CLT: #{clt || "N/A"}"
|
f.puts "CLT: #{clt || "N/A"}"
|
||||||
f.puts "Xcode: #{xcode || "N/A"}"
|
f.puts "Xcode: #{xcode || "N/A"}"
|
||||||
f.puts "CLT headers: #{clt_headers}" if MacOS::CLT.separate_header_package? && clt_headers
|
|
||||||
f.puts "XQuartz: #{xquartz}" if xquartz
|
f.puts "XQuartz: #{xquartz}" if xquartz
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -193,9 +193,6 @@ module OS
|
|||||||
EXECUTABLE_PKG_ID = "com.apple.pkg.CLTools_Executables"
|
EXECUTABLE_PKG_ID = "com.apple.pkg.CLTools_Executables"
|
||||||
MAVERICKS_NEW_PKG_ID = "com.apple.pkg.CLTools_Base" # obsolete
|
MAVERICKS_NEW_PKG_ID = "com.apple.pkg.CLTools_Base" # obsolete
|
||||||
PKG_PATH = "/Library/Developer/CommandLineTools"
|
PKG_PATH = "/Library/Developer/CommandLineTools"
|
||||||
HEADER_PKG_PATH =
|
|
||||||
"/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_:macos_version.pkg"
|
|
||||||
HEADER_PKG_ID = "com.apple.pkg.macOS_SDK_headers_for_macOS_10.14"
|
|
||||||
|
|
||||||
# Returns true even if outdated tools are installed
|
# Returns true even if outdated tools are installed
|
||||||
def installed?
|
def installed?
|
||||||
@ -210,14 +207,6 @@ module OS
|
|||||||
version >= "8"
|
version >= "8"
|
||||||
end
|
end
|
||||||
|
|
||||||
def headers_installed?
|
|
||||||
if !separate_header_package?
|
|
||||||
installed?
|
|
||||||
else
|
|
||||||
headers_version == version
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def sdk(v = nil)
|
def sdk(v = nil)
|
||||||
@locator ||= CLTSDKLocator.new
|
@locator ||= CLTSDKLocator.new
|
||||||
|
|
||||||
@ -302,19 +291,6 @@ module OS
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Version string of the header package, which is a
|
|
||||||
# separate package as of macOS 10.14.
|
|
||||||
def headers_version
|
|
||||||
if !separate_header_package?
|
|
||||||
version
|
|
||||||
else
|
|
||||||
@header_version ||= MacOS.pkgutil_info(HEADER_PKG_ID)[/version: (.+)$/, 1]
|
|
||||||
return ::Version::NULL unless @header_version
|
|
||||||
|
|
||||||
::Version.new(@header_version)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def detect_version
|
def detect_version
|
||||||
version = nil
|
version = nil
|
||||||
[EXECUTABLE_PKG_ID, MAVERICKS_NEW_PKG_ID].each do |id|
|
[EXECUTABLE_PKG_ID, MAVERICKS_NEW_PKG_ID].each do |id|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user