Skip to content

Commit

Permalink
add 1.1 and 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
xxchan committed Nov 3, 2023
1 parent 0f31191 commit 96f2218
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
40 changes: 40 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
class Risingwave < Formula
RW_VERSION = "1.1.2".freeze
desc "Distributed SQL database for stream processing"
homepage "https://github.com/risingwavelabs/risingwave"
url "https://github.com/risingwavelabs/risingwave/archive/refs/tags/v#{RW_VERSION}.tar.gz"
sha256 "9f137bded84d3fe7713c4bc37674c40f6a7f1c73ef68df55a6e71f1656af5231"
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.1.2"
sha256 cellar: :any, arm64_monterey: "bc4e9742da58038881a106b2f4000f94d5ca94da96451d1b68d386f60c028894"
sha256 cellar: :any, monterey: "a23810510625b3c83fb61de6645e6b2d15c567ce1c5914ca6a872cd46aab83bc"
end

depends_on "cmake" => :build
depends_on "llvm" => :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"

ENV.delete "RUSTFLAGS" # https://github.com/Homebrew/brew/pull/15544#issuecomment-1628639703
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
46 changes: 46 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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.2.0.tar.gz"
sha256 "8dc4e3997941a31b3ff08ac0be760cbdcb840b8e40dcc99b40c2eafe346e034c"
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.2.0"
sha256 cellar: :any, arm64_ventura: "3332956802bdbc0ba1dc3246e6cf4a347ce990eb6f755203884139546151b73a"
sha256 cellar: :any, ventura: "eeea7521801328f50fdf8a00bc222eed11a06b0f7a2de118e9a052af957e21d4"
end

depends_on "cmake" => :build
depends_on "llvm" => :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"

ENV.delete "RUSTFLAGS" # https://github.com/Homebrew/brew/pull/15544#issuecomment-1628639703
# 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
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 96f2218

Please sign in to comment.