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 7 bottle do sha256 "730c55eebd4e0e93e33b518fdbaf2f04f022e1fdf5d2ce5b696c0a5f92b0a430" => :high_sierra sha256 "23c3c79cd3d46d6edf6f2c0c6977f1fd824eaeee547e344b5708fac5de38a483" => :sierra sha256 "a572713290985b54d082556b05165f90f38848fda0cd0e1544e7934e2c3892e5" => :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 # icu4c 61.1 compatability ENV.append "CXXFLAGS", "-DU_USING_ICU_NAMESPACE=1" 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, "\n2" end end