Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS Big Sur tweaks #7806

Merged
merged 1 commit into from
Jun 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Library/Homebrew/extend/os/linux/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ module Install
].freeze

def check_cpu
return if (Hardware::CPU.intel? && Hardware::CPU.is_64_bit?) || Hardware::CPU.arm?
return if Hardware::CPU.intel? && Hardware::CPU.is_64_bit?
return if Hardware::CPU.arm?

message = "Sorry, Homebrew does not support your computer's CPU architecture!"
if Hardware::CPU.ppc64le?
Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/extend/os/mac/hardware/cpu.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require "macho"

module Hardware
class CPU
class << self
Expand Down
7 changes: 5 additions & 2 deletions Library/Homebrew/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ module Install
module_function

def check_cpu
return if (Hardware::CPU.intel? && Hardware::CPU.is_64_bit?) || Hardware::CPU.arm?
return if Hardware::CPU.intel? && Hardware::CPU.is_64_bit?

message = "Sorry, Homebrew does not support your computer's CPU architecture!"
if Hardware::CPU.ppc?
if Hardware::CPU.arm?
opoo message
return
elsif Hardware::CPU.ppc?
message += <<~EOS
For PowerPC Mac (PPC32/PPC64BE) support, see:
#{Formatter.url("https://github.com/mistydemeo/tigerbrew")}
Expand Down
3 changes: 2 additions & 1 deletion Library/Homebrew/os/mac/version.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# frozen_string_literal: true

require "hardware"
require "version"

module OS
module Mac
class Version < ::Version
SYMBOLS = {
big_sur: "10.16",
big_sur: Hardware::CPU.arm? ? "11.00" : "10.16",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really 11.00 and not 11.0?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened PR #7810

catalina: "10.15",
mojave: "10.14",
high_sierra: "10.13",
Expand Down
15 changes: 9 additions & 6 deletions Library/Homebrew/os/mac/xcode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ module Xcode
# CI systems have been updated.
# This may be a beta version for a beta macOS.
def latest_version
latest = "11.5"
latest_stable = "11.5"
case MacOS.version
when "10.15" then latest
when "11.0", "10.16" then "12.0"
when "10.15" then latest_stable
when "10.14" then "11.3.1"
when "10.13" then "10.1"
when "10.12" then "9.2"
Expand All @@ -26,7 +27,7 @@ def latest_version
raise "macOS '#{MacOS.version}' is invalid" unless OS::Mac.prerelease?

# Default to newest known version of Xcode for unreleased macOS versions.
latest
latest_stable
end
end

Expand All @@ -36,6 +37,7 @@ def latest_version
# also in beta).
def minimum_version
case MacOS.version
when "11.0", "10.16" then "12.0"
when "10.15" then "11.0"
when "10.14" then "10.2"
when "10.13" then "9.0"
Expand Down Expand Up @@ -173,9 +175,10 @@ def detect_version_from_clang_version
# installed CLT version. This is useful as they are packaged
# simultaneously so workarounds need to apply to both based on their
# comparable version.
latest = "11.5"
latest_stable = "11.5"
case (DevelopmentTools.clang_version.to_f * 10).to_i
when 110 then latest
when 120 then "12.0"
when 110 then latest_stable
when 100 then "10.3"
when 91 then "9.4"
when 90 then "9.2"
Expand All @@ -186,7 +189,7 @@ def detect_version_from_clang_version
when 61 then "6.1"
when 60 then "6.0"
when 0 then "dunno"
else latest
else latest_stable
end
end

Expand Down