2010-02-06 13:41:01 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Newlisp < Formula
|
2011-02-20 20:02:44 +00:00
|
|
|
url 'http://www.newlisp.org/downloads/newlisp-10.3.0.tgz'
|
2010-02-06 13:41:01 +00:00
|
|
|
homepage 'http://www.newlisp.org/'
|
2011-02-20 20:02:44 +00:00
|
|
|
md5 '149628df996a3154c7a286cbb05f65a8'
|
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
|