2009-10-26 14:44:50 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class GambitScheme < Formula
|
2009-10-26 14:44:50 +00:00
|
|
|
homepage 'http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Main_Page'
|
2012-06-12 07:14:02 +00:00
|
|
|
url 'http://www.iro.umontreal.ca/~gambit/download/gambit/v4.6/source/gambc-v4_6_6.tgz'
|
|
|
|
sha256 '4e8b18bb350124138d1f9bf143dda0ab5e55f3c3d489a6dc233a15a003f161d2'
|
2009-10-26 14:44:50 +00:00
|
|
|
|
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
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :llvm do
|
|
|
|
build 2335
|
|
|
|
cause "ld crashes during the build process or segfault at runtime"
|
|
|
|
end
|
2011-03-26 05:55:43 +00:00
|
|
|
|
2009-10-26 14:44:50 +00:00
|
|
|
def install
|
2012-03-11 04:39:45 +00:00
|
|
|
args = ["--disable-debug",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--infodir=#{info}",
|
|
|
|
# Recommended to improve the execution speed and compactness
|
|
|
|
# of the generated executables. Increases compilation times.
|
|
|
|
"--enable-single-host"]
|
2012-08-30 16:09:48 +00:00
|
|
|
args << "--enable-shared" if build.include? 'enable-shared'
|
2012-03-11 04:39:45 +00:00
|
|
|
|
2012-04-06 00:16:46 +00:00
|
|
|
unless ENV.compiler == :gcc
|
|
|
|
opoo <<-EOS.undent
|
|
|
|
Compiling Gambit Scheme with Clang or LLVM-GCC takes a very long time.
|
|
|
|
If you have GCC, you can compile it much faster with:
|
|
|
|
brew install gambit-scheme --use-gcc
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
2012-03-11 04:39:45 +00:00
|
|
|
system "./configure", *args
|
2012-08-30 16:09:48 +00:00
|
|
|
system "make check" if build.include? '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
|
|
|
|
end
|