forked from mht208/homebrew-formal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lingeling.rb
55 lines (47 loc) · 1.64 KB
/
lingeling.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
require 'formula'
class Lingeling < Formula
desc 'a SAT solver'
homepage 'http://fmv.jku.at/lingeling/'
url 'http://fmv.jku.at/lingeling/lingeling-bcj-78ebb86-180517.tar.gz'
sha256 '2480197e48907eaaf935e96f9837366942054f26ed4c58f92ec66efedada07f2'
option 'with-druplig', 'Build with proof generation'
patch :DATA
def install
if build.with? 'druplig' then
system 'curl -o lingeling-bbc-9230380-160707-druplig-009.tar.gz http://fmv.jku.at/lingeling/lingeling-bbc-9230380-160707-druplig-009.tar.gz'
system 'tar zxf lingeling-bbc-9230380-160707-druplig-009.tar.gz'
Dir.chdir 'lingeling-bbc-9230380-160707-druplig-009' do
system 'unzip druplig-009.zip'
system 'mv druplig-009 ../druplig'
end
Dir.chdir 'druplig' do
system './configure.sh'
system 'make'
end
end
args = []
if build.with? 'druplig' then
args << '--druplig=./druplig'
end
system "./configure.sh", *args
system "make"
bin.install "ilingeling", "lglddtrace", "lglmbt", "lgluntrace",
"lingeling", "plingeling", "treengeling"
lib.install "liblgl.a"
(include/'lingeling').install Dir['*.h']
end
end
__END__
diff --git a/configure.sh b/configure.sh
index 097f446..744b798 100755
--- a/configure.sh
+++ b/configure.sh
@@ -80,7 +80,7 @@ do
--no-aiger) aiger=no;;
--yalsat=*) yalsat=`echo "$1"|sed -e 's,^--yalsat=,,'`;;
--no-yalsat) yalsat=no;;
- --druplig) druplig=`echo "$1"|sed -e 's,^--druplig=,,'`;;
+ --druplig=*) druplig=`echo "$1"|sed -e 's,^--druplig=,,'`;;
--no-druplig) druplig=no;;
--files) files=yes;;
--classify) classify=yes;;