2009-10-26 14:44:50 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class GambitScheme <Formula
|
2010-02-16 19:43:58 +00:00
|
|
|
url 'http://www.iro.umontreal.ca/~gambit/download/gambit/v4.6/source/gambc-v4_6_0.tgz'
|
2009-10-26 14:44:50 +00:00
|
|
|
homepage 'http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Main_Page'
|
2010-02-16 19:43:58 +00:00
|
|
|
md5 '4f0e8b3e90a96f2203cbaf1e1cc1388a'
|
2009-10-26 14:44:50 +00:00
|
|
|
|
2009-10-26 15:52:46 +00:00
|
|
|
def options
|
|
|
|
[
|
|
|
|
['--with-check', 'Execute "make check" before installing. Runs some basic scheme programs to ensure that gsi and gsc are working'],
|
|
|
|
['--enable-shared', 'Build Gambit Scheme runtime as shared library']
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2009-10-26 14:44:50 +00:00
|
|
|
def install
|
2010-06-16 18:50:36 +00:00
|
|
|
fails_with_llvm "ld crashes during the build process"
|
2009-10-26 16:10:57 +00:00
|
|
|
# Gambit Scheme doesn't like full optimizations
|
|
|
|
ENV.O2
|
2009-10-26 14:44:50 +00:00
|
|
|
|
2009-10-26 15:52:46 +00:00
|
|
|
configure_args = [
|
|
|
|
"--prefix=#{prefix}",
|
2010-02-16 19:43:58 +00:00
|
|
|
"--infodir=#{info}",
|
2009-10-26 15:52:46 +00:00
|
|
|
"--disable-debug",
|
|
|
|
# Recommended to improve the execution speed and compactness
|
|
|
|
# of the generated executables. Increases compilation times.
|
|
|
|
"--enable-single-host"
|
|
|
|
]
|
|
|
|
|
|
|
|
configure_args << "--enable-shared" if ARGV.include? '--enable-shared'
|
|
|
|
|
|
|
|
system "./configure", *configure_args
|
2009-10-26 14:44:50 +00:00
|
|
|
|
2009-10-26 15:52:46 +00:00
|
|
|
system "make check" if ARGV.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
|