diff options
| author | Mike McQuaid | 2013-09-26 19:47:06 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2013-09-27 08:17:47 +0100 |
| commit | c0e47365c352fb1c48c1522ab5f37eaf18c9d75e (patch) | |
| tree | 29024d34fb5e65303edf245e39c47fcc67b41fe2 /Library/Formula | |
| parent | c9aa68ee11b7629d32523c5cc8fa47a66dbbbd54 (diff) | |
| download | homebrew-c0e47365c352fb1c48c1522ab5f37eaf18c9d75e.tar.bz2 | |
apple-gcc42: 4.2.1-5666.3 (new formula).
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/apple-gcc42.rb | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Library/Formula/apple-gcc42.rb b/Library/Formula/apple-gcc42.rb new file mode 100644 index 000000000..9a8019c20 --- /dev/null +++ b/Library/Formula/apple-gcc42.rb @@ -0,0 +1,51 @@ +require 'formula' + +class PkgDownloadStrategy < CurlDownloadStrategy + def stage + # The compilers are distributed as a OS X 10.5 package- a single flat xar + # archive instead of a bundle. + safe_system '/usr/bin/xar', '-xf', @tarball_path + chdir + + # Clean up. + safe_system "mv *.pkg/Payload Payload.gz" + safe_system "ls | grep -v Payload | xargs rm -r" + end +end + +class AppleGcc42 < Formula + homepage 'http://r.research.att.com/tools/' + url 'http://r.research.att.com/tools/gcc-42-5666.3-darwin11.pkg', + :using => PkgDownloadStrategy + version '4.2.1-5666.3' + sha1 '8fadde2a159082d6474fe9e325b6301e3c0bc84f' + + option 'with-gfortran-symlink', 'Provide gfortran symlinks' + + depends_on :macos => :lion + + def install + safe_system "pax --insecure -rz -f Payload.gz -s ',./usr,#{prefix},'" + + if build.include? 'with-gfortran-symlink' + safe_system "ln -sf #{bin}/gfortran-4.2 #{bin}/gfortran" + safe_system "ln -sf #{man1}/gfortran-4.2.1 #{man1}/gfortran.1" + end + end + + def caveats + <<-EOS.undent + NOTE: + This formula provides components that were removed from XCode in the 4.2 + release. There is no reason to install this formula if you are using a + version of XCode prior to 4.2. + + This formula contains compilers built from Apple's GCC sources, build + 5666.3, available from: + + http://opensource.apple.com/tarballs/gcc + + All compilers have a `-4.2` suffix. A GFortran compiler is also included. + EOS + end +end |
