diff options
| author | Adam Vandenberg | 2014-03-08 07:22:27 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2014-03-08 14:34:41 -0800 |
| commit | 4c06432e7bb130c53f6f23d6cec151c71f6e3b2d (patch) | |
| tree | 271d4d7b7c909da2057ce635ea7140c3087fbeeb /Library | |
| parent | 7153db0a9e0f1f7057548cc7defd3f8a2ac753af (diff) | |
| download | homebrew-4c06432e7bb130c53f6f23d6cec151c71f6e3b2d.tar.bz2 | |
ghc: style cleanup
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/ghc.rb | 98 |
1 files changed, 51 insertions, 47 deletions
diff --git a/Library/Formula/ghc.rb b/Library/Formula/ghc.rb index 45befc25a..e2a03f07f 100644 --- a/Library/Formula/ghc.rb +++ b/Library/Formula/ghc.rb @@ -1,36 +1,36 @@ require 'formula' 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' + 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 revision 2 - sha1 'a6ceeb3f1f9ba2cf0454dc9d45dce69f8a5ae736' => :mavericks - sha1 'd91ee56c8066bae5173f705e83e15dbb8842f67f' => :mountain_lion - sha1 '1569f19cdad2675cbff328c0e259d6b8573e9d11' => :lion + sha1 "a6ceeb3f1f9ba2cf0454dc9d45dce69f8a5ae736" => :mavericks + sha1 "d91ee56c8066bae5173f705e83e15dbb8842f67f" => :mountain_lion + sha1 "1569f19cdad2675cbff328c0e259d6b8573e9d11" => :lion end - option 'tests', 'Verify the build using the testsuite.' + option "tests", "Verify the build using the testsuite." devel do # 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' + url "http://www.haskell.org/ghc/dist/7.8.1-rc1/ghc-7.8.20140130-src.tar.bz2" + sha1 "b9c4d76ff71225fe58bdc4e53d7c659643463b5a" # Upstream documentation says lion, but brew test-bot 10.7 fails. depends_on :macos => :mountain_lion - resource 'binary' do - url 'http://www.haskell.org/ghc/dist/7.8.1-rc1/ghc-7.8.20140130-x86_64-apple-darwin-lion.tar.bz2' - sha1 '9026d889b160fbf56f97ec1e91576a20e5eec725' + resource "binary" do + 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 - resource 'testsuite' do - url 'http://www.haskell.org/ghc/dist/7.8.1-rc1/ghc-7.8.20140130-testsuite.tar.bz2' - sha1 '17b1d486c1111633bcfa940b9bf940194cf09bc9' + resource "testsuite" do + url "http://www.haskell.org/ghc/dist/7.8.1-rc1/ghc-7.8.20140130-testsuite.tar.bz2" + sha1 "17b1d486c1111633bcfa940b9bf940194cf09bc9" end end @@ -39,26 +39,26 @@ class Ghc < Formula # http://hackage.haskell.org/trac/ghc/ticket/6009 depends_on :macos => :snow_leopard - depends_on 'apple-gcc42' if MacOS.version >= :mountain_lion - depends_on 'gmp' + depends_on "apple-gcc42" if MacOS.version >= :mountain_lion + depends_on "gmp" - option '32-bit' + option "32-bit" # build is not available in the resource's context, so exploit the closure. build_32_bit = build.build_32_bit? - resource 'binary' do + 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' + 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' + 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' + resource "testsuite" do + url "https://github.com/ghc/testsuite/archive/ghc-7.6.3-release.tar.gz" + sha1 "6a1973ae3cccdb2f720606032ae84ffee8680ca1" end fails_with :clang do @@ -78,31 +78,32 @@ class Ghc < Formula def install # Move the main tarball contents into a subdirectory - (buildpath+'Ghcsource').install Dir['*'] + (buildpath+"Ghcsource").install Dir["*"] - resource('binary').stage do + resource("binary").stage do # Define where the subformula will temporarily install itself - subprefix = buildpath+'subfo' + subprefix = buildpath+"subfo" # ensure configure does not use Xcode 5 "gcc" which is actually clang args = ["--prefix=#{subprefix}"] args << "--with-gcc=#{ENV.cc}" system "./configure", *args - system 'make -j1 install' # -j1 fixes an intermittent race condition - ENV.prepend 'PATH', subprefix/'bin', ':' + # -j1 fixes an intermittent race condition + system "make", "-j1", "install" + ENV.prepend_path "PATH", subprefix/"bin" end - cd 'Ghcsource' do + cd "Ghcsource" do # Fix an assertion when linking ghc with llvm-gcc # https://github.com/Homebrew/homebrew/issues/13650 - ENV['LD'] = 'ld' + ENV["LD"] = "ld" if Hardware.is_64_bit? and not build.build_32_bit? - arch = 'x86_64' + arch = "x86_64" else ENV.m32 # Need to force this to fix build error on internal libgmp_ar. - arch = 'i386' + arch = "i386" end # ensure configure does not use Xcode 5 "gcc" which is actually clang @@ -110,21 +111,24 @@ class Ghc < Formula args << "--with-gcc=#{ENV.cc}" system "./configure", *args - system 'make' - if build.include? 'tests' - resource('testsuite').stage do - (buildpath+'Ghcsource/config').install Dir['config/*'] - (buildpath+'Ghcsource/driver').install Dir['driver/*'] - (buildpath+'Ghcsource/mk').install Dir['mk/*'] - (buildpath+'Ghcsource/tests').install Dir['tests/*'] - (buildpath+'Ghcsource/timeout').install Dir['timeout/*'] - cd (buildpath+'Ghcsource/tests') do - system 'make', 'CLEANUP=1', "THREADS=#{ENV.make_jobs}", 'fast' + system "make" + + if build.include? "tests" + resource("testsuite").stage do + (buildpath+"Ghcsource/config").install Dir["config/*"] + (buildpath+"Ghcsource/driver").install Dir["driver/*"] + (buildpath+"Ghcsource/mk").install Dir["mk/*"] + (buildpath+"Ghcsource/tests").install Dir["tests/*"] + (buildpath+"Ghcsource/timeout").install Dir["timeout/*"] + cd (buildpath+"Ghcsource/tests") do + system "make", "CLEANUP=1", "THREADS=#{ENV.make_jobs}", "fast" end end end - system 'make' - system 'make -j1 install' # -j1 fixes an intermittent race condition + + system "make" + # -j1 fixes an intermittent race condition + system "make", "-j1", "install" end end |
