summaryrefslogtreecommitdiff
path: root/homebrew/gccat7
diff options
context:
space:
mode:
Diffstat (limited to 'homebrew/gccat7')
-rw-r--r--homebrew/gccat7/.beer71
-rw-r--r--homebrew/gccat7/.make.sh-auto21
-rw-r--r--homebrew/gccat7/_metadata/description1
-rw-r--r--homebrew/gccat7/_metadata/homepage1
-rw-r--r--homebrew/gccat7/_metadata/name1
-rw-r--r--homebrew/gccat7/_metadata/version1
-rwxr-xr-xhomebrew/gccat7/download.sh1
-rwxr-xr-xhomebrew/gccat7/patches.sh1
8 files changed, 98 insertions, 0 deletions
diff --git a/homebrew/gccat7/.beer b/homebrew/gccat7/.beer
new file mode 100644
index 000000000..38ee9b1ec
--- /dev/null
+++ b/homebrew/gccat7/.beer
@@ -0,0 +1,71 @@
+{
+ "name": "GccAT7",
+ "description": "GNU compiler collection",
+ "url": "https://ftp.gnu.org/gnu/gcc/gcc-7.4.0/gcc-7.4.0.tar.xz",
+ "mirror": "https://ftpmirror.gnu.org/gcc/gcc-7.4.0/gcc-7.4.0.tar.xz",
+ "homepage": "https://gcc.gnu.org/",
+ "depends": [
+ {
+ "depend": "gmp",
+ "build-depend": false
+ },
+ {
+ "depend": "isl",
+ "build-depend": false
+ },
+ {
+ "depend": "libmpc",
+ "build-depend": false
+ },
+ {
+ "depend": "mpfr",
+ "build-depend": false
+ }
+ ],
+ "resource": [],
+ "conflicts": [],
+ "patches": [
+ {
+ "url": "https://raw.githubusercontent.com/Homebrew/formula-patches/master/gcc%407/gcc7-xcode10.2.patch",
+ "strip": "1"
+ }
+ ],
+ "install": [
+ "ENV.delete \"LD\"",
+ "version_suffix = version.to_s.slice(/\\d/)",
+ "ENV[\"gcc_cv_prog_makeinfo_modern\"] = \"no\"",
+ "languages = %w[c c++ objc obj-c++ fortran]",
+ "osmajor = `uname -r`.chomp",
+ "args = [",
+ "\"--build=x86_64-apple-darwin#{osmajor}\",",
+ "\"--prefix=#{prefix}\",",
+ "\"--libdir=#{lib}/gcc/#{version_suffix}\",",
+ "\"--enable-languages=#{languages.join(\",\")}\",",
+ "\"--program-suffix=-#{version_suffix}\",",
+ "\"--with-gmp=#{Formula[\"gmp\"].opt_prefix}\",",
+ "\"--with-mpfr=#{Formula[\"mpfr\"].opt_prefix}\",",
+ "\"--with-mpc=#{Formula[\"libmpc\"].opt_prefix}\",",
+ "\"--with-isl=#{Formula[\"isl\"].opt_prefix}\",",
+ "\"--with-system-zlib\",",
+ "\"--enable-checking=release\",",
+ "\"--with-pkgversion=Homebrew GCC #{pkg_version} #{build.used_options*\" \"}\".strip,",
+ "\"--with-bugurl=https://github.com/Homebrew/homebrew-core/issues\",",
+ "\"--disable-nls\",",
+ "]",
+ "args << \"--disable-multilib\" if DevelopmentTools.clang_build_version >= 1000",
+ "inreplace \"libgcc/config/t-slibgcc-darwin\", \"@shlib_slibdir@\", \"#{HOMEBREW_PREFIX}/lib/gcc/#{version_suffix}\"",
+ "mkdir \"build\" do",
+ "if !MacOS::CLT.installed?",
+ "args << \"--with-native-system-header-dir=/usr/include\"",
+ "args << \"--with-sysroot=#{MacOS.sdk_path}\"",
+ "elsif MacOS.version >= :mojave",
+ "args << \"--with-native-system-header-dir=/usr/include\"",
+ "args << \"--with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\"",
+ "end",
+ "system \"../configure\", *args",
+ "system \"make\"",
+ "system \"make\", \"install\""
+ ],
+ "version": "7.4.0",
+ "file": "gcc@7.rb"
+} \ No newline at end of file
diff --git a/homebrew/gccat7/.make.sh-auto b/homebrew/gccat7/.make.sh-auto
new file mode 100644
index 000000000..94695001c
--- /dev/null
+++ b/homebrew/gccat7/.make.sh-auto
@@ -0,0 +1,21 @@
+pkg:setup
+ENV.delete "LD"
+version_suffix = version.to_s.slice(/\d/)
+ENV["gcc_cv_prog_makeinfo_modern"] = "no"
+languages = %w[c c++ objc obj-c++ fortran]
+osmajor = `uname -r`.chomp
+args = [
+"--build=x86_64-apple-darwin#{osmajor}", "--prefix=#{prefix}", "--libdir=#{lib}/gcc/#{version_suffix}", "--enable-languages=#{languages.join(",")}", "--program-suffix=-#{version_suffix}", "--with-gmp=#{Formula["gmp"].opt_prefix}", "--with-mpfr=#{Formula["mpfr"].opt_prefix}", "--with-mpc=#{Formula["libmpc"].opt_prefix}", "--with-isl=#{Formula["isl"].opt_prefix}", "--with-system-zlib", "--enable-checking=release", "--with-pkgversion=Homebrew GCC #{pkg_version} #{build.used_options*" "}".strip, "--with-bugurl=https://github.com/Homebrew/homebrew-core/issues", "--disable-nls", ]
+args << "--disable-multilib" if DevelopmentTools.clang_build_version >= 1000
+inreplace "libgcc/config/t-slibgcc-darwin", "@shlib_slibdir@", "#{HOMEBREW_PREFIX}/lib/gcc/#{version_suffix}"
+mkdir "build" && cd build
+if !MacOS::CLT.installed?
+args << "--with-native-system-header-dir=/usr/include"
+args << "--with-sysroot=#{MacOS.sdk_path}"
+elsif MacOS.version >= :mojave
+args << "--with-native-system-header-dir=/usr/include"
+args << "--with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk"
+end
+PKG_CONF=../configure pkg:configure *args
+make
+make DESTDIR=${PKG_DEST} install
diff --git a/homebrew/gccat7/_metadata/description b/homebrew/gccat7/_metadata/description
new file mode 100644
index 000000000..01f35c01b
--- /dev/null
+++ b/homebrew/gccat7/_metadata/description
@@ -0,0 +1 @@
+GNU compiler collection
diff --git a/homebrew/gccat7/_metadata/homepage b/homebrew/gccat7/_metadata/homepage
new file mode 100644
index 000000000..0d0ba1d6d
--- /dev/null
+++ b/homebrew/gccat7/_metadata/homepage
@@ -0,0 +1 @@
+https://gcc.gnu.org/
diff --git a/homebrew/gccat7/_metadata/name b/homebrew/gccat7/_metadata/name
new file mode 100644
index 000000000..851736d2b
--- /dev/null
+++ b/homebrew/gccat7/_metadata/name
@@ -0,0 +1 @@
+GccAT7
diff --git a/homebrew/gccat7/_metadata/version b/homebrew/gccat7/_metadata/version
new file mode 100644
index 000000000..ba7f754d0
--- /dev/null
+++ b/homebrew/gccat7/_metadata/version
@@ -0,0 +1 @@
+7.4.0
diff --git a/homebrew/gccat7/download.sh b/homebrew/gccat7/download.sh
new file mode 100755
index 000000000..37b099f33
--- /dev/null
+++ b/homebrew/gccat7/download.sh
@@ -0,0 +1 @@
+wget https://ftp.gnu.org/gnu/gcc/gcc-7.4.0/gcc-7.4.0.tar.xz || wget https://ftpmirror.gnu.org/gcc/gcc-7.4.0/gcc-7.4.0.tar.xz \ No newline at end of file
diff --git a/homebrew/gccat7/patches.sh b/homebrew/gccat7/patches.sh
new file mode 100755
index 000000000..bb7e902ba
--- /dev/null
+++ b/homebrew/gccat7/patches.sh
@@ -0,0 +1 @@
+wget https://raw.githubusercontent.com/Homebrew/formula-patches/master/gcc%407/gcc7-xcode10.2.patch