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
|
|
|
|
depends_on 'readline' => :build
|
|
|
|
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 patches
|
|
|
|
# Builds GNU Smalltalk clean in 64-bit mode with SDL and Cairo support
|
2012-10-15 16:04:42 +00:00
|
|
|
# by using autoconf version 2.61 and automake version 1.10. The testsuite
|
|
|
|
# requires 2.63, however. So exclude the patch for that case. See also:
|
2011-10-10 02:56:01 +00:00
|
|
|
# http://www.eighty-twenty.org/index.cgi/tech/smalltalk/building-gnu-smalltalk-20110926.html
|
2012-10-15 16:04:42 +00:00
|
|
|
DATA unless build.include? 'tests'
|
2011-10-10 02:56:01 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
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
|
|
|
|
--with-readline=#{Formula.factory('readline').lib}
|
|
|
|
]
|
|
|
|
unless build.include? 'tcltk'
|
|
|
|
args << '--without-tcl' << '--without-tk' << '--without-x'
|
2011-10-10 02:56:01 +00:00
|
|
|
end
|
|
|
|
|
2012-10-15 16:04:42 +00:00
|
|
|
# disable generational gc in 32-bit
|
|
|
|
args << "--disable-generational-gc" unless MacOS.prefer_64_bit?
|
2011-10-10 02:56:01 +00:00
|
|
|
|
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
|
2011-10-10 02:56:01 +00:00
|
|
|
|
|
|
|
__END__
|
2012-10-15 16:04:42 +00:00
|
|
|
--- a/Makefile.am 2011-03-21 04:32:44.000000000 -0700
|
|
|
|
+++ b/Makefile.am 2012-10-14 14:52:13.000000000 -0700
|
2011-10-10 02:56:01 +00:00
|
|
|
@@ -16,7 +16,7 @@
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
|
|
|
# Automake requirements
|
|
|
|
-AUTOMAKE_OPTIONS = gnu 1.11 dist-xz
|
|
|
|
+AUTOMAKE_OPTIONS = gnu 1.10
|
|
|
|
ACLOCAL_AMFLAGS = -I build-aux
|
2012-10-15 16:04:42 +00:00
|
|
|
DISTCHECK_CONFIGURE_FLAGS=--without-system-libltdl --without-system-libsigsegv --without-system-libffi
|
2011-10-10 02:56:01 +00:00
|
|
|
|
2012-10-15 16:04:42 +00:00
|
|
|
--- a/configure.ac 2011-03-21 04:32:44.000000000 -0700
|
|
|
|
+++ b/configure.ac 2012-10-14 14:53:34.000000000 -0700
|
|
|
|
@@ -6,7 +6,7 @@
|
2011-10-10 02:56:01 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
|
|
|
dnl 2.63 needed by testsuite, actually
|
|
|
|
-AC_PREREQ(2.63)
|
|
|
|
+AC_PREREQ(2.61)
|
2012-10-15 16:04:42 +00:00
|
|
|
AC_INIT([GNU Smalltalk], 3.2.4, help-smalltalk@gnu.org, smalltalk,
|
2011-10-10 02:56:01 +00:00
|
|
|
[http://smalltalk.gnu.org/])
|
|
|
|
MAINTAINER="bonzini@gnu.org"
|