55 lines
2.1 KiB
Ruby
55 lines
2.1 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.5.tar.gz"
|
|
sha256 "dcc18ab0220027b90f30cd9e5a67d8f603ff0e5b26528f3aab75dc8d3d4ebc0f"
|
|
license "BSD-3-Clause"
|
|
revision 2
|
|
|
|
bottle do
|
|
sha256 arm64_monterey: "a7a6ef7cf819d119a3a1f206b8e7abdbe80df5624564fc9d53f15a2dcba166e3"
|
|
sha256 arm64_big_sur: "a73a8cb4c672a1705e9050cda6de7adba47bf2de6cb6970a9de110c964278b69"
|
|
sha256 monterey: "99dceba2a57629da18f0601df439477417072b9b69ed606e4d4288c916af6a13"
|
|
sha256 big_sur: "a0ae16e2c9e8718507b027caacc26d2513d6785a320ff323a83461afaf6e8570"
|
|
sha256 catalina: "ad6a6ea56cc93fadc9f41a42be8ced1f1c412a924715a5519f894d9e2635d3d0"
|
|
sha256 x86_64_linux: "0ce9081d0fe0ea5ec2d0ab701af0d88e983c2ecd2c01f69c191138f201719c2f"
|
|
end
|
|
|
|
depends_on "sbcl"
|
|
|
|
def install
|
|
# Remove prebuilt-binary.
|
|
(buildpath/"books/kestrel/axe/x86/examples/popcount/popcount-macho-64.executable").unlink
|
|
|
|
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
|