2011-01-17 17:19:39 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class ClozureCl < Formula
|
2013-01-27 02:17:39 +00:00
|
|
|
homepage 'http://ccl.clozure.com/'
|
2014-03-25 18:44:40 +00:00
|
|
|
url 'http://ccl.clozure.com/ftp/pub/release/1.9/ccl-1.9-darwinx86.tar.gz'
|
2013-03-09 02:44:09 +00:00
|
|
|
version '1.9'
|
|
|
|
sha1 '589b94093fc356c458ab288aceb5a3d5d9d7b829'
|
2011-01-17 17:19:39 +00:00
|
|
|
|
2013-11-06 15:31:27 +00:00
|
|
|
conflicts_with 'cclive', :because => 'both install a ccl binary'
|
|
|
|
|
2011-01-17 17:19:39 +00:00
|
|
|
def install
|
2014-03-25 23:59:47 +00:00
|
|
|
# Get rid of all the .svn directories
|
2012-08-20 00:26:09 +00:00
|
|
|
buildpath.find do |path|
|
|
|
|
if path.directory? and path.basename.to_s == '.svn'
|
2011-01-17 17:19:39 +00:00
|
|
|
rm_rf path
|
|
|
|
Find.prune
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-03-25 23:59:47 +00:00
|
|
|
libexec.install Dir["*"]
|
|
|
|
scripts = Dir["#{libexec}/scripts/ccl{,64}"]
|
2011-01-17 17:19:39 +00:00
|
|
|
|
2014-03-25 23:59:47 +00:00
|
|
|
inreplace scripts do |s|
|
|
|
|
s.gsub! /CCL_DEFAULT_DIRECTORY=.+$/, %Q{CCL_DEFAULT_DIRECTORY="#{libexec}"}
|
2011-01-17 17:19:39 +00:00
|
|
|
end
|
|
|
|
|
2014-03-25 23:59:47 +00:00
|
|
|
bin.install_symlink scripts
|
2011-01-17 17:19:39 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def test_ccl(bit = 32)
|
|
|
|
ccl = bin + "ccl#{'64' if bit == 64}"
|
|
|
|
%Q{#{ccl} -e '(progn (format t "Hello world from #{bit}-bit ClozureCL") (ccl::quit))'}
|
|
|
|
end
|
|
|
|
|
2014-02-23 21:31:41 +00:00
|
|
|
test do
|
2011-01-17 17:19:39 +00:00
|
|
|
system test_ccl
|
|
|
|
system test_ccl(64)
|
|
|
|
end
|
|
|
|
end
|