From 42fd89f07a296fc41f196dab6c8e183114e8d2f7 Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Thu, 8 Feb 2024 17:05:52 +0800 Subject: [PATCH] update formula Signed-off-by: Bugen Zhao --- Formula/risingwave@1.7-single-node.rb | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/Formula/risingwave@1.7-single-node.rb b/Formula/risingwave@1.7-single-node.rb index 18d51a9..377327b 100644 --- a/Formula/risingwave@1.7-single-node.rb +++ b/Formula/risingwave@1.7-single-node.rb @@ -2,17 +2,19 @@ class RisingwaveAT17SingleNode < Formula desc "Distributed SQL database for stream processing" homepage "https://github.com/risingwavelabs/risingwave" url "https://github.com/risingwavelabs/risingwave/archive/refs/tags/v1.7.0-single-node-2.tar.gz" + version "1.7.0-single-node" sha256 "b2bc8ecf645cece604f88b7fc4e927ea655f3d4dc68938e6021bbd3567e780ff" license "Apache-2.0" head "https://github.com/risingwavelabs/risingwave.git", branch: "main" bottle do - root_url "https://github.com/risingwavelabs/homebrew-risingwave/releases/download/risingwave-1.6.0" - sha256 cellar: :any, arm64_ventura: "2541d374428a4a988666f85f5a21b4b3122ea619d914179c7c111b5b35b373e3" + root_url "https://github.com/risingwavelabs/homebrew-risingwave/releases/download/risingwave-1.6.1" + sha256 cellar: :any, arm64_ventura: "e6a85ee7b13bdf392be2c061b1ed635520c482583e440d6207ac51fae3206419" + sha256 cellar: :any, ventura: "80e09d56079de6d8b67d3f90e4ffa349fec40c114970f16d9d3da5423a6e9482" + sha256 cellar: :any, monterey: "e266368acc1eee8bc141e0638fb0a939af8779e24eaf1b346b95912e28d5e362" end depends_on "cmake" => :build - depends_on "llvm" => :build depends_on "protobuf" => :build depends_on "rustup-init" => :build depends_on "openssl@3" @@ -25,7 +27,12 @@ def install "--default-toolchain", "none" ENV.prepend_path "PATH", HOMEBREW_CACHE/"cargo_cache/bin" - ENV.delete "RUSTFLAGS" # https://github.com/Homebrew/brew/pull/15544#issuecomment-1628639703 + # Remove `RUSTFLAGS` env var set by Homebrew, or it will override the one specified + # in `.cargo/config.toml`. + # + # https://github.com/Homebrew/brew/pull/15544#issuecomment-1628639703 + ENV.delete "RUSTFLAGS" + # Homebrew changes cxx flags, and CMake doesn't pick them up, so rdkafka-sys build fails. # We cannot pass CMake flags (`std_cmake_args`) because it's in their build.rs. # @@ -33,6 +40,14 @@ def install # https://github.com/Homebrew/homebrew-core/pull/51949#issuecomment-601943075 # https://github.com/Homebrew/brew/pull/7134 ENV["SDKROOT"] = MacOS.sdk_path_if_needed + + # Remove `"-Clink-arg=xxx/ld64.lld"` to avoid dependency on LLVM. + # If we `depends_on "llvm" => :build`, it will somehow corrupt the resolution of the C++ + # compiler when building `cxx` crate. Didn't investigate further. + inreplace ".cargo/config.toml" do |s| + s.gsub!(/"-Clink-arg=.*ld64.lld",?/, "") + end + system "cargo", "install", "--bin", "risingwave", "--features", "rw-static-link",