homebrew-core/Formula/qi.rb

36 lines
812 B
Ruby
Raw Normal View History

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'
sha1 '9170e2667902ada04bae3bf494b9560bc3d58fee'
2012-08-26 06:35:10 +00:00
option 'SBCL', 'Use SBCL instead of CLISP'
2012-08-26 06:35:10 +00:00
if build.include? 'SBCL'
depends_on 'sbcl'
else
depends_on 'clisp'
end
def install
2012-08-26 06:35:10 +00:00
if build.include? 'SBCL'
cd 'Lisp' do
system "sbcl", "--load", "install.lsp"
end
system "echo \"#!/bin/bash\nsbcl --core #{prefix}/Qi.core $*\" > qi"
prefix.install ['Lisp/Qi.core']
else
cd 'Lisp' do
system "clisp", "install.lsp"
end
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