2011-10-25 19:17:26 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Cloog < Formula
|
|
|
|
homepage 'http://www.cloog.org/'
|
2012-08-06 22:11:20 +00:00
|
|
|
url 'http://www.bastoul.net/cloog/pages/download/count.php3?url=./cloog-0.17.0.tar.gz'
|
|
|
|
sha1 'decc2221b1f1bd9238288d043835cb018af15d5a'
|
2011-10-25 19:17:26 +00:00
|
|
|
|
|
|
|
depends_on 'pkg-config' => :build
|
|
|
|
depends_on 'gmp'
|
2012-11-05 06:40:05 +00:00
|
|
|
depends_on 'isl'
|
2011-10-25 19:17:26 +00:00
|
|
|
|
|
|
|
def install
|
2012-11-05 06:40:05 +00:00
|
|
|
args = [
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--with-isl-prefix=#{Formula.factory('isl').opt_prefix}"
|
|
|
|
]
|
|
|
|
|
|
|
|
system "./configure", *args
|
2011-10-25 19:17:26 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
2012-11-05 06:40:05 +00:00
|
|
|
cloog_source = <<-EOS.undent
|
|
|
|
c
|
2011-10-25 19:17:26 +00:00
|
|
|
|
2012-11-05 06:40:05 +00:00
|
|
|
0 2
|
|
|
|
0
|
2011-10-25 19:17:26 +00:00
|
|
|
|
2012-11-05 06:40:05 +00:00
|
|
|
1
|
2011-10-25 19:17:26 +00:00
|
|
|
|
2012-11-05 06:40:05 +00:00
|
|
|
1
|
|
|
|
0 2
|
|
|
|
0 0 0
|
|
|
|
0
|
2011-10-25 19:17:26 +00:00
|
|
|
|
2012-11-05 06:40:05 +00:00
|
|
|
0
|
|
|
|
EOS
|
2011-10-25 19:17:26 +00:00
|
|
|
|
|
|
|
pipe = IO.popen("cloog /dev/stdin", "w+")
|
|
|
|
pipe.write(cloog_source)
|
|
|
|
pipe.read =~ /Generated\ from \/dev\/stdin\ by\ CLooG/
|
|
|
|
end
|
|
|
|
end
|