2011-09-24 22:46:55 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Qi < Formula
|
|
|
|
homepage 'http://www.lambdassociates.org/'
|
2012-08-26 06:35:10 +00:00
|
|
|
url 'http://www.lambdassociates.org/Download/QiII1.07.zip'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '9170e2667902ada04bae3bf494b9560bc3d58fee'
|
2011-09-24 22:46:55 +00:00
|
|
|
|
2012-08-26 06:35:10 +00:00
|
|
|
option 'SBCL', 'Use SBCL instead of CLISP'
|
2011-09-24 22:46:55 +00:00
|
|
|
|
2012-08-26 06:35:10 +00:00
|
|
|
if build.include? 'SBCL'
|
2011-09-24 22:46:55 +00:00
|
|
|
depends_on 'sbcl'
|
|
|
|
else
|
|
|
|
depends_on 'clisp'
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2012-08-26 06:35:10 +00:00
|
|
|
if build.include? 'SBCL'
|
2012-06-17 22:41:41 +00:00
|
|
|
cd 'Lisp' do
|
|
|
|
system "sbcl", "--load", "install.lsp"
|
|
|
|
end
|
|
|
|
|
2011-09-24 22:46:55 +00:00
|
|
|
system "echo \"#!/bin/bash\nsbcl --core #{prefix}/Qi.core $*\" > qi"
|
|
|
|
prefix.install ['Lisp/Qi.core']
|
|
|
|
else
|
2012-06-17 22:41:41 +00:00
|
|
|
cd 'Lisp' do
|
|
|
|
system "clisp", "install.lsp"
|
|
|
|
end
|
|
|
|
|
2011-09-24 22:46:55 +00:00
|
|
|
system "echo \"#!/bin/bash\nclisp -M #{prefix}/Qi.mem $*\" > qi"
|
|
|
|
prefix.install ['Lisp/Qi.mem']
|
|
|
|
end
|
|
|
|
system "chmod 755 qi"
|
|
|
|
bin.install ['qi']
|
|
|
|
end
|
|
|
|
end
|