2011-10-25 19:17:26 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Cloog < Formula
|
|
|
|
homepage 'http://www.cloog.org/'
|
2013-01-03 21:57:38 +00:00
|
|
|
url 'http://www.bastoul.net/cloog/pages/download/count.php3?url=./cloog-0.18.0.tar.gz'
|
|
|
|
sha1 '85f620a26aabf6a934c44ca40a9799af0952f863'
|
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
|
2013-03-25 04:29:15 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--with-isl-prefix=#{Formula.factory("isl").opt_prefix}"
|
2011-10-25 19:17:26 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
2013-03-25 04:29:37 +00:00
|
|
|
test do
|
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
|
|
|
|
2013-03-25 04:29:37 +00:00
|
|
|
require 'open3'
|
|
|
|
Open3.popen3("#{bin}/cloog", "/dev/stdin") do |stdin, stdout, _|
|
|
|
|
stdin.write(cloog_source)
|
|
|
|
stdin.close
|
|
|
|
/Generated from \/dev\/stdin by CLooG/ === stdout.read
|
|
|
|
end
|
2011-10-25 19:17:26 +00:00
|
|
|
end
|
|
|
|
end
|