diff options
| author | Josh Tilles | 2013-11-30 15:51:27 -0500 |
|---|---|---|
| committer | Adam Vandenberg | 2013-12-18 20:08:16 -0800 |
| commit | b3f2793bd87de017776489f0c01cef9f1486ed21 (patch) | |
| tree | 4498921615d277588e27049c9b538182d39fc6b2 /Library/Formula | |
| parent | d7fa10c7add4149fe16cbf153bb5e15c6f5a078f (diff) | |
| download | homebrew-b3f2793bd87de017776489f0c01cef9f1486ed21.tar.bz2 | |
plt-racket 5.3.6
Closes #22420.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/plt-racket.rb | 56 |
1 files changed, 47 insertions, 9 deletions
diff --git a/Library/Formula/plt-racket.rb b/Library/Formula/plt-racket.rb index 39e4ccdb1..2a60fc6d3 100644 --- a/Library/Formula/plt-racket.rb +++ b/Library/Formula/plt-racket.rb @@ -2,26 +2,64 @@ require 'formula' class PltRacket < Formula homepage 'http://racket-lang.org/' - # Use GitHub tarball as the release tarball doesn't have - # everything needed for building on OS X - url 'https://github.com/plt/racket/archive/v5.2.tar.gz' - sha1 '313425909ff8d956c3e99d0a2b5b3cb12d0f98ad' + url 'https://github.com/plt/racket/archive/v5.3.6.tar.gz' + sha1 '6b0e7a11bb3ae6480b99db346e5b503a97539e6b' + + depends_on :macos => :mountain_lion # https://github.com/Homebrew/homebrew/pull/22420 + + depends_on 'glib' + depends_on 'cairo' + depends_on 'pango' + depends_on 'jpeg' + depends_on 'gtk+' + depends_on 'gmp' + depends_on 'mpfr' + + option 'without-docs', 'Don’t build documentation. (saves around 150 MB)' def install cd 'src' do args = ["--disable-debug", "--disable-dependency-tracking", "--enable-xonx", - "--enable-shared", "--prefix=#{prefix}" ] - if MacOS.prefer_64_bit? - args += ["--enable-mac64", "--enable-sgc", "--disable-gracket"] - end + args << '--disable-mac64' if not MacOS.prefer_64_bit? + + args << '--disable-docs' if build.include? 'without-docs' + + # There's a mysterious error that afflicts non-Mavericks users. The + # problem seems to disappear if we deparallelize the `raco` process. + ENV['PLT_SETUP_OPTIONS'] = '--workers 1' system "./configure", *args system "make" - ohai "Installing may take a long time (~40 minutes)" unless ARGV.verbose? system "make install" end end + + test do + # Make sure the GUI-related dynamic libraries are available. + system bin/'racket', '--eval', '(require ffi/unsafe) (or (ffi-lib "libcairo") (exit 1))' + system bin/'racket', '--eval', '(require ffi/unsafe) (or (ffi-lib "libffi") (exit 1))' + system bin/'racket', '--eval', '(require ffi/unsafe) (or (ffi-lib "libgio-2.0") (exit 1))' + system bin/'racket', '--eval', '(require ffi/unsafe) (or (ffi-lib "libjpeg") (exit 1))' + system bin/'racket', '--eval', '(require ffi/unsafe) (or (ffi-lib "libglib-2.0") (exit 1))' + system bin/'racket', '--eval', '(require ffi/unsafe) (or (ffi-lib "libpango-1.0") (exit 1))' + system bin/'racket', '--eval', '(require ffi/unsafe) (or (ffi-lib "libgmodule-2.0") (exit 1))' + system bin/'racket', '--eval', '(require ffi/unsafe) (or (ffi-lib "libpangocairo-1.0") (exit 1))' + system bin/'racket', '--eval', '(require ffi/unsafe) (or (ffi-lib "libgobject-2.0") (exit 1))' + system bin/'racket', '--eval', '(require ffi/unsafe) (or (ffi-lib "libpixman-1") (exit 1))' + system bin/'racket', '--eval', '(require ffi/unsafe) (or (ffi-lib "libgthread-2.0") (exit 1))' + system bin/'racket', '--eval', '(require ffi/unsafe) (or (ffi-lib "libpng15") (exit 1))' + + # Make sure the math-related dynamic libraries are available. + system bin/'racket', '--eval', '(require ffi/unsafe) (or (ffi-lib "libgmp") (exit 1))' + system bin/'racket', '--eval', '(require ffi/unsafe) (or (ffi-lib "libmpfr") (exit 1))' + end + + def caveats; <<-EOS.undent + If you want to use the DrRacket IDE, we recommend that you use + the PLT-provided packages from http://racket-lang.org/download/. + EOS + end end |
