2011-10-25 19:17:26 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Cloog < Formula
|
|
|
|
homepage 'http://www.cloog.org/'
|
2013-10-19 23:28:49 +00:00
|
|
|
url 'http://www.bastoul.net/cloog/pages/download/count.php3?url=./cloog-0.18.1.tar.gz'
|
2014-03-28 20:27:37 +00:00
|
|
|
mirror 'http://gcc.cybermirror.org/infrastructure/cloog-0.18.1.tar.gz'
|
2013-10-19 23:28:49 +00:00
|
|
|
sha1 '2dc70313e8e2c6610b856d627bce9c9c3f848077'
|
2011-10-25 19:17:26 +00:00
|
|
|
|
2013-09-24 23:40:45 +00:00
|
|
|
bottle do
|
2013-12-05 07:03:21 +00:00
|
|
|
cellar :any
|
|
|
|
revision 1
|
|
|
|
sha1 '38afdce382abcd3c46fb94af7eb72e87d87859d4' => :mavericks
|
|
|
|
sha1 'd6984ce335cf7b8eb482cdd4f0301c6583b00073' => :mountain_lion
|
|
|
|
sha1 'fd707268c3e5beafa9b98a768f7064d5b9699178' => :lion
|
2013-09-24 23:40:45 +00:00
|
|
|
end
|
|
|
|
|
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",
|
2013-09-08 08:48:06 +00:00
|
|
|
"--disable-silent-rules",
|
2013-03-25 04:29:15 +00:00
|
|
|
"--prefix=#{prefix}",
|
2013-09-08 08:48:06 +00:00
|
|
|
"--with-gmp=system",
|
2014-02-25 05:17:26 +00:00
|
|
|
"--with-gmp-prefix=#{Formula["gmp"].opt_prefix}",
|
2013-09-08 08:48:06 +00:00
|
|
|
"--with-isl=system",
|
2014-02-25 05:17:26 +00:00
|
|
|
"--with-isl-prefix=#{Formula["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
|
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
|
2011-10-25 19:17:26 +00:00
|
|
|
end
|
|
|
|
end
|