homebrew-core/Formula/zorba.rb
2016-12-26 05:22:02 -08:00

50 lines
1.6 KiB
Ruby

class Zorba < Formula
desc "NoSQL query processor"
homepage "http://www.zorba.io/"
url "https://github.com/28msec/zorba/archive/3.1.tar.gz"
sha256 "a27e8160aca5d3aa5a6525b930da7edde44f8824dd4fba39aaef3b9af2717b74"
revision 2
bottle do
sha256 "a42289309f9841d0a31face0a632eebe7d076437a4b5f42b4098daa2dcca6258" => :sierra
sha256 "7beb51d3f23e62f16b64ed6fdce8d03f6d4ffc7f1e5cc22f47ff79dd8e571e3f" => :el_capitan
sha256 "2a1dba60f65cd722870df5239bfe3cdb5d5a75b1315fe20342228907efdf1b00" => :yosemite
end
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 "flex"
depends_on "icu4c"
depends_on "xerces-c"
conflicts_with "xqilla", :because => "Both supply xqc.h"
needs :cxx11
def install
ENV.cxx11
args = std_cmake_args
args << "-DZORBA_VERIFY_PEER_SSL_CERTIFICATE=ON" if build.with? "ssl-verification"
args << "-DZORBA_WITH_BIG_INTEGER=ON" if build.with? "big-integer"
# dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
# usual superenv fix doesn't work since zorba doesn't use HAVE_CLOCK_GETTIME
if MacOS.version == :el_capitan && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0"
args << "-DZORBA_HAVE_CLOCKGETTIME=OFF"
end
mkdir "build" do
system "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