homebrew-core/Formula/apache-arrow.rb

94 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-6.0.1/apache-arrow-6.0.1.tar.gz"
mirror "https://archive.apache.org/dist/arrow/arrow-6.0.1/apache-arrow-6.0.1.tar.gz"
sha256 "3786b3d2df954d078b3e68f98d2e5aecbaa3fa2accf075d7a3a13c187b9c5294"
license "Apache-2.0"
revision 4
head "https://github.com/apache/arrow.git", branch: "master"
bottle do
sha256 cellar: :any, arm64_monterey: "d9ab25957149237308840f27485cc537dba7fd5410af077859dad8f0818a0251"
sha256 cellar: :any, arm64_big_sur: "1a8121013971685d36f998a801984782a779b58e630773b89cf12130a7bfca14"
sha256 cellar: :any, monterey: "46f35038849533309ccf1c66302f504082ac90d6cf78463f623d2d8c5e8466a4"
sha256 cellar: :any, big_sur: "315f0de7456659208b61e4a2b5a2ba6c4536e332fabe6592129325b745e4b97b"
sha256 cellar: :any, catalina: "5ab4c2618283afed2cf95557431250d571ecb031099f52404c6d9876e80106f3"
sha256 cellar: :any_skip_relocation, x86_64_linux: "1cd2ee89560b65fcde5e8fd0d2cb4c6028b3dfca943972aaac1247d42710daa5"
end
depends_on "boost" => :build
depends_on "cmake" => :build
depends_on "llvm" => :build
depends_on "aws-sdk-cpp"
depends_on "brotli"
depends_on "glog"
depends_on "grpc"
depends_on "lz4"
depends_on "numpy"
depends_on "openssl@1.1"
depends_on "protobuf"
depends_on "python@3.9"
depends_on "rapidjson"
depends_on "re2"
depends_on "snappy"
depends_on "thrift"
depends_on "utf8proc"
depends_on "zstd"
on_linux do
depends_on "gcc"
end
fails_with gcc: "5"
def install
# https://github.com/Homebrew/homebrew-core/issues/76537
ENV.runtime_cpu_detection if Hardware::CPU.intel?
# link against system libc++ instead of llvm provided libc++
ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib
args = %W[
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=TRUE
-DARROW_FLIGHT=ON
-DARROW_GANDIVA=ON
-DARROW_JEMALLOC=ON
-DARROW_ORC=ON
-DARROW_PARQUET=ON
-DARROW_PLASMA=ON
-DARROW_PROTOBUF_USE_SHARED=ON
-DARROW_PYTHON=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
-DPython3_EXECUTABLE=#{Formula["python@3.9"].bin/"python3"}
]
args << "-DARROW_MIMALLOC=ON" unless Hardware::CPU.arm?
mkdir "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