2010-02-06 13:41:01 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Newlisp < Formula
|
2010-02-06 13:41:01 +00:00
|
|
|
homepage 'http://www.newlisp.org/'
|
2012-05-08 18:20:28 +00:00
|
|
|
url 'http://www.newlisp.org/downloads/newlisp-10.4.3.tgz'
|
|
|
|
sha1 'cf5f5514a2a18dd317aa5e6f38907f0a8879156f'
|
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
|
2012-02-21 06:04:21 +00:00
|
|
|
Dir["**/*.lsp"].each do |f|
|
2010-10-05 06:20:45 +00:00
|
|
|
inreplace f do |s|
|
2012-05-04 05:05:17 +00:00
|
|
|
s.gsub! '#!/usr/bin/newlisp', '#!/usr/bin/env newlisp'
|
|
|
|
s.gsub! '/usr/bin/newlisp', "#{bin}/newlisp"
|
2010-10-05 06:20:45 +00:00
|
|
|
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
|
2012-05-05 22:12:31 +00:00
|
|
|
system "#{bin}/newlisp-edit"
|
2010-02-06 13:41:01 +00:00
|
|
|
end
|
|
|
|
end
|