diff --git a/Library/Homebrew/macos_version.rb b/Library/Homebrew/macos_version.rb index 9c1cd7117f..f71a2e6e73 100644 --- a/Library/Homebrew/macos_version.rb +++ b/Library/Homebrew/macos_version.rb @@ -19,6 +19,7 @@ class MacOSVersion < Version # NOTE: When removing symbols here, ensure that they are added # to `DEPRECATED_MACOS_VERSIONS` in `MacOSRequirement`. SYMBOLS = { + tahoe: "26", sequoia: "15", sonoma: "14", ventura: "13", @@ -34,7 +35,9 @@ class MacOSVersion < Version sig { params(macos_version: MacOSVersion).returns(Version) } def self.kernel_major_version(macos_version) version_major = macos_version.major.to_i - if version_major > 10 + if version_major >= 26 + Version.new((version_major - 1).to_s) + elsif version_major > 10 Version.new((version_major + 9).to_s) else version_minor = macos_version.minor.to_i @@ -50,7 +53,7 @@ class MacOSVersion < Version sig { params(version: T.nilable(String)).void } def initialize(version) - raise MacOSVersion::Error, version unless /\A1\d+(?:\.\d+){0,2}\Z/.match?(version) + raise MacOSVersion::Error, version unless /\A\d{2,}(?:\.\d+){0,2}\z/.match?(version) super(T.must(version)) diff --git a/Library/Homebrew/os/mac/pkgconfig/26/bzip2.pc b/Library/Homebrew/os/mac/pkgconfig/26/bzip2.pc new file mode 100644 index 0000000000..aded4844b2 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/26/bzip2.pc @@ -0,0 +1,12 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +bindir=${exec_prefix}/bin +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: bzip2 +Description: Lossless, block-sorting data compression +Version: 1.0.8 +Libs: -L${libdir} -lbz2 +Cflags: diff --git a/Library/Homebrew/os/mac/pkgconfig/26/expat.pc b/Library/Homebrew/os/mac/pkgconfig/26/expat.pc new file mode 100644 index 0000000000..8395575305 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/26/expat.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: expat +Version: 2.7.1 +Description: expat XML parser +URL: https://libexpat.github.io/ +Libs: -L${libdir} -lexpat +Libs.private: +Cflags: +Cflags.private: -DXML_STATIC diff --git a/Library/Homebrew/os/mac/pkgconfig/26/libcurl.pc b/Library/Homebrew/os/mac/pkgconfig/26/libcurl.pc new file mode 100644 index 0000000000..3247df2e81 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/26/libcurl.pc @@ -0,0 +1,42 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +# SPDX-License-Identifier: curl +# +########################################################################### + +# This should most probably benefit from getting a "Requires:" field added +# dynamically by configure. +# +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include +supported_protocols="DICT FILE FTP FTPS GOPHER GOPHERS HTTP HTTPS IMAP IMAPS IPFS IPNS LDAP LDAPS MQTT POP3 POP3S RTSP SMB SMBS SMTP SMTPS TELNET TFTP" +supported_features="alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe UnixSockets" + +Name: libcurl +URL: https://curl.se/ +Description: Library to transfer files with ftp, http, etc. +Version: 8.7.1 +Libs: -L${libdir} -lcurl +Libs.private: -lldap -lz +Cflags: diff --git a/Library/Homebrew/os/mac/pkgconfig/26/libedit.pc b/Library/Homebrew/os/mac/pkgconfig/26/libedit.pc new file mode 100644 index 0000000000..a20a0f6a13 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/26/libedit.pc @@ -0,0 +1,12 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libedit +Description: command line editor library provides generic line editing, history, and tokenization functions. +Version: 3.0 +Requires: +Libs: -L${libdir} -ledit +Cflags: -I${includedir}/editline diff --git a/Library/Homebrew/os/mac/pkgconfig/26/libexslt.pc b/Library/Homebrew/os/mac/pkgconfig/26/libexslt.pc new file mode 100644 index 0000000000..4da5570157 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/26/libexslt.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + + +Name: libexslt +Version: 0.8.20 +Description: EXSLT Extension library +Requires: libxml-2.0, libxslt +Cflags: +Libs: -L${libdir} -lexslt +Libs.private: diff --git a/Library/Homebrew/os/mac/pkgconfig/26/libffi.pc b/Library/Homebrew/os/mac/pkgconfig/26/libffi.pc new file mode 100644 index 0000000000..2e462cc1eb --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/26/libffi.pc @@ -0,0 +1,12 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +toolexeclibdir=${libdir} +includedir=${prefix}/include/ffi + +Name: libffi +Description: Library supporting Foreign Function Interfaces +Version: 3.4-rc1 +Libs: -L${toolexeclibdir} -lffi +Cflags: -I${includedir} diff --git a/Library/Homebrew/os/mac/pkgconfig/26/libxml-2.0.pc b/Library/Homebrew/os/mac/pkgconfig/26/libxml-2.0.pc new file mode 100644 index 0000000000..214be9468b --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/26/libxml-2.0.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include +modules=1 + +Name: libXML +Version: 2.9.13 +Description: libXML library version2. +Requires: +Libs: -L${libdir} -lxml2 +Libs.private: -lz -lpthread -licucore -lm +Cflags: diff --git a/Library/Homebrew/os/mac/pkgconfig/26/libxslt.pc b/Library/Homebrew/os/mac/pkgconfig/26/libxslt.pc new file mode 100644 index 0000000000..09b03d6fb1 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/26/libxslt.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + + +Name: libxslt +Version: 1.1.35 +Description: XSLT library version 2. +Requires: libxml-2.0 +Cflags: +Libs: -L${libdir} -lxslt +Libs.private: diff --git a/Library/Homebrew/os/mac/pkgconfig/26/ncurses.pc b/Library/Homebrew/os/mac/pkgconfig/26/ncurses.pc new file mode 100644 index 0000000000..05acdc3fbb --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/26/ncurses.pc @@ -0,0 +1,17 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include +abi_version=5.4 +major_version=6 +version=6.0.20150808 + +Name: ncurses +Description: ncurses 6.0 library +Version: ${version} +URL: http://invisible-island.net/ncurses +Requires.private: +Libs: -L${libdir} -lncurses +Libs.private: +Cflags: -D_DARWIN_C_SOURCE diff --git a/Library/Homebrew/os/mac/pkgconfig/26/ncursesw.pc b/Library/Homebrew/os/mac/pkgconfig/26/ncursesw.pc new file mode 100644 index 0000000000..1456908fa0 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/26/ncursesw.pc @@ -0,0 +1,17 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include +abi_version=5.4 +major_version=6 +version=6.0.20150808 + +Name: ncursesw +Description: ncurses 6.0 library +Version: ${version} +URL: http://invisible-island.net/ncurses +Requires.private: +Libs: -L${libdir} -lncurses +Libs.private: +Cflags: -D_DARWIN_C_SOURCE diff --git a/Library/Homebrew/os/mac/pkgconfig/26/sqlite3.pc b/Library/Homebrew/os/mac/pkgconfig/26/sqlite3.pc new file mode 100644 index 0000000000..e7f9019fd5 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/26/sqlite3.pc @@ -0,0 +1,12 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: SQLite +Description: SQL database engine +Version: 3.48.0 +Libs: -L${libdir} -lsqlite3 +Libs.private: +Cflags: diff --git a/Library/Homebrew/os/mac/pkgconfig/26/uuid.pc b/Library/Homebrew/os/mac/pkgconfig/26/uuid.pc new file mode 100644 index 0000000000..3dc8070ed2 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/26/uuid.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +sharedlibdir=${libdir} +includedir=${prefix}/include/uuid + +Name: uuid +Description: Universally unique id library +Version: 1.0 + +Requires: +Libs: +Cflags: -I${includedir} diff --git a/Library/Homebrew/os/mac/pkgconfig/26/zlib.pc b/Library/Homebrew/os/mac/pkgconfig/26/zlib.pc new file mode 100644 index 0000000000..a86f93bc1b --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/26/zlib.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +sharedlibdir=${libdir} +includedir=${prefix}/include + +Name: zlib +Description: zlib compression library +Version: 1.2.12 + +Requires: +Libs: -L${libdir} -L${sharedlibdir} -lz +Cflags: diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 5af295fcf6..cec906f25e 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -15,10 +15,10 @@ module OS # This may be a beta version for a beta macOS. sig { params(macos: MacOSVersion).returns(String) } def self.latest_version(macos: MacOS.version) - latest_stable = "15.4" + macos = macos.strip_patch case macos - when "15" then "16.0" - when "14" then latest_stable + when "15" then "16.4" + when "14" then "16.2" when "13" then "15.2" when "12" then "14.2" when "11" then "13.2.1" @@ -28,10 +28,10 @@ module OS when "10.12" then "9.2" when "10.11" then "8.2.1" else - raise "macOS '#{MacOS.version}' is invalid" unless OS::Mac.version.prerelease? + raise "macOS '#{macos}' is invalid" unless macos.prerelease? - # Default to newest known version of Xcode for unreleased macOS versions. - latest_stable + # Assume matching yearly Xcode release + "#{macos}.0" end end @@ -41,7 +41,8 @@ module OS # also in beta). sig { returns(String) } def self.minimum_version - case MacOS.version + macos = MacOS.version + case macos when "15" then "16.0" when "14" then "15.0" when "13" then "14.1" @@ -51,7 +52,9 @@ module OS when "10.14" then "10.2" when "10.13" then "9.0" when "10.12" then "8.0" - else "7.3" + when "10.11" then "7.3" + else + "#{macos}.0" end end @@ -225,10 +228,8 @@ module OS detect_version_from_clang_version end - sig { returns(String) } - def self.detect_version_from_clang_version - version = ::DevelopmentTools.clang_version - + sig { params(version: ::Version).returns(String) } + def self.detect_version_from_clang_version(version = ::DevelopmentTools.clang_version) return "dunno" if version.null? # This logic provides a fake Xcode version based on the @@ -255,8 +256,9 @@ module OS when "13.1.6" then "13.4.1" when "14.0.0" then "14.2" when "14.0.3" then "14.3.1" - when "16.0.0" then "16.0" - else "15.4" + when "15.0.0" then "15.4" + when "16.0.0" then "16.2" + else "26.0" end end @@ -355,8 +357,9 @@ module OS sig { returns(String) } def self.latest_clang_version case MacOS.version - when "15" then "1600.0.20.10" - when "14" then "1500.3.9.4" + when "26" then "1700.3.9.908" + when "15" then "1700.0.13.5" + when "14" then "1600.0.26.6" when "13" then "1500.1.0.2.5" when "12" then "1400.0.29.202" when "11" then "1300.0.29.30" @@ -373,7 +376,8 @@ module OS # that macOS version. sig { returns(String) } def self.minimum_version - case MacOS.version + macos = MacOS.version + case macos when "15" then "16.0.0" when "14" then "15.0.0" when "13" then "14.0.0" @@ -383,7 +387,9 @@ module OS when "10.14" then "10.0.0" when "10.13" then "9.0.0" when "10.12" then "8.0.0" - else "7.3.0" + when "10.11" then "7.3.0" + else + "#{macos}.0.0" end end @@ -410,7 +416,10 @@ module OS sig { returns(T.nilable(String)) } def self.detect_version_from_clang_version - detect_clang_version&.sub(/^(\d+)0(\d)\./, "\\1.\\2.") + clang_version = detect_clang_version + return if clang_version.nil? + + MacOS::Xcode.detect_version_from_clang_version(Version.new(clang_version)) end # Version string (a pretty long one) of the CLT package. diff --git a/Library/Homebrew/test/cask/cask_spec.rb b/Library/Homebrew/test/cask/cask_spec.rb index 2dd30c87cc..bb499f2001 100644 --- a/Library/Homebrew/test/cask/cask_spec.rb +++ b/Library/Homebrew/test/cask/cask_spec.rb @@ -324,6 +324,9 @@ RSpec.describe Cask::Cask, :cask do let(:expected_versions_variations) do <<~JSON { + "tahoe": { + "url": "file://#{TEST_FIXTURE_DIR}/cask/caffeine/darwin/1.2.3/intel.zip" + }, "sequoia": { "url": "file://#{TEST_FIXTURE_DIR}/cask/caffeine/darwin/1.2.3/intel.zip" }, @@ -377,6 +380,10 @@ RSpec.describe Cask::Cask, :cask do let(:expected_sha256_variations) do <<~JSON { + "tahoe": { + "url": "file://#{TEST_FIXTURE_DIR}/cask/caffeine-intel.zip", + "sha256": "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b" + }, "sequoia": { "url": "file://#{TEST_FIXTURE_DIR}/cask/caffeine-intel.zip", "sha256": "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b" @@ -423,6 +430,10 @@ RSpec.describe Cask::Cask, :cask do let(:expected_sha256_variations_os) do <<~JSON { + "tahoe": { + "url": "file://#{TEST_FIXTURE_DIR}/cask/caffeine-intel-darwin.zip", + "sha256": "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b" + }, "sequoia": { "url": "file://#{TEST_FIXTURE_DIR}/cask/caffeine-intel-darwin.zip", "sha256": "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b" diff --git a/Library/Homebrew/test/github_runner_matrix_spec.rb b/Library/Homebrew/test/github_runner_matrix_spec.rb index 2920ca6698..ce1c73eaaa 100644 --- a/Library/Homebrew/test/github_runner_matrix_spec.rb +++ b/Library/Homebrew/test/github_runner_matrix_spec.rb @@ -13,6 +13,7 @@ RSpec.describe GitHubRunnerMatrix do allow(ENV).to receive(:fetch).with("HOMEBREW_EVAL_ALL", nil).and_call_original allow(ENV).to receive(:fetch).with("HOMEBREW_SIMULATE_MACOS_ON_LINUX", nil).and_call_original allow(ENV).to receive(:fetch).with("HOMEBREW_FORBID_PACKAGES_FROM_PATHS", nil).and_call_original + allow(ENV).to receive(:fetch).with("HOMEBREW_DEVELOPER", nil).and_call_original end let(:newest_supported_macos) do diff --git a/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.arm64_tahoe.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.arm64_tahoe.bottle.tar.gz new file mode 120000 index 0000000000..3e989830ba --- /dev/null +++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.arm64_tahoe.bottle.tar.gz @@ -0,0 +1 @@ +testball_bottle-0.1.yosemite.bottle.tar.gz \ No newline at end of file diff --git a/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.tahoe.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.tahoe.bottle.tar.gz new file mode 120000 index 0000000000..3e989830ba --- /dev/null +++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.tahoe.bottle.tar.gz @@ -0,0 +1 @@ +testball_bottle-0.1.yosemite.bottle.tar.gz \ No newline at end of file