aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/unittest-cpp.rb
blob: 88b264a6cc1dea9ead663f1f7161536efb62a957 (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
class UnittestCpp < Formula
  homepage "https://github.com/unittest-cpp/unittest-cpp"

  stable do
    url "https://github.com/unittest-cpp/unittest-cpp/archive/v1.4.tar.gz"
    sha1 "ec7bdbebeb6f4d7a069f1125f7b4f473198e491d"

    # Clang failure fixed in the HEAD already
    fails_with :clang do
      build 600
      cause "Failure in test: Expected 2 but was 0"
    end
  end

  bottle do
    cellar :any
    sha1 "6d9dbaebbfce4e6da037f55d70766b305ae361de" => :yosemite
    sha1 "6042952c71d97f611f7dc6662125e02fb1a3f56a" => :mavericks
    sha1 "e0289f35b526795fad1d204374928996f7f208a2" => :mountain_lion
  end

  head do
    url "https://github.com/unittest-cpp/unittest-cpp.git"

    depends_on "autoconf" => :build
    depends_on "automake" => :build
    depends_on "libtool" => :build
  end

  def install
    if build.head?
      system "autoreconf", "-fvi"
      system "./configure", "--prefix=#{prefix}", "--disable-silent-rules"
      system "make", "install"
    end

    if build.stable?
      system "make"

      # Install the headers
      include.install Dir["src/*.h"]
      include.install "src/Posix"

      # Install the compiled library
      lib.install "libUnitTest++.a"

      # Install the documentation
      doc.install "docs/UnitTest++.html"
    end
  end
end