aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorXiyue Deng2013-04-23 11:03:56 -0700
committerJack Nagel2013-05-19 11:27:31 -0500
commit7553086d25ceb8444a9c08781afecd2f6f18fcad (patch)
tree82092f8a27d1bf4dc3881f1b3688113019bf91ee /Library/Formula
parente697c1ab6feb23c0b23fad15973c3d7299dcba4e (diff)
downloadhomebrew-7553086d25ceb8444a9c08781afecd2f6f18fcad.tar.bz2
gfortran updates
* Enable graphite loop optimization by adding cloog and isl as dependencies. * Bootstrapped by Clang should work now. * Stop installing libstdc++ pretty printer, which conflicts with gcc48 formula. * Move '--enable-language=gfortran' into args for consistency. * Fix comments: man7 is not installed by any formula, as it is hard to decide which formula should install it now that there are multiple versioned gcc formulae. * Use double quote for interpolation. Thanks @jacknagel. Closes #19382. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/gfortran.rb22
1 files changed, 8 insertions, 14 deletions
diff --git a/Library/Formula/gfortran.rb b/Library/Formula/gfortran.rb
index 5347d83b1..32ea7bddc 100644
--- a/Library/Formula/gfortran.rb
+++ b/Library/Formula/gfortran.rb
@@ -1,7 +1,5 @@
require 'formula'
-# todo: Use graphite loop optimizations? (would depends_on 'cloog')
-
class Gfortran < Formula
homepage 'http://gcc.gnu.org/wiki/GFortran'
url 'http://ftpmirror.gnu.org/gcc/gcc-4.8.0/gcc-4.8.0.tar.bz2'
@@ -20,20 +18,12 @@ class Gfortran < Formula
depends_on 'gmp'
depends_on 'libmpc'
depends_on 'mpfr'
+ depends_on 'cloog'
+ depends_on 'isl'
# http://gcc.gnu.org/install/test.html
depends_on 'dejagnu' if build.include? 'check'
- fails_with :clang do
- build 421
- cause <<-EOS.undent
- "fatal error: error in backend: ran out of registers during register allocation"
-
- If you have any knowledge to share or can provide a fix, please open an issue.
- Thanks!
- EOS
- end
-
def install
# Sandbox the GCC lib, libexec and include directories so they don't wander
# around telling small children there is no Santa Claus. This results in a
@@ -49,11 +39,14 @@ class Gfortran < Formula
"--datarootdir=#{share}",
# ...and the binaries...
"--bindir=#{bin}",
+ "--enable-languages=fortran",
"--with-system-zlib",
# ...opt_prefix survives upgrades and works even if `brew unlink gmp`
"--with-gmp=#{Formula.factory('gmp').opt_prefix}",
"--with-mpfr=#{Formula.factory('mpfr').opt_prefix}",
"--with-mpc=#{Formula.factory('libmpc').opt_prefix}",
+ "--with-cloog=#{Formula.factory('cloog').opt_prefix}",
+ "--with-isl=#{Formula.factory('isl').opt_prefix}",
# ...we build the stage 1 gcc with clang (which is know to fail checks)
"--enable-checking=release",
"--disable-stage1-checking",
@@ -72,7 +65,7 @@ class Gfortran < Formula
args << "--with-sysroot=#{MacOS.sdk_path}"
end
- system '../configure', "--enable-languages=fortran", *args
+ system '../configure', *args
if build.include? 'enable-profiled-build'
# Takes longer to build, may bug out. Provided for those who want to
@@ -90,8 +83,9 @@ class Gfortran < Formula
# This package installs a whole GCC suite. Removing non-fortran components:
bin.children.reject{ |p| p.basename.to_s.match(/gfortran/) }.each{ |p| rm p }
man1.children.reject{ |p| p.basename.to_s.match(/gfortran/) }.each{ |p| rm p }
- man7.rmtree # dupes: fsf fundraising and gpl will be added by gcc formula
+ man7.rmtree # dupes: fsf fundraising and gpl
# (share/'locale').rmtree
+ (share/"gcc-#{version}").rmtree # dupes: libstdc++ pretty printer, will be added by gcc* formula
end
test do