aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDan Michael O. Heggø2015-01-31 16:05:59 +0100
committerMike McQuaid2015-02-02 15:17:31 +0000
commit473389af6170b0d63b52ca5d4f0ae28d25bfbca6 (patch)
treef1a85ac3b07a0adeb9104ea27a2c9859abd0db20 /Library
parent75a3c1fec0a3ba0495326d532eca6062178a1738 (diff)
downloadhomebrew-473389af6170b0d63b52ca5d4f0ae28d25bfbca6.tar.bz2
zorba 3.0 (new formula)
Closes #36416. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/zorba.rb36
1 files changed, 36 insertions, 0 deletions
diff --git a/Library/Formula/zorba.rb b/Library/Formula/zorba.rb
new file mode 100644
index 000000000..ab3c5957f
--- /dev/null
+++ b/Library/Formula/zorba.rb
@@ -0,0 +1,36 @@
+class Zorba < Formula
+ homepage "http://www.zorba.io/"
+ url "https://github.com/28msec/zorba/archive/3.0.tar.gz"
+ sha1 "c444cde689600aab1172b4974348dd6626e92261"
+
+ option "with-big-integer", "Use 64 bit precision instead of arbitrary precision for performance"
+ option "with-ssl-verification", "Enable SSL peer certificate verification"
+
+ depends_on :macos => :mavericks
+ depends_on "cmake" => :build
+ depends_on "swig" => :build
+ depends_on "flex"
+ depends_on "icu4c"
+ depends_on "xerces-c"
+
+ needs :cxx11
+
+ def install
+ ENV.cxx11
+ ENV["CMAKE_PREFIX_PATH"] = "#{Formula["icu4c"].prefix}:#{Formula["flex"].prefix}"
+
+ cmake_args = std_cmake_args
+ cmake_args << "-DZORBA_VERIFY_PEER_SSL_CERTIFICATE=ON" if build.with? "ssl-verification"
+ cmake_args << "-DZORBA_WITH_BIG_INTEGER=ON" if build.with? "big-integer"
+
+ mkdir "build" do
+ system "cmake", "..", *cmake_args
+ system "make", "install"
+ end
+ end
+
+ test do
+ assert_equal shell_output("#{bin}/zorba -q 1+1").strip,
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n2"
+ end
+end