aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/tinyxml2.rb
blob: c936283ce426f9f9924d801ba64a40fb6884cc88 (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
require "formula"

class Tinyxml2 < Formula
  homepage "http://grinninglizard.com/tinyxml2"
  url "https://github.com/leethomason/tinyxml2/archive/2.1.0.tar.gz"
  sha1 "70ef3221bdc190fd8fc50cdd4a6ef440f44b74dc"
  head "https://github.com/leethomason/tinyxml2.git", :branch => "master"

  bottle do
    cellar :any
    sha1 "82860d4195cb6c1230770cb35899a26480d608b3" => :mavericks
    sha1 "bebfd80f824aeccc679c3efd719457f353d8132e" => :mountain_lion
    sha1 "4fba761a6b118583a2ef064c43b7a839fe210cd3" => :lion
  end

  depends_on "cmake" => :build

  def install
    system "cmake", ".", *std_cmake_args
    system "make", "install"
  end

  test do
    (testpath/'test.cpp').write <<-EOS.undent
      #include <tinyxml2.h>
      int main() {
        tinyxml2::XMLDocument doc (false);
        return 0;
      }
    EOS
    system ENV.cc, "test.cpp", "-ltinyxml2"
  end
end