diff options
| author | Steven Peters | 2014-03-17 00:02:20 -0700 |
|---|---|---|
| committer | Mike McQuaid | 2014-03-17 22:25:17 +0000 |
| commit | fc2ce37eaa34f36d29f894861a11664787648cdb (patch) | |
| tree | fb46147b9c461df19ef52301ec08aaa0f45cdd80 /Library/Formula | |
| parent | 9fc4cdf0bcc7ce4e88888a9d3bf576d91e652c02 (diff) | |
| download | homebrew-fc2ce37eaa34f36d29f894861a11664787648cdb.tar.bz2 | |
tinyxml2 2.0.2 (new formula)
tinyxml2 is a light-weight c++ library for parsing xml. It
was previously submitted as a head-only formula in #23381
but was put on hold until releases could be tagged upstream.
The 2.0.2 release has just been tagged.
tinyxml2: add test that uses pkg-config to search for library
tinyxml2: add basic test for compiling and linking
Update tinyxml2.rb
Remove pkg-config test.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/tinyxml2.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Library/Formula/tinyxml2.rb b/Library/Formula/tinyxml2.rb new file mode 100644 index 000000000..fbfc358c8 --- /dev/null +++ b/Library/Formula/tinyxml2.rb @@ -0,0 +1,26 @@ +require "formula" + +class Tinyxml2 < Formula + homepage "http://grinninglizard.com/tinyxml2" + url "https://github.com/leethomason/tinyxml2/archive/2.0.2.tar.gz" + sha1 "c78a4de58540e2a35f4775fd3e577299ebd15117" + head "https://github.com/leethomason/tinyxml2.git", :branch => "master" + + 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 |
