2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-19 09:35:43 +00:00
|
|
|
|
2009-12-03 07:07:11 +00:00
|
|
|
# References:
|
|
|
|
# * http://smalltalk.gnu.org/wiki/building-gst-guides
|
2010-05-03 17:40:24 +00:00
|
|
|
#
|
|
|
|
# Note that we build 32-bit, which means that 64-bit
|
|
|
|
# optional dependencies will break the build. You may need
|
|
|
|
# to "brew unlink" these before installing GNU Smalltalk and
|
|
|
|
# "brew link" them afterwards:
|
|
|
|
# * gdbm
|
2009-12-03 07:07:11 +00:00
|
|
|
|
2009-09-19 09:35:43 +00:00
|
|
|
class GnuSmalltalk <Formula
|
2010-05-03 09:29:53 +00:00
|
|
|
url 'ftp://ftp.gnu.org/gnu/smalltalk/smalltalk-3.2.tar.gz'
|
2009-12-03 07:07:11 +00:00
|
|
|
homepage 'http://smalltalk.gnu.org/'
|
2010-05-03 09:29:53 +00:00
|
|
|
sha1 'd951714c4fc7d91d06bdc33c20905885e5d2b25f'
|
2009-09-19 09:35:43 +00:00
|
|
|
|
2010-05-03 17:40:24 +00:00
|
|
|
# depends_on 'gmp' => :optional # 32/64 built build problems
|
2009-09-19 09:35:43 +00:00
|
|
|
|
|
|
|
def install
|
2010-06-16 18:50:36 +00:00
|
|
|
fails_with_llvm "Codegen problems with LLVM"
|
2010-05-03 17:40:24 +00:00
|
|
|
|
2009-12-03 07:07:11 +00:00
|
|
|
# 64-bit version doesn't build, so force 32 bits.
|
|
|
|
ENV.m32
|
2010-05-03 17:40:24 +00:00
|
|
|
|
2010-05-04 16:34:59 +00:00
|
|
|
# GNU Smalltalk thinks it needs GNU awk, but it works fine
|
|
|
|
# with OS X awk, so let's trick configure.
|
|
|
|
here = Dir.pwd
|
|
|
|
system "ln -s /usr/bin/awk #{here}/gawk"
|
|
|
|
ENV['AWK'] = "#{here}/gawk"
|
|
|
|
|
2009-09-19 09:35:43 +00:00
|
|
|
ENV['FFI_CFLAGS'] = '-I/usr/include/ffi'
|
2009-12-03 07:07:11 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--with-readline=/usr/lib"
|
|
|
|
system "make"
|
|
|
|
ENV.j1 # Parallel install doesn't work
|
2009-09-19 09:35:43 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|