2010-03-24 21:45:48 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class HaskellPlatform < Formula
|
2010-03-24 21:45:48 +00:00
|
|
|
homepage 'http://hackage.haskell.org/platform/'
|
2013-05-28 19:24:59 +00:00
|
|
|
url 'http://lambda.haskell.org/platform/download/2013.2.0.0/haskell-platform-2013.2.0.0.tar.gz'
|
|
|
|
sha1 '8669bb5add1826c0523fb130c095fb8bf23a30ce'
|
2010-03-24 21:45:48 +00:00
|
|
|
|
|
|
|
depends_on 'ghc'
|
|
|
|
|
2013-05-28 19:24:59 +00:00
|
|
|
conflicts_with 'cabal-install'
|
|
|
|
|
2010-03-24 21:45:48 +00:00
|
|
|
def install
|
2012-12-11 19:39:56 +00:00
|
|
|
# libdir doesn't work if passed to configure, needs to be set in the environment
|
2013-05-28 19:24:59 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}"
|
2012-12-11 19:39:56 +00:00
|
|
|
ENV['EXTRA_CONFIGURE_OPTS'] = "--libdir=#{lib}/ghc"
|
|
|
|
system "make install"
|
2010-03-24 21:45:48 +00:00
|
|
|
end
|
|
|
|
|
2010-07-26 00:27:18 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Run `cabal update` to initialize the package list.
|
|
|
|
|
2011-12-23 00:28:34 +00:00
|
|
|
If you are replacing a previous version of haskell-platform, you may want
|
|
|
|
to unregister packages belonging to the old version. You can find broken
|
|
|
|
packages using:
|
|
|
|
ghc-pkg check --simple-output
|
|
|
|
You can uninstall them using:
|
|
|
|
ghc-pkg check --simple-output | xargs -n 1 ghc-pkg unregister --force
|
2010-07-26 00:27:18 +00:00
|
|
|
EOS
|
2010-03-24 21:45:48 +00:00
|
|
|
end
|
|
|
|
end
|