forked from lotia/homebrew-versions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloog018.rb
53 lines (42 loc) · 1.13 KB
/
cloog018.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
require 'formula'
class Cloog018 < Formula
homepage 'http://www.cloog.org/'
# Track gcc infrastructure releases.
url 'http://www.bastoul.net/cloog/pages/download/count.php3?url=./cloog-0.18.0.tar.gz'
mirror 'ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.18.0.tar.gz'
sha1 '85f620a26aabf6a934c44ca40a9799af0952f863'
keg_only 'Conflicts with cloog in main repository.'
depends_on 'pkg-config' => :build
depends_on 'gmp4'
depends_on 'isl011'
def install
args = [
"--prefix=#{prefix}",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--with-gmp-prefix=#{Formula.factory("gmp4").opt_prefix}",
"--with-isl-prefix=#{Formula.factory("isl011").opt_prefix}"
]
system "./configure", *args
system "make install"
end
test do
cloog_source = <<-EOS.undent
c
0 2
0
1
1
0 2
0 0 0
0
0
EOS
require 'open3'
Open3.popen3("#{bin}/cloog", "/dev/stdin") do |stdin, stdout, _|
stdin.write(cloog_source)
stdin.close
assert_match /Generated from \/dev\/stdin by CLooG/, stdout.read
end
end
end