macOS Big Sur tweaks
- output warnings when running on ARM - require Xcode 12 - use 11.0 as the version number
This commit is contained in:
parent
c23d0f575f
commit
11c875d747
@ -16,7 +16,8 @@ module Homebrew
|
|||||||
].freeze
|
].freeze
|
||||||
|
|
||||||
def check_cpu
|
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!"
|
message = "Sorry, Homebrew does not support your computer's CPU architecture!"
|
||||||
if Hardware::CPU.ppc64le?
|
if Hardware::CPU.ppc64le?
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require "macho"
|
||||||
|
|
||||||
module Hardware
|
module Hardware
|
||||||
class CPU
|
class CPU
|
||||||
class << self
|
class << self
|
||||||
|
|||||||
@ -10,10 +10,13 @@ module Homebrew
|
|||||||
module_function
|
module_function
|
||||||
|
|
||||||
def check_cpu
|
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!"
|
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
|
message += <<~EOS
|
||||||
For PowerPC Mac (PPC32/PPC64BE) support, see:
|
For PowerPC Mac (PPC32/PPC64BE) support, see:
|
||||||
#{Formatter.url("https://github.com/mistydemeo/tigerbrew")}
|
#{Formatter.url("https://github.com/mistydemeo/tigerbrew")}
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require "hardware"
|
||||||
require "version"
|
require "version"
|
||||||
|
|
||||||
module OS
|
module OS
|
||||||
module Mac
|
module Mac
|
||||||
class Version < ::Version
|
class Version < ::Version
|
||||||
SYMBOLS = {
|
SYMBOLS = {
|
||||||
big_sur: "10.16",
|
big_sur: Hardware::CPU.arm? ? "11.00" : "10.16",
|
||||||
catalina: "10.15",
|
catalina: "10.15",
|
||||||
mojave: "10.14",
|
mojave: "10.14",
|
||||||
high_sierra: "10.13",
|
high_sierra: "10.13",
|
||||||
|
|||||||
@ -13,9 +13,10 @@ module OS
|
|||||||
# CI systems have been updated.
|
# CI systems have been updated.
|
||||||
# This may be a beta version for a beta macOS.
|
# This may be a beta version for a beta macOS.
|
||||||
def latest_version
|
def latest_version
|
||||||
latest = "11.5"
|
latest_stable = "11.5"
|
||||||
case MacOS.version
|
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.14" then "11.3.1"
|
||||||
when "10.13" then "10.1"
|
when "10.13" then "10.1"
|
||||||
when "10.12" then "9.2"
|
when "10.12" then "9.2"
|
||||||
@ -26,7 +27,7 @@ module OS
|
|||||||
raise "macOS '#{MacOS.version}' is invalid" unless OS::Mac.prerelease?
|
raise "macOS '#{MacOS.version}' is invalid" unless OS::Mac.prerelease?
|
||||||
|
|
||||||
# Default to newest known version of Xcode for unreleased macOS versions.
|
# Default to newest known version of Xcode for unreleased macOS versions.
|
||||||
latest
|
latest_stable
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -36,6 +37,7 @@ module OS
|
|||||||
# also in beta).
|
# also in beta).
|
||||||
def minimum_version
|
def minimum_version
|
||||||
case MacOS.version
|
case MacOS.version
|
||||||
|
when "11.0", "10.16" then "12.0"
|
||||||
when "10.15" then "11.0"
|
when "10.15" then "11.0"
|
||||||
when "10.14" then "10.2"
|
when "10.14" then "10.2"
|
||||||
when "10.13" then "9.0"
|
when "10.13" then "9.0"
|
||||||
@ -173,9 +175,10 @@ module OS
|
|||||||
# installed CLT version. This is useful as they are packaged
|
# installed CLT version. This is useful as they are packaged
|
||||||
# simultaneously so workarounds need to apply to both based on their
|
# simultaneously so workarounds need to apply to both based on their
|
||||||
# comparable version.
|
# comparable version.
|
||||||
latest = "11.5"
|
latest_stable = "11.5"
|
||||||
case (DevelopmentTools.clang_version.to_f * 10).to_i
|
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 100 then "10.3"
|
||||||
when 91 then "9.4"
|
when 91 then "9.4"
|
||||||
when 90 then "9.2"
|
when 90 then "9.2"
|
||||||
@ -186,7 +189,7 @@ module OS
|
|||||||
when 61 then "6.1"
|
when 61 then "6.1"
|
||||||
when 60 then "6.0"
|
when 60 then "6.0"
|
||||||
when 0 then "dunno"
|
when 0 then "dunno"
|
||||||
else latest
|
else latest_stable
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user