ghc 7.8.20140130 (devel)

Closes Homebrew/homebrew#26459.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
master
Geoff Nixon 2014-02-09 13:59:54 +00:00 committed by Mike McQuaid
parent cf38fe38ab
commit ea23729b22
1 changed files with 50 additions and 28 deletions

View File

@ -12,43 +12,65 @@ class Ghc < Formula
sha1 '1569f19cdad2675cbff328c0e259d6b8573e9d11' => :lion sha1 '1569f19cdad2675cbff328c0e259d6b8573e9d11' => :lion
end end
env :std option 'tests', 'Verify the build using the testsuite.'
# http://hackage.haskell.org/trac/ghc/ticket/6009 devel do
depends_on :macos => :snow_leopard # http://www.haskell.org/ghc/dist/7.8.1-rc1/README.osx.html
# This block should largely translate over for 7.8.1 when GM.
url 'http://www.haskell.org/ghc/dist/7.8.1-rc1/ghc-7.8.20140130-src.tar.bz2'
sha1 'b9c4d76ff71225fe58bdc4e53d7c659643463b5a'
depends_on 'apple-gcc42' if MacOS.version >= :mountain_lion # Upstream documentation says lion, but brew test-bot 10.7 fails.
depends_on :macos => :mountain_lion
option '32-bit' resource 'binary' do
option 'tests', 'Verify the build using the testsuite in Fast Mode, 5 min' url 'http://www.haskell.org/ghc/dist/7.8.1-rc1/ghc-7.8.20140130-x86_64-apple-darwin-lion.tar.bz2'
sha1 '9026d889b160fbf56f97ec1e91576a20e5eec725'
end
# build is not available in the resource's context, so exploit the closure. resource 'testsuite' do
build_32_bit = build.build_32_bit? url 'http://www.haskell.org/ghc/dist/7.8.1-rc1/ghc-7.8.20140130-testsuite.tar.bz2'
resource 'binary' do sha1 '17b1d486c1111633bcfa940b9bf940194cf09bc9'
if Hardware.is_64_bit? and not 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
end end
resource 'testsuite' do unless build.devel?
url 'https://github.com/ghc/testsuite/archive/ghc-7.6.3-release.tar.gz' env :std
sha1 '6a1973ae3cccdb2f720606032ae84ffee8680ca1'
end
fails_with :clang do # http://hackage.haskell.org/trac/ghc/ticket/6009
cause <<-EOS.undent depends_on :macos => :snow_leopard
Building with Clang configures GHC to use Clang as its preprocessor, depends_on 'apple-gcc42' if MacOS.version >= :mountain_lion
which causes subsequent GHC-based builds to fail.
EOS
end
def patches option '32-bit'
# Fixes 7.6.3 compilation on 10.9
DATA if MacOS.version >= :mavericks # build is not available in the resource's context, so exploit the closure.
build_32_bit = build.build_32_bit?
resource 'binary' do
if Hardware.is_64_bit? and not 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
cause <<-EOS.undent
Building with Clang configures GHC to use Clang as its preprocessor,
which causes subsequent GHC-based builds to fail.
EOS
end
def patches
# Fixes 7.6.3 compilation on 10.9
DATA if MacOS.version >= :mavericks
end
end end
def install def install