blob: 14a1ed752d0647ca0d0fef18acebac9c2f75c10f (
plain)
| 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
 | 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'
  mirror 'http://gcc.cybermirror.org/infrastructure/cloog-0.18.1.tar.gz'
  sha1 '2dc70313e8e2c6610b856d627bce9c9c3f848077'
  bottle do
    cellar :any
    revision 2
    sha1 "65900e9655ab8f444ecf7edf4118caa01ca56ddb" => :yosemite
    sha1 "851f64756bb082a5a354e0992976acd70cfdacbf" => :mavericks
    sha1 "06252f0a9c453818c319b21647ebaa9a26c3f4ac" => :mountain_lion
  end
  head do
    url 'http://repo.or.cz/r/cloog.git'
    depends_on "autoconf" => :build
    depends_on "automake" => :build
    depends_on "libtool" => :build
  end
  depends_on 'pkg-config' => :build
  depends_on 'gmp'
  depends_on 'isl'
  def install
    system "./autogen.sh" if build.head?
    args = [
      "--disable-dependency-tracking",
      "--disable-silent-rules",
      "--prefix=#{prefix}",
      "--with-gmp=system",
      "--with-gmp-prefix=#{Formula["gmp"].opt_prefix}",
      "--with-isl=system",
      "--with-isl-prefix=#{Formula["isl"].opt_prefix}"
    ]
    args << "--with-osl=bundled" if build.head?
    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
    output = pipe_output("#{bin}/cloog /dev/stdin", cloog_source)
    assert_match /Generated from \/dev\/stdin by CLooG/, output
  end
end
 |