2010-02-06 13:41:01 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Newlisp < Formula
|
2011-10-06 08:21:30 +00:00
|
|
|
url 'http://www.newlisp.org/downloads/newlisp-10.3.3.tgz'
|
2010-02-06 13:41:01 +00:00
|
|
|
homepage 'http://www.newlisp.org/'
|
2011-10-06 08:21:30 +00:00
|
|
|
md5 '9f997690d09b96dca9c3843784b13702'
|
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
|