Created
January 24, 2012 03:29
-
-
Save masakielastic/1667610 to your computer and use it in GitHub Desktop.
homebrew fomula for GHC 7.4.1RC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Ghc < Formula | |
homepage 'http://haskell.org/ghc/' | |
version '7.4.1RC1' | |
if ARGV.include? '--64bit' | |
url "http://www.haskell.org/ghc/dist/7.4.1-rc1/ghc-7.4.0.20111219-x86_64-apple-darwin.tar.bz2" | |
else | |
url "http://www.haskell.org/ghc/dist/7.4.1-rc1/ghc-7.4.0.20111219-i386-apple-darwin.tar.bz2" | |
end | |
# Avoid stripping the Haskell binaries & libraries. | |
# See: http://hackage.haskell.org/trac/ghc/ticket/2458 | |
skip_clean ['bin', 'lib'] | |
def options | |
[['--64bit', 'Install 64-bit version of GHC (experimental).']] | |
end | |
def install | |
if ARGV.build_devel? | |
opoo "The current version of haskell-platform will NOT work with this version of GHC!" | |
end | |
if ARGV.include? '--64bit' | |
if Hardware.is_64_bit? | |
opoo "The x86_64 version is experimental!" | |
else | |
onoe "The x86_64 version is only for 64-bit hardware." | |
exit 1 | |
end | |
end | |
system "./configure --prefix=#{prefix}" | |
system "make install" | |
end | |
def caveats; <<-EOS.undent | |
The 32-bit version of GHC is installed by default, as the x84_64 version is | |
labelled experimental. Override with `--64bit`. | |
This brew is for GHC only; you might also be interested in haskell-platform. | |
EOS | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment