2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-19 09:35:43 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class GnuSmalltalk < Formula
|
2011-10-10 02:56:01 +00:00
|
|
|
homepage 'http://smalltalk.gnu.org/'
|
2012-10-15 16:04:42 +00:00
|
|
|
url 'http://ftpmirror.gnu.org/smalltalk/smalltalk-3.2.4.tar.xz'
|
|
|
|
mirror 'http://ftp.gnu.org/gnu/smalltalk/smalltalk-3.2.4.tar.xz'
|
|
|
|
sha1 '75b7077a02abb2ec01c5975e22d6138b541db38e'
|
2009-09-19 09:35:43 +00:00
|
|
|
|
2011-10-10 02:56:01 +00:00
|
|
|
head 'https://github.com/bonzini/smalltalk.git'
|
2009-09-19 09:35:43 +00:00
|
|
|
|
2012-10-15 16:04:42 +00:00
|
|
|
option 'tests', 'Verify the build with make check (this may hang)'
|
|
|
|
option 'tcltk', 'Build the Tcl/Tk module that requires X11'
|
|
|
|
|
|
|
|
# Need newer versions on Snow Leopard
|
|
|
|
depends_on 'automake' => :build
|
|
|
|
depends_on 'libtool' => :build
|
2012-07-07 18:08:22 +00:00
|
|
|
|
2011-10-10 02:56:01 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2012-10-15 16:04:42 +00:00
|
|
|
depends_on 'xz' => :build
|
|
|
|
depends_on 'gawk' => :build
|
2012-11-11 03:12:26 +00:00
|
|
|
depends_on 'readline' => :build
|
2012-10-15 16:04:42 +00:00
|
|
|
depends_on 'libffi' => :recommended
|
|
|
|
depends_on 'libsigsegv' => :recommended
|
|
|
|
depends_on 'glew' => :optional
|
|
|
|
depends_on :x11 if build.include? 'tcltk'
|
2010-12-05 02:25:19 +00:00
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :llvm do
|
|
|
|
build 2334
|
|
|
|
cause "Codegen problems with LLVM"
|
|
|
|
end
|
2010-05-03 17:40:24 +00:00
|
|
|
|
2011-10-10 02:56:01 +00:00
|
|
|
def install
|
2012-10-15 16:04:42 +00:00
|
|
|
ENV.m32 unless MacOS.prefer_64_bit?
|
|
|
|
|
|
|
|
args = %W[
|
|
|
|
--disable-debug
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--disable-gtk
|
2012-11-11 03:12:26 +00:00
|
|
|
--with-readline=#{Formula.factory('readline').lib}
|
2012-10-15 16:04:42 +00:00
|
|
|
]
|
|
|
|
unless build.include? 'tcltk'
|
|
|
|
args << '--without-tcl' << '--without-tk' << '--without-x'
|
2011-10-10 02:56:01 +00:00
|
|
|
end
|
|
|
|
|
2013-02-04 17:34:12 +00:00
|
|
|
# disable generational gc in 32-bit and if libsigsegv is absent
|
|
|
|
if !MacOS.prefer_64_bit? or build.without? "libsigsegv"
|
|
|
|
args << "--disable-generational-gc"
|
|
|
|
end
|
2011-10-10 02:56:01 +00:00
|
|
|
|
2013-01-15 03:08:30 +00:00
|
|
|
# Compatibility with Automake 1.13+, fixed upstream
|
|
|
|
inreplace %w{configure.ac sigsegv/configure.ac},
|
|
|
|
'AM_CONFIG_HEADER', 'AC_CONFIG_HEADERS'
|
|
|
|
inreplace 'snprintfv/configure.ac', 'AM_PROG_CC_STD', ''
|
|
|
|
|
2012-10-15 16:04:42 +00:00
|
|
|
system 'autoreconf', '-ivf'
|
2011-10-10 02:56:01 +00:00
|
|
|
system "./configure", *args
|
2009-12-03 07:07:11 +00:00
|
|
|
system "make"
|
2012-10-15 16:04:42 +00:00
|
|
|
system 'make', '-j1', 'check' if build.include? 'tests'
|
2009-09-19 09:35:43 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|