2010-02-06 13:41:01 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Newlisp < Formula
|
2011-07-27 07:57:29 +00:00
|
|
|
url 'http://www.newlisp.org/downloads/newlisp-10.3.2.tgz'
|
2010-02-06 13:41:01 +00:00
|
|
|
homepage 'http://www.newlisp.org/'
|
2011-07-27 07:57:29 +00:00
|
|
|
md5 '91aede51dc31fc1997d6c52adac3568a'
|
2010-02-06 13:41:01 +00:00
|
|
|
|
|
|
|
depends_on 'readline'
|
|
|
|
|
|
|
|
def install
|
2010-10-05 06:20:45 +00:00
|
|
|
# Required to use our configuration
|
|
|
|
ENV.append_to_cflags "-DNEWCONFIG -c"
|
|
|
|
|
|
|
|
system "./configure-alt", "--prefix=#{prefix}", "--mandir=#{man}"
|
2010-02-06 13:41:01 +00:00
|
|
|
system "make"
|
|
|
|
|
2010-10-05 06:20:45 +00:00
|
|
|
# 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
|
|
|
|
|
|
|
|
system "make check"
|
|
|
|
system "make install"
|
2010-02-06 13:41:01 +00:00
|
|
|
end
|
|
|
|
|
2010-10-05 06:20:45 +00:00
|
|
|
# Use the IDE to test a complete installation
|
|
|
|
def test
|
|
|
|
system "newlisp-edit"
|
2010-02-06 13:41:01 +00:00
|
|
|
end
|
|
|
|
end
|