Skip to content

Commit

Permalink
GH-36582: [CI][C++][Homebrew] Backport the latest formula changes (#3…
Browse files Browse the repository at this point in the history
…6583)

### Rationale for this change

Most Homebrew formulae use OpenSSL v3 for now.

### What changes are included in this PR?

Backport the latest formulae changes including OpenSSL version change.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: #36582

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
kou authored Jul 10, 2023
1 parent 2a2c253 commit dc5e23e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 36 deletions.
18 changes: 6 additions & 12 deletions dev/tasks/homebrew-formulae/apache-arrow-glib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ApacheArrowGlib < Formula
url "https://www.apache.org/dyn/closer.lua?path=arrow/arrow-13.0.0-SNAPSHOT/apache-arrow-13.0.0-SNAPSHOT.tar.gz"
sha256 "9948ddb6d4798b51552d0dca3252dd6e3a7d0f9702714fc6f5a1b59397ce1d28"
license "Apache-2.0"
head "https://github.com/apache/arrow.git"
head "https://github.com/apache/arrow.git", branch: "main"

livecheck do
formula "apache-arrow"
Expand All @@ -46,18 +46,12 @@ class ApacheArrowGlib < Formula
depends_on "apache-arrow"
depends_on "glib"

on_linux do
depends_on "gcc"
end

fails_with gcc: "5"

def install
mkdir "build" do
system "meson", *std_meson_args, "-Dvapi=true", "../c_glib"
system "ninja", "-v"
system "ninja", "install", "-v"
end
system "meson", "setup", "build", "c_glib", *std_meson_args, "-Dvapi=true"
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
end

test do
Expand All @@ -82,9 +76,9 @@ def install
-DNDEBUG
-larrow-glib
-larrow
-lglib-2.0
-lgobject-2.0
-lgio-2.0
-lgobject-2.0
-lglib-2.0
]
system ENV.cc, "test.c", "-o", "test", *flags
system "./test"
Expand Down
36 changes: 12 additions & 24 deletions dev/tasks/homebrew-formulae/apache-arrow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,57 +32,49 @@ class ApacheArrow < Formula
url "https://www.apache.org/dyn/closer.lua?path=arrow/arrow-13.0.0-SNAPSHOT/apache-arrow-13.0.0-SNAPSHOT.tar.gz"
sha256 "9948ddb6d4798b51552d0dca3252dd6e3a7d0f9702714fc6f5a1b59397ce1d28"
license "Apache-2.0"
head "https://github.com/apache/arrow.git"
head "https://github.com/apache/arrow.git", branch: "main"

depends_on "boost" => :build
depends_on "cmake" => :build
depends_on "llvm" => :build
depends_on "llvm@15" => :build
depends_on "aws-sdk-cpp"
depends_on "brotli"
depends_on "bzip2"
depends_on "glog"
depends_on "grpc"
depends_on "lz4"
depends_on "numpy"
depends_on "openssl@1.1"
depends_on "mimalloc"
depends_on "openssl@3"
depends_on "protobuf"
depends_on "[email protected]"
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
uses_from_macos "python" => :build

fails_with gcc: "5"

def install
python = "python3.10"

# https://github.com/Homebrew/homebrew-core/issues/76537
ENV.runtime_cpu_detection if Hardware::CPU.intel?

# https://github.com/Homebrew/homebrew-core/issues/94724
# https://issues.apache.org/jira/browse/ARROW-15664
ENV["HOMEBREW_OPTIMIZATION_LEVEL"] = "O2"

# link against system libc++ instead of llvm provided libc++
ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib
args = %W[
-DCMAKE_INSTALL_RPATH=#{rpath}
-DARROW_ACERO=ON
-DARROW_COMPUTE=ON
-DARROW_CSV=ON
-DARROW_DATASET=ON
-DARROW_FILESYSTEM=ON
-DARROW_FLIGHT=ON
-DARROW_FLIGHT_SQL=ON
-DARROW_GANDIVA=ON
-DARROW_GCS=ON
-DARROW_HDFS=ON
-DARROW_INSTALL_NAME_RPATH=OFF
-DARROW_JEMALLOC=ON
-DARROW_JSON=ON
-DARROW_MIMALLOC=ON
-DARROW_ORC=ON
Expand All @@ -96,16 +88,12 @@ def install
-DARROW_WITH_UTF8PROC=ON
-DARROW_WITH_ZLIB=ON
-DARROW_WITH_ZSTD=ON
-DCMAKE_CXX_STANDARD=17
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=TRUE
-DPython3_EXECUTABLE=#{which(python)}
-DPARQUET_BUILD_EXECUTABLES=ON
]

mkdir "build" do
system "cmake", "../cpp", *std_cmake_args, *args
system "make"
system "make", "install"
end
system "cmake", "-S", "cpp", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end

test do
Expand Down

0 comments on commit dc5e23e

Please sign in to comment.