homebrew-core/Formula/apache-arrow.rb

65 lines
1.9 KiB
Ruby
Raw Normal View History

class ApacheArrow < Formula
desc "Columnar in-memory analytics layer designed to accelerate big data"
homepage "https://arrow.apache.org/"
url "https://archive.apache.org/dist/arrow/arrow-0.12.1/apache-arrow-0.12.1.tar.gz"
sha256 "e93e43343544e344bbc912b89da01d8abf66596f029d26b2b135b102a9e39895"
2019-03-02 15:50:27 +00:00
revision 1
2019-02-21 07:25:46 +00:00
head "https://github.com/apache/arrow.git"
2019-02-07 12:01:31 +00:00
bottle do
cellar :any
2019-03-03 19:53:54 +00:00
sha256 "f3f5de99bbc3316b6c7c87e00ceb8945fd247a7e677e6e7c9bf67d653ba68c2d" => :mojave
sha256 "c04ab30e5bcf672df66859c8179e6ced7458be0f621a3664af1b1d89ff8c46d8" => :high_sierra
sha256 "c4231003ed619cbd47cbca2bf74793576f14348b8feea8b3bf22b152dfb82d63" => :sierra
2019-02-07 12:01:31 +00:00
end
depends_on "autoconf" => :build
depends_on "cmake" => :build
depends_on "boost"
depends_on "flatbuffers"
depends_on "lz4"
depends_on "numpy"
depends_on "protobuf"
depends_on "python"
depends_on "snappy"
depends_on "thrift"
depends_on "zstd"
def install
ENV.cxx11
args = %W[
-DARROW_ORC=ON
-DARROW_PARQUET=ON
-DARROW_PLASMA=ON
-DARROW_PROTOBUF_USE_SHARED=ON
-DARROW_PYTHON=ON
-DFLATBUFFERS_HOME=#{Formula["flatbuffers"].prefix}
-DLZ4_HOME=#{Formula["lz4"].prefix}
-DPROTOBUF_HOME=#{Formula["protobuf"].prefix}
-DPYTHON_EXECUTABLE=#{Formula["python"].bin/"python3"}
-DSNAPPY_HOME=#{Formula["snappy"].prefix}
-DTHRIFT_HOME=#{Formula["thrift"].prefix}
-DZSTD_HOME=#{Formula["zstd"].prefix}
]
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