From 8d3e7cf028e99e95b91e22c67f9767a4e36ff8a0 Mon Sep 17 00:00:00 2001 From: Mike McQuaid <mike@mikemcquaid.com> Date: Wed, 11 Dec 2019 13:49:13 +0000 Subject: [PATCH] os/mac: remove CLT header package stuff. We never care about it and it's not relevant anywhere except 10.14. --- .../Homebrew/extend/os/mac/system_config.rb | 5 ---- Library/Homebrew/os/mac/xcode.rb | 24 ------------------- 2 files changed, 29 deletions(-) diff --git a/Library/Homebrew/extend/os/mac/system_config.rb b/Library/Homebrew/extend/os/mac/system_config.rb index 4965888cef..fb5e7736db 100644 --- a/Library/Homebrew/extend/os/mac/system_config.rb +++ b/Library/Homebrew/extend/os/mac/system_config.rb @@ -41,10 +41,6 @@ class SystemConfig @clt ||= MacOS::CLT.version if MacOS::CLT.installed? end - def clt_headers - @clt_headers ||= MacOS::CLT.headers_version if MacOS::CLT.headers_installed? - end - def xquartz @xquartz ||= "#{MacOS::XQuartz.version} => #{describe_path(MacOS::XQuartz.prefix)}" if MacOS::XQuartz.installed? end @@ -54,7 +50,6 @@ class SystemConfig f.puts "macOS: #{MacOS.full_version}-#{kernel}" f.puts "CLT: #{clt || "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 end end diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 1e1552c7e8..c102400003 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -193,9 +193,6 @@ module OS EXECUTABLE_PKG_ID = "com.apple.pkg.CLTools_Executables" MAVERICKS_NEW_PKG_ID = "com.apple.pkg.CLTools_Base" # obsolete 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 def installed? @@ -210,14 +207,6 @@ module OS version >= "8" end - def headers_installed? - if !separate_header_package? - installed? - else - headers_version == version - end - end - def sdk(v = nil) @locator ||= CLTSDKLocator.new @@ -302,19 +291,6 @@ module OS 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 version = nil [EXECUTABLE_PKG_ID, MAVERICKS_NEW_PKG_ID].each do |id| -- GitLab