ghc: use options DSL

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
master
Jack Nagel 2012-08-12 19:01:40 -05:00
parent 0f028472e5
commit a59d5ccec2
1 changed files with 3 additions and 5 deletions

View File

@ -16,7 +16,7 @@ end
class Ghc < Formula
homepage 'http://haskell.org/ghc/'
version '7.4.2'
if Hardware.is_64_bit? and not ARGV.build_32_bit?
if Hardware.is_64_bit? and not build.build_32_bit?
url 'http://www.haskell.org/ghc/dist/7.4.2/ghc-7.4.2-x86_64-apple-darwin.tar.bz2'
sha1 '7c655701672f4b223980c3a1068a59b9fbd08825'
else
@ -26,6 +26,8 @@ class Ghc < Formula
depends_on NeedsSnowLeopard.new
option '32-bit'
# Avoid stripping the Haskell binaries & libraries.
# See: http://hackage.haskell.org/trac/ghc/ticket/2458
skip_clean ['bin', 'lib']
@ -38,10 +40,6 @@ class Ghc < Formula
EOS
end
def options
[['--32-bit', 'Build 32-bit only.']]
end
def install
system "./configure", "--prefix=#{prefix}"
system "make install"