homebrew-core/Formula/apache-arrow.rb
2019-08-24 01:07:03 -07:00

66 lines
1.8 KiB
Ruby

class ApacheArrow < Formula
desc "Columnar in-memory analytics layer designed to accelerate big data"
homepage "https://arrow.apache.org/"
url "https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-0.14.1/apache-arrow-0.14.1.tar.gz"
sha256 "9948ddb6d4798b51552d0dca3252dd6e3a7d0f9702714fc6f5a1b59397ce1d28"
revision 1
head "https://github.com/apache/arrow.git"
bottle do
cellar :any
sha256 "a7d597453a8d4c70af82cd42f4aa0a3f0af04ab26dba23a117f9c966f0b2a224" => :mojave
sha256 "e5f1841ad99528cee1defd3e51f573738c3fcc0723d622d433af4c8c6e799b24" => :high_sierra
sha256 "1064f48f13f70f1a1aa9ea71b7ace360cad0ba9aa4b7d80aa5fbf9bbcb18fe90" => :sierra
end
depends_on "autoconf" => :build
depends_on "cmake" => :build
depends_on "boost"
depends_on "brotli"
depends_on "double-conversion"
depends_on "flatbuffers"
depends_on "glog"
depends_on "grpc"
depends_on "lz4"
depends_on "numpy"
depends_on "openssl"
depends_on "protobuf"
depends_on "python"
depends_on "rapidjson"
depends_on "snappy"
depends_on "thrift"
depends_on "zstd"
def install
ENV.cxx11
args = %W[
-DARROW_FLIGHT=ON
-DARROW_ORC=ON
-DARROW_PARQUET=ON
-DARROW_PLASMA=ON
-DARROW_PROTOBUF_USE_SHARED=ON
-DARROW_PYTHON=ON
-DARROW_INSTALL_NAME_RPATH=OFF
-DPYTHON_EXECUTABLE=#{Formula["python"].bin/"python3"}
]
mkdir "build"
cd "build" do
system "cmake", "../cpp", *std_cmake_args, *args
system "make"
system "make", "install"
end
end
test do
(testpath/"test.cpp").write <<~EOS
#include "arrow/api.h"
int main(void) {
arrow::int64();
return 0;
}
EOS
system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", "-L#{lib}", "-larrow", "-o", "test"
system "./test"
end
end