Skip to content
This repository
Browse code

New formula: clisp

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information...
commit fdf609438918ab19b4d2df88ed7a3112b1f82ae3 1 parent 564901d
Tianyi Cui authored October 05, 2010 adamv committed October 31, 2010

Showing 1 changed file with 47 additions and 0 deletions. Show diff stats Hide diff stats

  1. 47  Library/Formula/clisp.rb
47  Library/Formula/clisp.rb
... ...
@@ -0,0 +1,47 @@
  1
+require 'formula'
  2
+
  3
+class Clisp <Formula
  4
+  url 'http://ftp.gnu.org/pub/gnu/clisp/release/2.49/clisp-2.49.tar.bz2'
  5
+  homepage 'http://clisp.cons.org/'
  6
+  md5 '1962b99d5e530390ec3829236d168649'
  7
+
  8
+  depends_on 'libiconv'
  9
+  depends_on 'libsigsegv'
  10
+  depends_on 'readline'
  11
+
  12
+  skip_clean :all # otherwise abort trap
  13
+
  14
+  def install
  15
+    # This build isn't parallel safe.
  16
+    ENV.j1
  17
+
  18
+    # Clisp requires to select word size explicitly this way,
  19
+    # set it in CFLAGS won't work.
  20
+    ENV['CC'] = "#{ENV.cc} -m#{snow_leopard_64? ? 64 : 32}"
  21
+
  22
+    system "./configure", "--prefix=#{prefix}",
  23
+                          "--with-readline=yes"
  24
+
  25
+    cd "src" do
  26
+      # Multiple -O options will be in the generated Makefile,
  27
+      # make Homebrew's the last such option so it's effective.
  28
+      inreplace "Makefile" do |s|
  29
+        cf = s.get_make_var("CFLAGS")
  30
+        cf.gsub! ENV['CFLAGS'], ''
  31
+        cf += ' '+ENV['CFLAGS']
  32
+        s.change_make_var! 'CFLAGS', cf
  33
+      end
  34
+
  35
+      # The ulimit must be set, otherwise `make` will fail and tell you to do so
  36
+      system "ulimit -s 16384 && make"
  37
+
  38
+      # Considering the complexity of this package, a self-check is highly recommended.
  39
+      system "make check"
  40
+      system "make install"
  41
+    end
  42
+  end
  43
+
  44
+  def test
  45
+    system "clisp --version"
  46
+  end
  47
+end

0 notes on commit fdf6094

Please sign in to comment.
Something went wrong with that request. Please try again.