-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcando.rb
More file actions
52 lines (47 loc) · 1.92 KB
/
cando.rb
File metadata and controls
52 lines (47 loc) · 1.92 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
class Cando < Formula
desc "Common Lisp implementation and Cando chemistry system"
homepage "https://github.com/clasp-developers/clasp"
url "https://github.com/clasp-developers/clasp.git",
using: :git,
revision: "1ff6ef171fff6f4c4b709258d2e8bd5e0351a11c"
version "2.7.0-293-g1ff6ef171-g954238b6"
license "GPL-2.0-or-later"
head "https://github.com/clasp-developers/clasp.git", branch: "main"
bottle do
root_url "https://ghcr.io/v2/clasp-developers/clasp"
sha256 arm64_sequoia: "b30d3f348f77b94bcdd87f0bfbe5e7f63c85088373b4db180548c830827758f6"
sha256 arm64_sonoma: "be11c5a567b740621d11d4b0d0434e9c831b67e870dab61048e92283e6a780bc"
end
depends_on "boost" => :build
depends_on "libunwind-headers" => :build
depends_on "pkg-config" => :build
depends_on "sbcl" => :build
depends_on "expat"
depends_on "fmt"
depends_on "gmp"
depends_on "jupyterlab"
depends_on "lld"
depends_on "llvm@19"
depends_on "netcdf"
depends_on "ninja"
depends_on "zeromq"
conflicts_with "clasp-cl", because: "both install `clasp` binaries"
def install
ENV.deparallelize
system "./koga", "--reproducible-build", "--bin-path=#{bin}", "--share-path=#{share}/clasp/",
"--lib-path=#{lib}/clasp/", "--llvm-config=#{Formula["llvm@19"].opt_bin}/llvm-config",
"--pkg-config=#{Formula["pkg-config"].opt_bin}/pkg-config", "--dylib-path=#{lib}/",
"--cxxflags=-I#{Formula["boost"].include}/", "--cppflags=-I#{Formula["boost"].include}/",
"--skip-sync=ansi-test,mps,cl-bench,cl-who", "--extensions=cando",
"--pkgconfig-path=#{lib}/pkgconfig/", "--no-compile-file-parallel"
system "ninja", "-C", "build"
system "ninja", "-C", "build", "install"
end
test do
(testpath/"simple.lisp").write <<~EOS
(write-line "Hello, world!")
EOS
assert_match "Hello, world!",
shell_output("DYLD_LIBRARY_PATH=#{lib} #{bin}/clasp --script #{testpath}/simple.lisp")
end
end