50 lines
1.8 KiB
Ruby
50 lines
1.8 KiB
Ruby
class Acl2 < Formula
|
|
desc "Logic and programming language in which you can model computer systems"
|
|
homepage "https://www.cs.utexas.edu/users/moore/acl2/index.html"
|
|
url "https://github.com/acl2/acl2/archive/8.3.tar.gz"
|
|
sha256 "45eedddb36b2eff889f0dba2b96fc7a9b1cf23992fcfdf909bc179f116f2c5ea"
|
|
license "BSD-3-Clause"
|
|
revision 11
|
|
|
|
bottle do
|
|
sha256 big_sur: "0bd281c90284949c9357cf4f377f838535c089a998f879c846fdcb6cf2592289"
|
|
sha256 catalina: "7b39eaeb9fc962be139fa93c1300e79ecc0b01b8f1883fd3de2f89f3d9399485"
|
|
sha256 mojave: "859c31ecec386d2f912a9ded763323ac0256331836f522a74c3d6f096f425c75"
|
|
sha256 x86_64_linux: "8b760d5c1301d03d98c18e323c92410902cef441fe9ac904d897a7922c04fed0"
|
|
end
|
|
|
|
depends_on "sbcl"
|
|
|
|
def install
|
|
system "make",
|
|
"LISP=#{HOMEBREW_PREFIX}/bin/sbcl",
|
|
"ACL2=#{buildpath}/saved_acl2",
|
|
"USE_QUICKLISP=0",
|
|
"all", "basic"
|
|
system "make",
|
|
"LISP=#{HOMEBREW_PREFIX}/bin/sbcl",
|
|
"ACL2_PAR=p",
|
|
"ACL2=#{buildpath}/saved_acl2p",
|
|
"USE_QUICKLISP=0",
|
|
"all", "basic"
|
|
libexec.install Dir["*"]
|
|
|
|
(bin/"acl2").write <<~EOF
|
|
#!/bin/sh
|
|
export ACL2_SYSTEM_BOOKS='#{libexec}/books'
|
|
#{Formula["sbcl"].opt_bin}/sbcl --core '#{libexec}/saved_acl2.core' --userinit /dev/null --eval '(acl2::sbcl-restart)'
|
|
EOF
|
|
(bin/"acl2p").write <<~EOF
|
|
#!/bin/sh
|
|
export ACL2_SYSTEM_BOOKS='#{libexec}/books'
|
|
#{Formula["sbcl"].opt_bin}/sbcl --core '#{libexec}/saved_acl2p.core' --userinit /dev/null --eval '(acl2::sbcl-restart)'
|
|
EOF
|
|
end
|
|
|
|
test do
|
|
(testpath/"simple.lisp").write "(+ 2 2)"
|
|
output = shell_output("#{bin}/acl2 < #{testpath}/simple.lisp | grep 'ACL2 !>'")
|
|
assert_equal "ACL2 !>4\nACL2 !>Bye.", output.strip
|
|
end
|
|
end
|