Skip to content

Commit

Permalink
Merge branch 'main' into kwannoel/bump
Browse files Browse the repository at this point in the history
  • Loading branch information
BugenZhao authored Mar 1, 2024
2 parents 15c1511 + 49b41b6 commit cb92735
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Formula/risingwave.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
class Risingwave < Formula
desc "Distributed SQL database for stream processing"
homepage "https://github.com/risingwavelabs/risingwave"
url "https://github.com/risingwavelabs/risingwave/archive/refs/tags/v1.6.1.tar.gz"
sha256 "7a06fed4eb480572c16718c2c15f0938ad3a29e1bea15a568d673dcd02c428de"
url "https://github.com/risingwavelabs/risingwave/archive/refs/tags/v1.7.0.tar.gz"
sha256 "139d9b0947618ce711000b0a22bb05a0e3ce90f103e8f2f7e573dee485c2a6ad"
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.1"
sha256 cellar: :any, arm64_ventura: "e6a85ee7b13bdf392be2c061b1ed635520c482583e440d6207ac51fae3206419"
sha256 cellar: :any, ventura: "80e09d56079de6d8b67d3f90e4ffa349fec40c114970f16d9d3da5423a6e9482"
sha256 cellar: :any, monterey: "e266368acc1eee8bc141e0638fb0a939af8779e24eaf1b346b95912e28d5e362"
root_url "https://github.com/risingwavelabs/homebrew-risingwave/releases/download/risingwave-1.7.0"
sha256 cellar: :any, arm64_ventura: "806608d43ccb5cb84a2b540c87531985041c1a4db2f287b36210d40b5677a2f0"
sha256 cellar: :any, ventura: "388299a0f9cf8e2401438024a68976b6a9c435bd9d1f8cb704b51e4f1ae510a1"
sha256 cellar: :any, monterey: "60f44731045faa1f7fd28ea5a1eb66116bc238ea176ec413a62716c46b603d9e"
end

depends_on "cmake" => :build
Expand Down
59 changes: 59 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
class RisingwaveAT16 < Formula
desc "Distributed SQL database for stream processing"
homepage "https://github.com/risingwavelabs/risingwave"
url "https://github.com/risingwavelabs/risingwave/archive/refs/tags/v1.6.1.tar.gz"
sha256 "7a06fed4eb480572c16718c2c15f0938ad3a29e1bea15a568d673dcd02c428de"
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.1"
sha256 cellar: :any, arm64_ventura: "e6a85ee7b13bdf392be2c061b1ed635520c482583e440d6207ac51fae3206419"
sha256 cellar: :any, ventura: "80e09d56079de6d8b67d3f90e4ffa349fec40c114970f16d9d3da5423a6e9482"
sha256 cellar: :any, monterey: "e266368acc1eee8bc141e0638fb0a939af8779e24eaf1b346b95912e28d5e362"
end

depends_on "cmake" => :build
depends_on "protobuf" => :build
depends_on "rustup-init" => :build
depends_on "openssl@3"
depends_on "xz"

def install
# this will install the necessary cargo/rustup toolchain bits in HOMEBREW_CACHE
system "#{Formula["rustup-init"].bin}/rustup-init",
"-qy", "--no-modify-path",
"--default-toolchain", "none"
ENV.prepend_path "PATH", HOMEBREW_CACHE/"cargo_cache/bin"

# 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.
#
# Some refs that might be useful:
# 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",
*std_cargo_args(path: "src/cmd_all") # "--locked", "--root ...", "--path src/cmd_all"
end

test do
system "#{bin}/risingwave", "--help"
end
end

0 comments on commit cb92735

Please sign in to comment.