aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Formula/ghc.rb43
1 files changed, 21 insertions, 22 deletions
diff --git a/Library/Formula/ghc.rb b/Library/Formula/ghc.rb
index 7a2116807..77f90a461 100644
--- a/Library/Formula/ghc.rb
+++ b/Library/Formula/ghc.rb
@@ -1,26 +1,16 @@
require 'formula'
-class Ghcbinary < Formula
- 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
- url 'http://www.haskell.org/ghc/dist/7.4.2/ghc-7.4.2-i386-apple-darwin.tar.bz2'
- sha1 '60f749893332d7c22bb4905004a67510992d8ef6'
- end
- version '7.4.2'
-end
-
-class Ghctestsuite < Formula
- url 'https://github.com/ghc/testsuite/archive/ghc-7.6.3-release.tar.gz'
- sha1 '6a1973ae3cccdb2f720606032ae84ffee8680ca1'
-end
-
class Ghc < Formula
homepage 'http://haskell.org/ghc/'
url 'http://www.haskell.org/ghc/dist/7.6.3/ghc-7.6.3-src.tar.bz2'
sha1 '8938e1ef08b37a4caa071fa169e79a3001d065ff'
+ bottle do
+ sha1 '332ed50be17831557b5888f7e8395f1beb008731' => :mountain_lion
+ sha1 '64a7548eb2135a4b5f2276e59f435a39c2d2961f' => :lion
+ sha1 '166bf3c8a512b58da4119b2997a1f45c1f7c65b5' => :snow_leopard
+ end
+
env :std
# http://hackage.haskell.org/trac/ghc/ticket/6009
@@ -29,10 +19,19 @@ class Ghc < Formula
option '32-bit'
option 'tests', 'Verify the build using the testsuite in Fast Mode, 5 min'
- bottle do
- sha1 '332ed50be17831557b5888f7e8395f1beb008731' => :mountain_lion
- sha1 '64a7548eb2135a4b5f2276e59f435a39c2d2961f' => :lion
- sha1 '166bf3c8a512b58da4119b2997a1f45c1f7c65b5' => :snow_leopard
+ resource 'binary' do
+ 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
+ url 'http://www.haskell.org/ghc/dist/7.4.2/ghc-7.4.2-i386-apple-darwin.tar.bz2'
+ sha1 '60f749893332d7c22bb4905004a67510992d8ef6'
+ end
+ end
+
+ resource 'testsuite' do
+ url 'https://github.com/ghc/testsuite/archive/ghc-7.6.3-release.tar.gz'
+ sha1 '6a1973ae3cccdb2f720606032ae84ffee8680ca1'
end
fails_with :clang do
@@ -51,7 +50,7 @@ class Ghc < Formula
# Move the main tarball contents into a subdirectory
(buildpath+'Ghcsource').install Dir['*']
- Ghcbinary.new.brew do
+ resource('binary').stage do
# Define where the subformula will temporarily install itself
subprefix = buildpath+'subfo'
@@ -83,7 +82,7 @@ class Ghc < Formula
system "./configure", *args
system 'make'
if build.include? 'tests'
- Ghctestsuite.new.brew do
+ resource('testsuite').stage do
(buildpath+'Ghcsource/config').install Dir['config/*']
(buildpath+'Ghcsource/driver').install Dir['driver/*']
(buildpath+'Ghcsource/mk').install Dir['mk/*']