diff options
| author | Adam Vandenberg | 2012-04-17 06:50:31 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-04-17 06:50:31 -0700 |
| commit | 67827eec9b9433488e37ec6ab9b7c820f188e6e8 (patch) | |
| tree | b1c0f8639b7c62b4f1896d3cf9caf14a701f0bba /Library/Formula | |
| parent | 2e14216c696205c1ddafa9ccc75c5d78acf77da6 (diff) | |
| download | homebrew-67827eec9b9433488e37ec6ab9b7c820f188e6e8.tar.bz2 | |
GHC: use a Requirement
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/ghc.rb | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/Library/Formula/ghc.rb b/Library/Formula/ghc.rb index 2cf26f9dd..47ceb4061 100644 --- a/Library/Formula/ghc.rb +++ b/Library/Formula/ghc.rb @@ -1,5 +1,18 @@ require 'formula' +class NeedsSnowLeopard < Requirement + def satisfied? + MacOS.snow_leopard? + end + + def message; <<-EOS.undent + GHC requires OS X 10.6 or newer. The binary releases no longer work on + Leopard. See the following issue for details: + http://hackage.haskell.org/trac/ghc/ticket/6009 + EOS + end +end + class Ghc < Formula homepage 'http://haskell.org/ghc/' if ARGV.include? '--64bit' @@ -20,6 +33,8 @@ class Ghc < Formula end end + depends_on NeedsSnowLeopard.new + # Avoid stripping the Haskell binaries & libraries. # See: http://hackage.haskell.org/trac/ghc/ticket/2458 skip_clean ['bin', 'lib'] @@ -37,16 +52,6 @@ class Ghc < Formula end def install - if MacOS.leopard? - onoe <<-EOS.undent - GHC requires OS X 10.6 or newer. The binary releases no longer work on - Leopard. See the following issue for details: - - http://hackage.haskell.org/trac/ghc/ticket/6009 - EOS - exit 1 - end - if ARGV.build_devel? opoo "The current version of haskell-platform will NOT work with this version of GHC!" end |
