homebrew-core/Formula/cloog.rb

54 lines
1.3 KiB
Ruby
Raw Normal View History

require 'formula'
class Cloog < Formula
homepage 'http://www.cloog.org/'
url 'http://www.bastoul.net/cloog/pages/download/count.php3?url=./cloog-0.18.1.tar.gz'
sha1 '2dc70313e8e2c6610b856d627bce9c9c3f848077'
2013-09-24 23:40:45 +00:00
bottle do
2013-10-20 09:06:37 +00:00
sha1 '5ef24be06c4c61d4f37208e128d2f930373d1409' => :mountain_lion
sha1 '016b2ef75d40ee74be87be43c8642aa47b3abea2' => :lion
sha1 '6a85fb754c31b9b577e71b13f736d273fd71a3b0' => :snow_leopard
2013-09-24 23:40:45 +00:00
end
depends_on 'pkg-config' => :build
depends_on 'gmp'
depends_on 'isl'
def install
2013-03-25 04:29:15 +00:00
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
2013-03-25 04:29:15 +00:00
"--prefix=#{prefix}",
"--with-gmp=system",
"--with-gmp-prefix=#{Formula.factory("gmp").opt_prefix}",
"--with-isl=system",
2013-03-25 04:29:15 +00:00
"--with-isl-prefix=#{Formula.factory("isl").opt_prefix}"
system "make install"
end
2013-03-25 04:29:37 +00:00
test do
cloog_source = <<-EOS.undent
c
0 2
0
1
1
0 2
0 0 0
0
0
EOS
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
2013-06-09 02:26:19 +00:00
assert_match /Generated from \/dev\/stdin by CLooG/, stdout.read
2013-03-25 04:29:37 +00:00
end
end
end