2009-10-26 14:44:50 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class GambitScheme < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Complete, portable implementation of Scheme"
|
2009-10-26 14:44:50 +00:00
|
|
|
homepage 'http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Main_Page'
|
2014-10-04 15:09:08 +00:00
|
|
|
url 'http://www.iro.umontreal.ca/~gambit/download/gambit/v4.7/source/gambc-v4_7_3.tgz'
|
|
|
|
sha256 '59c4c62f2cfaf698b54a862e7af9c1b3e4cc27e46d386f31c66e00fed4701777'
|
2009-10-26 14:44:50 +00:00
|
|
|
|
2014-04-13 10:11:53 +00:00
|
|
|
bottle do
|
2014-10-04 15:25:42 +00:00
|
|
|
sha1 "4f04f85300495e2c3fad49206b57605d010ad1f7" => :mavericks
|
|
|
|
sha1 "57c650e3539e41e084f29adf26160e920e3a068e" => :mountain_lion
|
|
|
|
sha1 "f4002601e8f904d064909b5df30479a26c916f8d" => :lion
|
2014-04-13 10:11:53 +00:00
|
|
|
end
|
|
|
|
|
2013-11-12 15:41:44 +00:00
|
|
|
conflicts_with 'ghostscript', :because => 'both install `gsc` binaries'
|
2013-11-12 15:39:07 +00:00
|
|
|
conflicts_with 'scheme48', :because => 'both install `scheme-r5rs` binaries'
|
|
|
|
|
2012-08-30 16:09:48 +00:00
|
|
|
option 'with-check', 'Execute "make check" before installing'
|
|
|
|
option 'enable-shared', 'Build Gambit Scheme runtime as shared library'
|
2011-03-26 05:55:43 +00:00
|
|
|
|
2013-11-09 05:59:25 +00:00
|
|
|
fails_with :llvm
|
2011-03-26 05:55:43 +00:00
|
|
|
|
2009-10-26 14:44:50 +00:00
|
|
|
def install
|
2013-11-09 05:59:36 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-debug
|
|
|
|
--prefix=#{prefix}
|
2013-11-09 06:18:02 +00:00
|
|
|
--libdir=#{lib}/gambit-c
|
2013-11-09 05:59:36 +00:00
|
|
|
--infodir=#{info}
|
2013-11-09 06:18:02 +00:00
|
|
|
--docdir=#{doc}
|
2013-11-09 05:59:36 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
# Recommended to improve the execution speed and compactness
|
|
|
|
# of the generated executables. Increases compilation times.
|
|
|
|
# Don't enable this when using clang, per configure warning.
|
|
|
|
args << "--enable-single-host" unless ENV.compiler == :clang
|
|
|
|
|
2012-08-30 16:09:48 +00:00
|
|
|
args << "--enable-shared" if build.include? 'enable-shared'
|
2012-03-11 04:39:45 +00:00
|
|
|
|
2013-11-09 06:20:45 +00:00
|
|
|
if ENV.compiler == :clang
|
2012-04-06 00:16:46 +00:00
|
|
|
opoo <<-EOS.undent
|
2013-11-09 06:20:45 +00:00
|
|
|
Gambit will build with Clang, however the build may take longer and
|
|
|
|
produce substandard binaries. If you have GCC, you can get a faster
|
|
|
|
build and faster execution with:
|
|
|
|
brew install gambit-scheme --cc=gcc-4.2 # or 4.7, 4.8, etc.
|
2013-01-16 15:08:29 +00:00
|
|
|
EOS
|
2012-04-06 00:16:46 +00:00
|
|
|
end
|
|
|
|
|
2012-03-11 04:39:45 +00:00
|
|
|
system "./configure", *args
|
2014-03-06 20:40:26 +00:00
|
|
|
system "make check" if build.with? "check"
|
2009-11-05 22:22:59 +00:00
|
|
|
|
|
|
|
ENV.j1
|
|
|
|
system "make"
|
2009-10-26 14:44:50 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2014-10-04 15:09:08 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/gsi", "-e", '(print "hello world")'
|
|
|
|
end
|
2009-10-26 14:44:50 +00:00
|
|
|
end
|