blob: f954bbe39549c975dc93e4c94740d652ae581277 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 | require 'formula'
class ClozureCl < Formula
  homepage 'http://ccl.clozure.com/'
  url 'http://ccl.clozure.com/ftp/pub/release/1.10/ccl-1.10-darwinx86.tar.gz'
  version '1.10'
  sha1 'b624499eff340c1bcfb0bd8fa4638bc4770357fc'
  conflicts_with 'cclive', :because => 'both install a ccl binary'
  def install
    # Get rid of all the .svn directories
    rm_rf Dir["**/.svn"]
    libexec.install Dir["*"]
    scripts = Dir["#{libexec}/scripts/ccl{,64}"]
    inreplace scripts, /CCL_DEFAULT_DIRECTORY=.+$/, %Q{CCL_DEFAULT_DIRECTORY="#{libexec}"}
    bin.install_symlink scripts
  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
  test do
    system test_ccl
    system test_ccl(64)
  end
end
 |