forked from mht208/homebrew-formal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcvc4.rb
66 lines (56 loc) · 1.97 KB
/
cvc4.rb
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
require 'formula'
class Cvc4 < Formula
include Language::Python::Virtualenv
homepage 'http://cvc4.cs.nyu.edu'
url 'https://github.com/CVC4/CVC4-archived/archive/refs/tags/1.8.tar.gz'
sha256 '80fd10d5e4cca56367fc5398ba0117a86d891e0b9b247a97cd981fe02e8167f5'
depends_on "coreutils" => :build
depends_on "cmake" => :build
depends_on "python@3.9"
depends_on "gmp" => :build
depends_on "swig"
depends_on "flex"
resource "toml" do
url 'https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz'
sha256 'b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f'
end
patch :DATA
def install
venv_root = libexec/"venv"
xy = Language::Python.major_minor_version "python3"
ENV.prepend_create_path "PYTHONPATH", "#{venv_root}/lib/python#{xy}/site-packages"
venv = virtualenv_create(venv_root, "python3")
venv.pip_install resource("toml")
system "pip3", "install", "toml"
system "MACHINE_TYPE=\"x86_64\" ./contrib/get-antlr-3.4"
system "./contrib/get-symfpu"
system "./contrib/get-cadical"
system "./contrib/get-kissat"
system "./contrib/get-cryptominisat"
system "./contrib/get-lfsc-checker"
args = [ "--prefix=#{prefix}",
"--cadical",
"--kissat",
"--cryptominisat",
"--lfsc",
"--python3",
"--symfpu" ]
system "./configure.sh", *args
chdir "build" do
system "make"
system "make", "install"
end
end
end
__END__
diff --git a/contrib/get-cadical b/contrib/get-cadical
index a253514..a459538 100755
--- a/contrib/get-cadical
+++ b/contrib/get-cadical
@@ -10,7 +10,7 @@ setup_dep \
"https://github.com/arminbiere/cadical/archive/$version.tar.gz" "$CADICAL_DIR"
cd "$CADICAL_DIR"
-CXXFLAGS="-fPIC" ./configure && make -j$(nproc)
+CXXFLAGS="-fPIC -std=c++0x" ./configure && make -j$(nproc)
install_lib build/libcadical.a
install_includes src/cadical.hpp