diff options
| author | Miëtek Bak | 2010-02-24 11:16:15 +0000 |
|---|---|---|
| committer | Miëtek Bak | 2010-03-10 12:17:52 +0000 |
| commit | 824fdfa16a4e30aeffa1db737dd9111ef9454421 (patch) | |
| tree | 32bbe818bdf2d955cc85b78b33005b9f83b2f64b /Library/Formula | |
| parent | c6923dced690a6c1526dac3de8c7afaa183ce4ff (diff) | |
| download | homebrew-824fdfa16a4e30aeffa1db737dd9111ef9454421.tar.bz2 | |
Fix GHC formula
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/ghc.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Library/Formula/ghc.rb b/Library/Formula/ghc.rb index a6f9aadff..ca62f58b0 100644 --- a/Library/Formula/ghc.rb +++ b/Library/Formula/ghc.rb @@ -11,10 +11,11 @@ end class Ghc <Formula homepage 'http://haskell.org/ghc/' version '6.12.1' - url "http://haskell.org/ghc/dist/6.12.1/GHC-#{version}-i386.pkg" + url "http://haskell.org/ghc/dist/#{version}/GHC-#{version}-i386.pkg" md5 '7f50698a6f34b978027a43fd836443e7' - skip_clean :bin #http://hackage.haskell.org/trac/ghc/ticket/2458 + # Avoid stripping the Haskell binaries AND libraries; http://hackage.haskell.org/trac/ghc/ticket/2458 + skip_clean ['bin', 'lib'] def download_strategy # Extract files from .pkg while caching the .pkg @@ -28,14 +29,16 @@ class Ghc <Formula end def install + short_version = version.split('.').first(2).join('') + # Extract files from .pax.gz system '/bin/pax -f ghc.pkg/Payload -p p -rz' - cd 'GHC.framework/Versions/612/usr' + cd "GHC.framework/Versions/#{short_version}/usr" # Fix paths - replace_all '/Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.1', "#{lib}/ghc" - replace_all '/Library/Frameworks/GHC.framework/Versions/612/usr', prefix - mv 'lib/ghc-6.12.1', 'lib/ghc' + replace_all "/Library/Frameworks/GHC.framework/Versions/#{short_version}/usr/lib/ghc-#{version}", "#{lib}/ghc" + replace_all "/Library/Frameworks/GHC.framework/Versions/#{short_version}/usr", prefix + mv "lib/ghc-#{version}", 'lib/ghc' prefix.install ['bin', 'lib', 'share'] |
