aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/tinyxml2.rb26
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