2011-03-10 05:11:03 +00:00
|
|
|
class Clisp < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "GNU CLISP, a Common Lisp implementation"
|
2015-07-16 03:55:09 +00:00
|
|
|
homepage "http://www.clisp.org/"
|
|
|
|
url "http://ftpmirror.gnu.org/clisp/release/2.49/clisp-2.49.tar.bz2"
|
|
|
|
mirror "https://ftp.gnu.org/gnu/clisp/release/2.49/clisp-2.49.tar.bz2"
|
|
|
|
sha256 "8132ff353afaa70e6b19367a25ae3d5a43627279c25647c220641fed00f8e890"
|
2010-10-05 03:39:21 +00:00
|
|
|
|
2015-07-16 04:50:59 +00:00
|
|
|
bottle do
|
|
|
|
sha256 "cbd72b99874b8a53da52938f41122e741cccb1e300c2bbf3175f6cefbe48a100" => :yosemite
|
|
|
|
sha256 "00d23db5b9accb0072a1b14d6adf1ddfd11112c5c36faa7e68c03f2727aa3be9" => :mavericks
|
|
|
|
sha256 "4acc75971d4dd0a316586b38cfa53162887104a9e9a33a0ca26134a3696307e0" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2015-07-16 03:55:09 +00:00
|
|
|
depends_on "libsigsegv"
|
|
|
|
depends_on "readline"
|
2010-10-05 03:39:21 +00:00
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :llvm do
|
|
|
|
build 2334
|
|
|
|
cause "Configure fails on XCode 4/Snow Leopard."
|
|
|
|
end
|
2012-01-18 23:44:52 +00:00
|
|
|
|
2014-03-17 00:35:06 +00:00
|
|
|
patch :DATA
|
2015-07-16 03:55:09 +00:00
|
|
|
|
2014-03-17 00:35:06 +00:00
|
|
|
patch :p0 do
|
|
|
|
url "https://trac.macports.org/export/89054/trunk/dports/lang/clisp/files/patch-src_lispbibl_d.diff"
|
2015-07-16 03:55:09 +00:00
|
|
|
sha256 "fd4e8a0327e04c224fb14ad6094741034d14cb45da5b56a2f3e7c930f84fd9a0"
|
2012-01-18 23:44:52 +00:00
|
|
|
end
|
2010-10-05 03:39:21 +00:00
|
|
|
|
2011-03-21 21:24:22 +00:00
|
|
|
def install
|
2015-07-16 03:55:09 +00:00
|
|
|
ENV.deparallelize # This build isn't parallel safe.
|
2013-11-12 18:00:18 +00:00
|
|
|
ENV.O0 # Any optimization breaks the build
|
2011-03-19 21:06:10 +00:00
|
|
|
|
2010-10-05 03:39:21 +00:00
|
|
|
# Clisp requires to select word size explicitly this way,
|
|
|
|
# set it in CFLAGS won't work.
|
2015-07-16 03:55:09 +00:00
|
|
|
ENV["CC"] = "#{ENV.cc} -m#{MacOS.prefer_64_bit? ? 64 : 32}"
|
2010-10-05 03:39:21 +00:00
|
|
|
|
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--with-readline=yes"
|
|
|
|
|
|
|
|
cd "src" do
|
|
|
|
# Multiple -O options will be in the generated Makefile,
|
|
|
|
# make Homebrew's the last such option so it's effective.
|
|
|
|
inreplace "Makefile" do |s|
|
2015-07-16 03:55:09 +00:00
|
|
|
s.change_make_var! "CFLAGS", "#{s.get_make_var("CFLAGS")} #{ENV["CFLAGS"]}"
|
2014-05-20 23:27:51 +00:00
|
|
|
end
|
2010-10-05 03:39:21 +00:00
|
|
|
|
|
|
|
# The ulimit must be set, otherwise `make` will fail and tell you to do so
|
|
|
|
system "ulimit -s 16384 && make"
|
|
|
|
|
2012-09-05 04:04:01 +00:00
|
|
|
if MacOS.version >= :lion
|
2015-07-16 03:55:09 +00:00
|
|
|
opoo <<-EOS.undent
|
|
|
|
`make check` fails so we are skipping it.
|
|
|
|
However, there will likely be other issues present.
|
|
|
|
Please take them upstream to the clisp project itself.
|
|
|
|
EOS
|
2011-08-11 19:39:03 +00:00
|
|
|
else
|
|
|
|
# Considering the complexity of this package, a self-check is highly recommended.
|
2015-07-16 03:55:09 +00:00
|
|
|
system "make", "check"
|
2011-08-11 19:39:03 +00:00
|
|
|
end
|
|
|
|
|
2015-07-16 03:55:09 +00:00
|
|
|
system "make", "install"
|
2010-10-05 03:39:21 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-02-23 21:31:41 +00:00
|
|
|
test do
|
2012-05-15 21:36:45 +00:00
|
|
|
system "#{bin}/clisp", "--version"
|
2010-10-05 03:39:21 +00:00
|
|
|
end
|
|
|
|
end
|
2012-02-25 07:39:12 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/src/stream.d b/src/stream.d
|
|
|
|
index 5345ed6..cf14e29 100644
|
|
|
|
--- a/src/stream.d
|
|
|
|
+++ b/src/stream.d
|
|
|
|
@@ -3994,7 +3994,7 @@ global object iconv_range (object encoding, uintL start, uintL end, uintL maxint
|
|
|
|
nonreturning_function(extern, error_unencodable, (object encoding, chart ch));
|
|
|
|
|
|
|
|
/* Avoid annoying warning caused by a wrongly standardized iconv() prototype. */
|
|
|
|
-#ifdef GNU_LIBICONV
|
|
|
|
+#if defined(GNU_LIBICONV) && !defined(__APPLE_CC__)
|
|
|
|
#undef iconv
|
|
|
|
#define iconv(cd,inbuf,inbytesleft,outbuf,outbytesleft) \
|
|
|
|
libiconv(cd,(ICONV_CONST char **)(inbuf),inbytesleft,outbuf,outbytesleft)
|