2011-09-24 22:50:05 +00:00
|
|
|
require 'formula'
|
2012-02-08 05:48:05 +00:00
|
|
|
|
2011-09-24 22:50:05 +00:00
|
|
|
class Shen < Formula
|
2012-02-08 05:16:32 +00:00
|
|
|
homepage 'http://www.shenlanguage.org/'
|
2011-12-15 14:05:30 +00:00
|
|
|
url 'http://www.shenlanguage.org/download/Shen3.0.zip'
|
|
|
|
md5 'ea14b335772ede6a50c5e03d86dbd9c6'
|
2011-11-10 13:22:41 +00:00
|
|
|
|
2012-02-08 05:16:32 +00:00
|
|
|
if ARGV.include? "--sbcl"
|
2011-11-10 13:22:41 +00:00
|
|
|
depends_on 'sbcl'
|
|
|
|
else
|
|
|
|
depends_on 'clisp'
|
|
|
|
end
|
2011-09-24 22:50:05 +00:00
|
|
|
|
2011-11-10 13:22:41 +00:00
|
|
|
def options
|
|
|
|
[["--sbcl", "Build SBCL version."]]
|
|
|
|
end
|
2011-09-24 22:50:05 +00:00
|
|
|
|
|
|
|
def install
|
2011-11-10 13:22:41 +00:00
|
|
|
case
|
|
|
|
when ARGV.include?("--sbcl") then
|
|
|
|
system "cp K\\ Lambda/* Platforms/SBCL"
|
|
|
|
safe_system "cd Platforms/SBCL; sbcl --load install.lsp"
|
|
|
|
system "mv Platforms/SBCL/Shen.exe shen"
|
|
|
|
else
|
|
|
|
system "cp K\\ Lambda/* Platforms/CLisp"
|
|
|
|
safe_system "cd Platforms/CLisp; clisp -i install.lsp"
|
|
|
|
system "echo \"#!/bin/bash\nclisp -M #{prefix}/Shen.mem $*\" > shen"
|
|
|
|
prefix.install ['Platforms/CLisp/Shen.mem']
|
|
|
|
end
|
2011-09-24 22:50:05 +00:00
|
|
|
system "chmod 755 shen"
|
2012-02-08 05:16:32 +00:00
|
|
|
bin.install 'shen'
|
2011-09-24 22:50:05 +00:00
|
|
|
end
|
2011-11-30 18:56:07 +00:00
|
|
|
end
|