92 lines
3.0 KiB
Ruby
92 lines
3.0 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.lua?path=arrow/arrow-10.0.1/apache-arrow-10.0.1.tar.gz"
|
|
mirror "https://archive.apache.org/dist/arrow/arrow-10.0.1/apache-arrow-10.0.1.tar.gz"
|
|
sha256 "c814e0670112a22c1a6ec03ab420a52ae236a9a42e9e438c3cbd37f37e658fb3"
|
|
license "Apache-2.0"
|
|
revision 3
|
|
head "https://github.com/apache/arrow.git", branch: "master"
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_ventura: "ed9b00a6cee18589331530aedafd7e3d7d7a1bd8bbc2d9e81c002030d18d3f64"
|
|
sha256 cellar: :any, arm64_monterey: "aa01c339202a3f980259fc118236511531cb0d1df81f4f91e25ca85b27e55128"
|
|
sha256 cellar: :any, arm64_big_sur: "08cf4014c5e801662e0eab2a5cffbd83677657f01149cbc15fe44b9eb7f153e7"
|
|
sha256 cellar: :any, ventura: "72037c1cdd16c32ca94756d50c53cf15365e3b1cb735c9a9c6722254b6126d59"
|
|
sha256 cellar: :any, monterey: "2d3cd0e726c342fc3f3730d320e93658e0148b79da6c1a44e9f257a9f3e0ec21"
|
|
sha256 cellar: :any, big_sur: "bb3a5e287a91a0cbbf08b1d813f601e19c38da334f024f6df2fd34e7813381ba"
|
|
sha256 x86_64_linux: "ef8da52c0fefee4c5c2b67b0be0ed352209eb37aae7436047e25c90ae028790f"
|
|
end
|
|
|
|
depends_on "boost" => :build
|
|
depends_on "cmake" => :build
|
|
depends_on "llvm" => :build
|
|
depends_on "aws-sdk-cpp"
|
|
depends_on "brotli"
|
|
depends_on "bzip2"
|
|
depends_on "glog"
|
|
depends_on "grpc"
|
|
depends_on "lz4"
|
|
depends_on "openssl@1.1"
|
|
depends_on "protobuf"
|
|
depends_on "rapidjson"
|
|
depends_on "re2"
|
|
depends_on "snappy"
|
|
depends_on "thrift"
|
|
depends_on "utf8proc"
|
|
depends_on "z3"
|
|
depends_on "zstd"
|
|
|
|
fails_with gcc: "5"
|
|
|
|
def install
|
|
# https://github.com/Homebrew/homebrew-core/issues/76537
|
|
ENV.runtime_cpu_detection if Hardware::CPU.intel?
|
|
|
|
args = %W[
|
|
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=TRUE
|
|
-DCMAKE_INSTALL_RPATH=#{rpath}
|
|
-DARROW_COMPUTE=ON
|
|
-DARROW_CSV=ON
|
|
-DARROW_DATASET=ON
|
|
-DARROW_FILESYSTEM=ON
|
|
-DARROW_FLIGHT=ON
|
|
-DARROW_FLIGHT_SQL=ON
|
|
-DARROW_GANDIVA=ON
|
|
-DARROW_HDFS=ON
|
|
-DARROW_JSON=ON
|
|
-DARROW_ORC=ON
|
|
-DARROW_PARQUET=ON
|
|
-DARROW_PLASMA=ON
|
|
-DARROW_PROTOBUF_USE_SHARED=ON
|
|
-DARROW_S3=ON
|
|
-DARROW_WITH_BZ2=ON
|
|
-DARROW_WITH_ZLIB=ON
|
|
-DARROW_WITH_ZSTD=ON
|
|
-DARROW_WITH_LZ4=ON
|
|
-DARROW_WITH_SNAPPY=ON
|
|
-DARROW_WITH_BROTLI=ON
|
|
-DARROW_WITH_UTF8PROC=ON
|
|
-DARROW_INSTALL_NAME_RPATH=OFF
|
|
]
|
|
|
|
args << "-DARROW_MIMALLOC=ON" unless Hardware::CPU.arm?
|
|
|
|
system "cmake", "-S", "cpp", "-B", "build", *args, *std_cmake_args
|
|
system "cmake", "--build", "build"
|
|
system "cmake", "--install", "build"
|
|
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++17", "-I#{include}", "-L#{lib}", "-larrow", "-o", "test"
|
|
system "./test"
|
|
end
|
|
end
|