50 lines
1.6 KiB
Ruby
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 "05eed935c0ff3626934a5a70724a42410fd93bc96aba1fa4821736210c7f1dd8"
|
|
revision 4
|
|
|
|
bottle do
|
|
sha256 "b64afbc6b0d44a2ade096466010b7e08ecb0d463f7918f79e2b3c470a8e9a0ea" => :high_sierra
|
|
sha256 "504e1d1e20c3d7d0a2e9850475dbae670bce2cc09eb48e204aa833a6b149c4b4" => :sierra
|
|
sha256 "e04c8094614b62fea672a318152f8f6a2259d01e3eee30e65b26e878e8c1137f" => :el_capitan
|
|
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
|