aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kühl2010-07-16 22:27:12 +0200
committerAdam Vandenberg2010-07-16 17:40:38 -0700
commit5082f98a415a7c0ca9d50d90da7dc24d6da40ebd (patch)
tree62f0ab1f15b14f41d3a5b9a31974579b28041dfe
parent94bb543c5918ff4a9b6bcaf49916b83ed8a31a79 (diff)
downloadhomebrew-5082f98a415a7c0ca9d50d90da7dc24d6da40ebd.tar.bz2
Make `gfortran` only report errors on install.
As is, the gfortran formula reports an Error when no compatible Xcode version is available, but does so even in cases when it is neither installed nor in the process of being installed. For example, `brew outdated` reports the error, just because it needs to load the formula to check its version. This changeset delays the error message until someone tries to install the formula. The version and URL are determined solely by checking the OSX version. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rw-r--r--Library/Formula/gfortran.rb23
1 files changed, 9 insertions, 14 deletions
diff --git a/Library/Formula/gfortran.rb b/Library/Formula/gfortran.rb
index 609f34b4d..f81e3d718 100644
--- a/Library/Formula/gfortran.rb
+++ b/Library/Formula/gfortran.rb
@@ -16,24 +16,14 @@ class GfortranPkgDownloadStrategy <CurlDownloadStrategy
end
class Gfortran <Formula
-
- case gcc_42_build
- when 5577
- url 'http://r.research.att.com/gfortran-42-5577.pkg'
- md5 '30fb495c93cf514003cdfcb7846dc701'
- version "4.2.4-5577"
-
- when 5659
+ if MACOS_VERSION >= 10.6
url 'http://r.research.att.com/gfortran-42-5659.pkg'
md5 '71bd546baa45c9c0fb4943cdd72ee274'
version "4.2.4-5659"
-
else
- onoe <<-EOS.undent
- Currently the gfortran compiler provided by this brew is only supported
- for XCode 3.1.4 on OS X 10.5.x and XCode 3.2.2 on OS X 10.6.x
- EOS
- # exit
+ url 'http://r.research.att.com/gfortran-42-5577.pkg'
+ md5 '30fb495c93cf514003cdfcb7846dc701'
+ version "4.2.4-5577"
end
homepage 'http://r.research.att.com/tools/'
@@ -61,6 +51,11 @@ class Gfortran <Formula
ohai "Installing gfortran 4.2.4 for XCode 3.2.2 (build 5659)"
safe_system "pax --insecure -rz -f Payload.gz -s ',./usr,#{prefix},'"
safe_system "ln -sf #{man1}/gfortran-4.2.1 #{man1}/gfortran.1"
+ else
+ onoe <<-EOS.undent
+ Currently the gfortran compiler provided by this brew is only supported
+ for XCode 3.1.4 on OS X 10.5.x and XCode 3.2.2 on OS X 10.6.x
+ EOS
end
end