From dda80c693842ceeaa17328c5043b14e7ac50c7ce Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 11 Dec 2019 13:48:32 +0000 Subject: [PATCH 1/4] os/mac/xcode: bump Xcode/CLT versions. --- Library/Homebrew/os/mac/xcode.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 453f5c2416..1e1552c7e8 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -16,13 +16,13 @@ module OS when "10.11" then "8.2.1" when "10.12" then "9.2" when "10.13" then "10.1" - when "10.14" then "10.2.1" - when "10.15" then "11.2.1" + when "10.14" then "11.3" + when "10.15" then "11.3" else raise "macOS '#{MacOS.version}' is invalid" unless OS::Mac.prerelease? # Default to newest known version of Xcode for unreleased macOS versions. - "11.2.1" + "11.3" end end @@ -176,8 +176,8 @@ module OS when 90 then "9.2" when 91 then "9.4" when 100 then "10.2.1" - when 110 then "11.2.1" - else "11.2.1" + when 110 then "11.3" + else "11.3" end end @@ -247,7 +247,7 @@ module OS # on the older supported platform for that Xcode release, i.e there's no # CLT package for 10.11 that contains the Clang version from Xcode 8. case MacOS.version - when "10.15" then "1100.0.33.12" + when "10.15" then "1100.0.33.16" when "10.14" then "1001.0.46.4" when "10.13" then "1000.10.44.2" when "10.12" then "900.0.39.2" From 8d3e7cf028e99e95b91e22c67f9767a4e36ff8a0 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 11 Dec 2019 13:49:13 +0000 Subject: [PATCH 2/4] 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| From 2d5f6dd79fc4b6c61ea889d0cf6fb66a4f8b5fde Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 11 Dec 2019 13:49:56 +0000 Subject: [PATCH 3/4] os/mac/xcode: improve CLT clang version detection. --- Library/Homebrew/os/mac/xcode.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index c102400003..f699ff3c26 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -280,6 +280,10 @@ module OS version_output[/clang-(\d+\.\d+\.\d+(\.\d+)?)/, 1] end + def detect_version_from_clang_version + detect_clang_version&.sub(/^(\d+)00\./, "\\1.") + end + # Version string (a pretty long one) of the CLT package. # Note, that different ways to install the CLTs lead to different # version numbers. @@ -300,7 +304,7 @@ module OS return version if version end - detect_clang_version + detect_version_from_clang_version end end end From ebc764e878b9f67d9f79a87419a21b1c84e92d82 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 11 Dec 2019 13:50:21 +0000 Subject: [PATCH 4/4] os/mac/xcode: clarify latest_version comes from clang. --- Library/Homebrew/os/mac/xcode.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index f699ff3c26..2435a8f0dd 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -231,7 +231,7 @@ module OS end end - def latest_version + def latest_clang_version # As of Xcode 8 CLT releases are no longer in sync with Xcode releases # on the older supported platform for that Xcode release, i.e there's no # CLT package for 10.11 that contains the Clang version from Xcode 8. @@ -266,7 +266,7 @@ module OS clang_version = detect_clang_version return false unless clang_version - ::Version.new(clang_version) < latest_version + ::Version.new(clang_version) < latest_clang_version end def detect_clang_version