macOS package: upgrade to gcc-10 in custom install of Homebrew

The formulas are taken from commit c2acb4e30f7a99426a34dbdea26991459454c834 of
the homebrew-core repository.

The formulas were modified as follows:
— in the "bottle" do/end block, this line was added:
   root_url "https://homebrew.bintray.com/bottles"
— in the "bottle" do/end block for gcc, this line was added:
   cellar :any

The preprocessor has been updated accordingly.
time-shift
Sébastien Villemot 2021-01-12 17:42:39 +01:00
parent 29bb140297
commit 49fdae58ac
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
6 changed files with 121 additions and 67 deletions

View File

@ -1,18 +1,37 @@
class Gcc < Formula
desc "GNU compiler collection"
homepage "https://gcc.gnu.org/"
url "https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.xz"
mirror "https://ftpmirror.gnu.org/gcc/gcc-9.2.0/gcc-9.2.0.tar.xz"
sha256 "ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206"
if Hardware::CPU.arm?
# Branch from the Darwin maintainer of GCC with Apple Silicon support,
# located at https://github.com/iains/gcc-darwin-arm64 and
# backported with his help to gcc-10 branch. Too big for a patch.
url "https://github.com/fxcoudert/gcc/archive/gcc-10-arm-20201228.tar.gz"
sha256 "dd5377a13f0ee4645bce1c18ed7327ea4ad5f8bd5c6a2a24eb299c647d3d43f4"
version "10.2.0"
else
url "https://ftp.gnu.org/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.xz"
mirror "https://ftpmirror.gnu.org/gcc/gcc-10.2.0/gcc-10.2.0.tar.xz"
sha256 "b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c"
end
license "GPL-3.0"
revision 2
head "https://gcc.gnu.org/git/gcc.git"
livecheck do
# Should be
# url :stable
# but that does not work with the ARM-specific branch above
url "https://ftp.gnu.org/gnu/gcc/gcc-10.2.0"
regex(%r{href=.*?gcc[._-]v?(\d+(?:\.\d+)+)(?:/?["' >]|\.t)}i)
end
bottle do
root_url "https://homebrew.bintray.com/bottles"
cellar :any
sha256 "1564397f461f629f3811f1ececc7f2bb614f7520242743fc41348d190d8b6aa9" => :catalina
sha256 "5012d43ce3ff9b31fc21f9df1075b9d5e205d1a727b75f6dbd098654aff0f0f2" => :mojave
sha256 "cc0e6c6a7f7ce5823d0578cf57a6e201727238905aa8a4726e5f90dbc252d94b" => :high_sierra
sha256 "7d6952bb9c36d08e658e7e9b0637805a49184a1c7506c020ffa839e7ca756ba3" => :big_sur
sha256 "537582c8fb519a87b3e213953a8c2daadf11339559b9da17dd9fab95d8768dfc" => :arm64_big_sur
sha256 "4c17591306a2c233bdb9c469ceec3057a1b76ac4d194942737c322ffc22cb440" => :catalina
sha256 "d4ef938e9e1d7e4247b653e4b3f5fb13e55a3dc6d50ea64f0e914271edd78c7c" => :mojave
end
# The bottles are built on systems with the CLT installed, and do not work
@ -27,15 +46,17 @@ class Gcc < Formula
depends_on "libmpc"
depends_on "mpfr"
uses_from_macos "zlib"
# GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib
cxxstdlib_check :skip
# Fix system headers for Catalina SDK
# (otherwise __OSX_AVAILABLE_STARTING ends up undefined)
if DevelopmentTools.clang_build_version >= 1100
if Hardware::CPU.arm?
# Patch for Big Sur version numbering, remove with GCC 11
# https://github.com/iains/gcc-darwin-arm64/commit/556ab512
patch do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/b8b8e65e/gcc/9.2.0-catalina.patch"
sha256 "0b8d14a7f3c6a2f0d2498526e86e088926671b5da50a554ffa6b7f73ac4f132b"
url "https://raw.githubusercontent.com/Homebrew/formula-patches/7baf6e2f/gcc/bigsur.diff"
sha256 "42de3bc4889b303258a4075f88ad8624ea19384cab57a98a5270638654b83f41"
end
end
@ -43,7 +64,7 @@ class Gcc < Formula
if build.head?
"HEAD"
else
version.to_s.slice(/\d/)
version.major.to_s
end
end
@ -57,11 +78,11 @@ class Gcc < Formula
# - BRIG
languages = %w[c c++ objc obj-c++ fortran]
osmajor = `uname -r`.split(".").first
pkgversion = "Homebrew GCC #{pkg_version} #{build.used_options*" "}".strip
cpu = Hardware::CPU.arm? ? "aarch64" : "x86_64"
args = %W[
--build=x86_64-apple-darwin#{osmajor}
--build=#{cpu}-apple-darwin#{OS.kernel_version.major}
--prefix=#{prefix}
--libdir=#{lib}/gcc/#{version_suffix}
--disable-nls
@ -80,21 +101,25 @@ class Gcc < Formula
# Xcode 10 dropped 32-bit support
args << "--disable-multilib" if DevelopmentTools.clang_build_version >= 1000
# System headers may not be in /usr/include
sdk = MacOS.sdk_path_if_needed
if sdk
args << "--with-native-system-header-dir=/usr/include"
args << "--with-sysroot=#{sdk}"
end
# Mojave uses the Catalina SDK which causes issues like
# https://github.com/Homebrew/homebrew-core/issues/46393
ENV["ac_cv_func_aligned_alloc"] = "no" if MacOS.version == :mojave
# Avoid reference to sed shim
args << "SED=/usr/bin/sed"
# Ensure correct install names when linking against libgcc_s;
# see discussion in https://github.com/Homebrew/legacy-homebrew/pull/34303
inreplace "libgcc/config/t-slibgcc-darwin", "@shlib_slibdir@", "#{HOMEBREW_PREFIX}/lib/gcc/#{version_suffix}"
mkdir "build" do
if !MacOS::CLT.installed?
# For Xcode-only systems, we need to tell the sysroot path
args << "--with-native-system-header-dir=/usr/include"
args << "--with-sysroot=#{MacOS.sdk_path}"
elsif MacOS.version >= :mojave
# System headers are no longer located in /usr/include
args << "--with-native-system-header-dir=/usr/include"
args << "--with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX#{MacOS.version}.sdk"
end
system "../configure", *args
# Use -headerpad_max_install_names in the build,

View File

@ -1,29 +1,45 @@
class Gmp < Formula
desc "GNU multiple precision arithmetic library"
homepage "https://gmplib.org/"
url "https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz"
mirror "https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz"
sha256 "87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912"
revision 2
url "https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz"
mirror "https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz"
sha256 "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2"
license any_of: ["LGPL-3.0-or-later", "GPL-2.0-or-later"]
livecheck do
url "https://gmplib.org/download/gmp/"
regex(/href=.*?gmp[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
root_url "https://homebrew.bintray.com/bottles"
cellar :any
rebuild 1
sha256 "2409417943fceda33eac12a8229fbf7b990eee18ee341b543be575550a077bb0" => :catalina
sha256 "84f74594086bccc53bdb141f4d06d7847680374e255ebe016654da1e47db2dfc" => :mojave
sha256 "a536c51149806b73b2e1178be94300832b6b151455006bc7f2a32b9dc493c7a3" => :high_sierra
sha256 "ada22a8bbfe8532d71f2b565e00b1643beaf72bff6b36064cbad0cd7436e4948" => :sierra
sha256 "6a44705536f25c4b9f8547d44d129ae3b3657755039966ad2b86b821e187c32c" => :big_sur
sha256 "ff4ad8d068ba4c14d146abb454991b6c4f246796ec2538593dc5f04ca7593eec" => :arm64_big_sur
sha256 "35e9f82d80708ae8dea2d6b0646dcd86d692321b96effaa76b7fad4d6cffa5be" => :catalina
sha256 "00fb998dc2abbd09ee9f2ad733ae1adc185924fb01be8814e69a57ef750b1a32" => :mojave
sha256 "54191ce7fa888df64b9c52870531ac0ce2e8cbd40a7c4cdec74cb2c4a421af97" => :high_sierra
end
uses_from_macos "m4" => :build
def install
# Work around macOS Catalina / Xcode 11 code generation bug
# (test failure t-toom53, due to wrong code in mpn/toom53_mul.o)
ENV.append_to_cflags "-fno-stack-check"
args = std_configure_args
args << "--enable-cxx"
# Enable --with-pic to avoid linking issues with the static library
args = %W[--prefix=#{prefix} --enable-cxx --with-pic]
args << "--build=#{Hardware.oldest_cpu}-apple-darwin#{`uname -r`.to_i}"
args << "--with-pic"
on_macos do
cpu = Hardware::CPU.arm? ? "aarch64" : Hardware.oldest_cpu
args << "--build=#{cpu}-apple-darwin#{OS.kernel_version.major}"
end
on_linux do
args << "--build=core2-linux-gnu"
args << "ABI=32" if Hardware::CPU.is_32_bit?
end
system "./configure", *args
system "make"
system "make", "check"

View File

@ -1,23 +1,29 @@
class Isl < Formula
desc "Integer Set Library for the polyhedral model"
homepage "https://isl.gforge.inria.fr/"
# Note: Always use tarball instead of git tag for stable version.
homepage "http://isl.gforge.inria.fr"
# NOTE: Always use tarball instead of git tag for stable version.
#
# Currently isl detects its version using source code directory name
# and update isl_version() function accordingly. All other names will
# result in isl_version() function returning "UNKNOWN" and hence break
# package detection.
url "http://isl.gforge.inria.fr/isl-0.21.tar.xz"
mirror "https://deb.debian.org/debian/pool/main/i/isl/isl_0.21.orig.tar.xz"
sha256 "777058852a3db9500954361e294881214f6ecd4b594c00da5eee974cd6a54960"
url "http://isl.gforge.inria.fr/isl-0.23.tar.xz"
mirror "https://deb.debian.org/debian/pool/main/i/isl/isl_0.23.orig.tar.xz"
sha256 "5efc53efaef151301f4e7dde3856b66812d8153dede24fab17673f801c8698f2"
license "MIT"
livecheck do
url :homepage
regex(/href=.*?isl[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
root_url "https://homebrew.bintray.com/bottles"
cellar :any
sha256 "1f42c08dd84a2f418c8446be2679f027d8b1250d337b5e3135c401eba578cbb7" => :catalina
sha256 "f9188b5d486b2a835cd865f219be1a9848ce3926e27089a1538ee989db65447d" => :mojave
sha256 "d997d49958218e521bc4f73369414ff9fad040d28601d94012e4c68cd090ea93" => :high_sierra
sha256 "d5dc353916cd98da04552a3d7cb86a3203612df422c4e9389e13e12f86945865" => :sierra
sha256 "77907a43a415210de713d9e82588b452e5546a31b42194c7c75e07486d319a51" => :big_sur
sha256 "5b066bc471862c8d166082f0d1bf6b132aac0117f67e19bba139dfe907eb2614" => :arm64_big_sur
sha256 "bb4c986e9f49c7eea6349a536889e6223549885c0aab3d7692542cd48bc06481" => :catalina
sha256 "066330367dcc69e8d200a1d26a7f6ca580ecc3c397a686fa3b2fbd36d5d88ada" => :mojave
end
head do
@ -37,7 +43,6 @@ class Isl < Formula
"--prefix=#{prefix}",
"--with-gmp=system",
"--with-gmp-prefix=#{Formula["gmp"].opt_prefix}"
system "make", "check"
system "make", "install"
(share/"gdb/auto-load").install Dir["#{lib}/*-gdb.py"]
end

View File

@ -1,17 +1,23 @@
class Libmpc < Formula
desc "C library for the arithmetic of high precision complex numbers"
homepage "http://www.multiprecision.org/mpc/"
url "https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz"
sha256 "6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e"
url "https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz"
mirror "https://ftpmirror.gnu.org/mpc/mpc-1.2.1.tar.gz"
sha256 "17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459"
license "LGPL-3.0-or-later"
livecheck do
url :stable
end
bottle do
root_url "https://homebrew.bintray.com/bottles"
cellar :any
sha256 "b9491bbc04d1e52dfb8311dc9aa0081fd3041cb6b2f6b59a4104d712d341979d" => :catalina
sha256 "1cb3a09238830d45d64a87f520f06122d24a020403fac1800c831d15c605282e" => :mojave
sha256 "3b28ec506ab53ef5f3163e87fb72ae735b7f91ee2fc20fe184cf1241481b72a5" => :high_sierra
sha256 "18d620a1612bc51b1fbd1b3b62c9c73766b90549c746740c5a27d2ab1ec5ede7" => :sierra
sha256 "6f19f936781dae0db248abdd84a72c3e25451c44379706bc3800760f0aa43888" => :el_capitan
sha256 "754667644cc287cd9691fd3215df260aa971562b5a7b6ca65e29b2e15ea1e656" => :big_sur
sha256 "6a93bd78c1b55f8b29e11fd1e9c68c6c305ffe74aa5b978ba93189b6d84d1451" => :arm64_big_sur
sha256 "8c037df4b551058d00351676dc2c5ec395bd69c88545fac9ccfd0749dadb8ee2" => :catalina
sha256 "c229b6def61f4acc41b4b159d93dbc63a5c77f87f61623c9f7c5399da440cc4f" => :mojave
sha256 "939f0ad01d809356e33bdc70a8a8483eb1b021fd5f3723d0e61a2698af00f01b" => :high_sierra
end
depends_on "gmp"

View File

@ -1,26 +1,28 @@
class Mpfr < Formula
desc "C library for multiple-precision floating-point computations"
homepage "https://www.mpfr.org/"
url "https://ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.xz"
mirror "https://ftpmirror.gnu.org/mpfr/mpfr-4.0.2.tar.xz"
sha256 "1d3be708604eae0e42d578ba93b390c2a145f17743a744d8f3f8c2ad5855a38a"
url "https://ftp.gnu.org/gnu/mpfr/mpfr-4.1.0.tar.xz"
mirror "https://ftpmirror.gnu.org/mpfr/mpfr-4.1.0.tar.xz"
sha256 "0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f"
license "GPL-3.0"
livecheck do
url :stable
end
bottle do
root_url "https://homebrew.bintray.com/bottles"
cellar :any
sha256 "140d29bfee0c8cf356fbb5391465f781df559e6076988de3ea8bcfd812f3c5bd" => :catalina
sha256 "cfce7ab866e98360c9364cd924da620ae7936d3a224d686aacc209c2107d19aa" => :mojave
sha256 "bf5d21e7e8e549f7e8d07791a90f44a487f4c7151897b7c64d02928b5bd73520" => :high_sierra
sha256 "4fb1860a481e24c70eefc8e5782030612840f1bb8f50586ca76a4c6c53629deb" => :sierra
sha256 "1e8eb0326f62d3461d420d98af6fc088daca481cae89fd77a75b420d2e76d776" => :big_sur
sha256 "9df11560dd3650ffae35c134cef6e0e91aad0e862f5c8895c568b828cf0598d5" => :arm64_big_sur
sha256 "5fcf57834f58c18761c6c7b0eb961eb7f9fc54325b5361bf3a17c4dee6ebc08a" => :catalina
sha256 "93c0d2ca093819f125300002cd34c1d1b4dfb7a1403729205861bec21388ff12" => :mojave
sha256 "77581a1df66fb1ef55ffb19777d08b0b60fbc3d2d7ad491a8aceb3a6a4bf7ffd" => :high_sierra
end
depends_on "gmp"
def install
# Work around macOS Catalina / Xcode 11 code generation bug
# (test failure t-toom53, due to wrong code in mpn/toom53_mul.o)
ENV.append_to_cflags "-fno-stack-check"
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}",
"--disable-silent-rules"
system "make"

@ -1 +1 @@
Subproject commit 7a8446e83653cf5b44c004baecccdac3cbffb447
Subproject commit ab656f2d843559ecb562b0124fe150e3755a1138