Refactored the newlisp formula

This formula is completely rewritten. Instead of just
install one executable `newlisp`, it now install
everything including standard library, documentation
and the IDE.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
master
Tianyi Cui 2010-10-05 14:20:45 +08:00 committed by Adam Vandenberg
parent e88def8fa3
commit 67d6a943a8
1 changed files with 17 additions and 7 deletions

View File

@ -8,16 +8,26 @@ class Newlisp <Formula
depends_on 'readline'
def install
# Minimal install as describe in the README
system "./configure"
# Required to use our configuration
ENV.append_to_cflags "-DNEWCONFIG -c"
system "./configure-alt", "--prefix=#{prefix}", "--mandir=#{man}"
system "make"
bin.install 'newlisp'
# Many .lsp files assume the interpreter will be installed in /usr/bin
Dir.glob("**/*.lsp") do |f|
inreplace f do |s|
s.gsub! "!#/usr/bin/newlisp", "!#/usr/bin/env newlisp"
s.gsub! "/usr/bin/newlisp", "#{bin}/newlisp"
end
end
def caveats; <<-EOS.undent
Because of hardcoded paths in the newLISP source,
this formula does not install the Java-based IDE.
EOS
system "make check"
system "make install"
end
# Use the IDE to test a complete installation
def test
system "newlisp-edit"
end
end