diff --git a/Aliases/protobuf@29 b/Aliases/protobuf@29 deleted file mode 120000 index eed58b3535be..000000000000 --- a/Aliases/protobuf@29 +++ /dev/null @@ -1 +0,0 @@ -../Formula/p/protobuf.rb \ No newline at end of file diff --git a/Formula/b/brpc.rb b/Formula/b/brpc.rb index 9f3fd784323e..34f06b61856f 100644 --- a/Formula/b/brpc.rb +++ b/Formula/b/brpc.rb @@ -4,15 +4,16 @@ class Brpc < Formula url "https://dlcdn.apache.org/brpc/1.12.1/apache-brpc-1.12.1-src.tar.gz" sha256 "6b315b33ae264e17e4f84bebbd4c3b7c313f5a64de7b398764c68a1dbb4a9e8e" license "Apache-2.0" + revision 1 head "https://github.com/apache/brpc.git", branch: "master" bottle do - sha256 cellar: :any, arm64_sequoia: "df58cedaa897dd10c04705d1848044f888e61e8ec91be4f53d3baabe3cb68205" - sha256 cellar: :any, arm64_sonoma: "7f25540edd6cb683afbfb7f5bd8b2691cb99b7ebe44884318e883fc563704a2b" - sha256 cellar: :any, arm64_ventura: "e01414f778fb7f10e9f6eef1018d80604d474c7107155e24c4c2544be7db76ac" - sha256 cellar: :any, sonoma: "424a6f1bf623b331a7e994f01e4e7aa9c428b932006844d6267556baa64e1ac2" - sha256 cellar: :any, ventura: "58d7a787321608a32799cd063242ad728d5ca64289652e51173385c0b53085ef" - sha256 cellar: :any_skip_relocation, x86_64_linux: "86170b8a2df17d343f671bd837046eab5320bb859f29925c3519e698a1f452d5" + sha256 cellar: :any, arm64_sequoia: "01b7b624e32ab5abbe8dd7aca55c22a5033732b5379eac5c04087b600de372f5" + sha256 cellar: :any, arm64_sonoma: "a8410a6437e519c6ff5f25522375603a18569d3438909478dc8a3c525c5935ba" + sha256 cellar: :any, arm64_ventura: "f9b1b76688f679da1eed4b5fe3ac4e5e86a62f8427391153d0914c4b495b1c1d" + sha256 cellar: :any, sonoma: "e8f6647979e2f24fbb48f544e0860689a9c0fc0820f5babcf089db7e8685e3bb" + sha256 cellar: :any, ventura: "2b8430f800339fdb0fad0f3da628241332a7d8046edc4e9062f4a32f7d6a5a3e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7c9317000db1d52c4c36a0e1bc91bac602bca630af7988f3a0931127ed667d8" end depends_on "cmake" => :build @@ -21,7 +22,7 @@ class Brpc < Formula depends_on "gperftools" depends_on "leveldb" depends_on "openssl@3" - depends_on "protobuf" + depends_on "protobuf@29" on_linux do depends_on "pkgconf" => :test @@ -84,7 +85,7 @@ def install } CPP - protobuf = Formula["protobuf"] + protobuf = Formula["protobuf@29"] gperftools = Formula["gperftools"] flags = %W[ -I#{include} diff --git a/Formula/lib/libpulsar.rb b/Formula/lib/libpulsar.rb index 85403df99481..64deaf86012a 100644 --- a/Formula/lib/libpulsar.rb +++ b/Formula/lib/libpulsar.rb @@ -5,14 +5,15 @@ class Libpulsar < Formula mirror "https://archive.apache.org/dist/pulsar/pulsar-client-cpp-3.7.0/apache-pulsar-client-cpp-3.7.0.tar.gz" sha256 "3223cfeda484ab7b580f4a8768b5a85739cc064005c765c06cde67c3238639c9" license "Apache-2.0" + revision 1 bottle do - sha256 cellar: :any, arm64_sequoia: "2762cb88dd01d626ab6dd265e2264b195133c4874b82f189ea8001a918869c7b" - sha256 cellar: :any, arm64_sonoma: "34bf8ce2ebbc5f95e33a1dc572e8f08927e8c1adb14bcb68e18b30e978baf6d6" - sha256 cellar: :any, arm64_ventura: "2aa84c52798c6a67d233b56df26029742569b882c6cca6907cbc7ab46283f3f1" - sha256 cellar: :any, sonoma: "28e17003491d94d95f5330fa8345aaea561dd9a021f30fdad0068246faf1e4b5" - sha256 cellar: :any, ventura: "b734145006bc1f4cf5697518cd9dec720c42ba7743c6d6f8e21721bc14fede9f" - sha256 cellar: :any_skip_relocation, x86_64_linux: "bcca0ff004a931852586876682e27da0345e55fea30a522c50772a15bef394f1" + sha256 cellar: :any, arm64_sequoia: "e937ba8b9230a840dff62707c799e478720b9d4a01b96c0cf112c4185df95bb3" + sha256 cellar: :any, arm64_sonoma: "90212ffaaa73f7c17c8fe95d67686bb3533285869df4adef757598ec8863f634" + sha256 cellar: :any, arm64_ventura: "7fa9b18338c6c0c89222cb85750cd42eca9af31bc8e3198125e63beedf570457" + sha256 cellar: :any, sonoma: "6707b7473cdcd2d99a4175f22f944957b2bb7017761105eb6399edecb90d472c" + sha256 cellar: :any, ventura: "eef1c13ae3c8c21c5cb4979f65f0744061295215b33a267ae59ffa83db95901f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f3f05721483717a63f13231d9009470d6354ba662ad8780dcf8662487dd3fd4f" end depends_on "asio" => :build # FIXME: Not compatible with Boost.Asio 1.87+ @@ -22,7 +23,7 @@ class Libpulsar < Formula depends_on "abseil" depends_on "openssl@3" - depends_on "protobuf" + depends_on "protobuf@29" depends_on "snappy" depends_on "zstd" diff --git a/Formula/p/protobuf@29.rb b/Formula/p/protobuf@29.rb new file mode 100644 index 000000000000..5c317075ba0a --- /dev/null +++ b/Formula/p/protobuf@29.rb @@ -0,0 +1,81 @@ +class ProtobufAT29 < Formula + desc "Protocol buffers (Google's data interchange format)" + homepage "https://protobuf.dev/" + url "https://github.com/protocolbuffers/protobuf/releases/download/v29.3/protobuf-29.3.tar.gz" + sha256 "008a11cc56f9b96679b4c285fd05f46d317d685be3ab524b2a310be0fbad987e" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/^v?(29(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "05dfe51811e39fa32877265aeb7b4cf9a094e8c5943efc3e4183757b35ac4618" + sha256 arm64_sonoma: "551d213f9eeb8dca4e54f6903a16bf07d8da1f3282bc95f0ea7768cc3401dc2d" + sha256 arm64_ventura: "7706c46083a87311e463ed1fe1276097b46ba9415eef497c6dcc2eab37323065" + sha256 cellar: :any, sonoma: "350f3ae6f097dc0225487872131b4903de6312ac91e8ac6041736ca5cbfb81a3" + sha256 cellar: :any, ventura: "74278a0c469b2a17ff8288bab8af9270c4c91c82f224bceddc61b2a55f48163c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b183bb6c8787a6719371f93a0af4c400ba138d88c13b2f68f44476012af62bc" + end + + keg_only :versioned_formula + + # Support for protoc 29.x (protobuf C++ 5.29.x) will end on 2026-03-31 + # Ref: https://protobuf.dev/support/version-support/#cpp + deprecate! date: "2026-03-31", because: :versioned_formula + + depends_on "cmake" => :build + depends_on "abseil" + uses_from_macos "zlib" + + on_macos do + # We currently only run tests on macOS. + # Running them on Linux requires rebuilding googletest with `-fPIC`. + depends_on "googletest" => :build + end + + # Backport to expose java-related symbols + patch do + url "https://github.com/protocolbuffers/protobuf/commit/9dc5aaa1e99f16065e25be4b9aab0a19bfb65ea2.patch?full_index=1" + sha256 "edc1befbc3d7f7eded6b7516b3b21e1aa339aee70e17c96ab337f22e60e154d7" + end + + def install + # Keep `CMAKE_CXX_STANDARD` in sync with the same variable in `abseil.rb`. + abseil_cxx_standard = 17 + cmake_args = %W[ + -DCMAKE_CXX_STANDARD=#{abseil_cxx_standard} + -DBUILD_SHARED_LIBS=ON + -Dprotobuf_BUILD_LIBPROTOC=ON + -Dprotobuf_BUILD_SHARED_LIBS=ON + -Dprotobuf_INSTALL_EXAMPLES=ON + -Dprotobuf_BUILD_TESTS=#{OS.mac? ? "ON" : "OFF"} + -Dprotobuf_USE_EXTERNAL_GTEST=ON + -Dprotobuf_ABSL_PROVIDER=package + -Dprotobuf_JSONCPP_PROVIDER=package + ] + + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "ctest", "--test-dir", "build", "--verbose" if OS.mac? + system "cmake", "--install", "build" + + (share/"vim/vimfiles/syntax").install "editors/proto.vim" + elisp.install "editors/protobuf-mode.el" + end + + test do + (testpath/"test.proto").write <<~PROTO + syntax = "proto3"; + package test; + message TestCase { + string name = 4; + } + message Test { + repeated TestCase case = 1; + } + PROTO + system bin/"protoc", "test.proto", "--cpp_out=." + end +end diff --git a/Formula/p/protoc-gen-grpc-web.rb b/Formula/p/protoc-gen-grpc-web.rb index caad074b125d..545bd3442c21 100644 --- a/Formula/p/protoc-gen-grpc-web.rb +++ b/Formula/p/protoc-gen-grpc-web.rb @@ -4,7 +4,7 @@ class ProtocGenGrpcWeb < Formula url "https://github.com/grpc/grpc-web/archive/refs/tags/1.5.0.tar.gz" sha256 "d3043633f1c284288e98e44c802860ca7203c7376b89572b5f5a9e376c2392d5" license "Apache-2.0" - revision 8 + revision 9 livecheck do url :stable @@ -12,12 +12,12 @@ class ProtocGenGrpcWeb < Formula end bottle do - sha256 cellar: :any, arm64_sequoia: "30dd0a651796f75265b4b0fe9bf9f054624db2d6f580046d0f8ea53f3883851f" - sha256 cellar: :any, arm64_sonoma: "260ac56d4d09cd8bcb5555dfc27ec1b0ba4163b1d14a825d1325c3a2d72acad4" - sha256 cellar: :any, arm64_ventura: "3a156731dd5f7f73438a0e03051fb35f1a3d9c1edc13a1d96e47eeb8f7042655" - sha256 cellar: :any, sonoma: "9ca144190fd8e1c91da480c8fd1ee1cdf02eeb80c5e26999d8c3632f1bb967cc" - sha256 cellar: :any, ventura: "841391e26f36ce0bae1a18ddca59b43e030faa9491c6fddd2826be22acb6104f" - sha256 cellar: :any_skip_relocation, x86_64_linux: "b6716b249cd8a3f36a35dc2538c17f2469710c282b5cff78e403dc935bd4e95d" + sha256 cellar: :any, arm64_sequoia: "693f310ef8d9d2194cea83fa0bad2d30d91b345c1b56e6c49ad88fc6c71885da" + sha256 cellar: :any, arm64_sonoma: "656c821d657141cf8e3d731a56772d37f279e2c1082ead56627e24aa69aae865" + sha256 cellar: :any, arm64_ventura: "97ce1546457ee200f4b30a41086d1eca6494ef5b24877322326023376198e8c6" + sha256 cellar: :any, sonoma: "5af8e405dd681cf89c8faac177b9d2e7924995cfa54154de41e468192042ff62" + sha256 cellar: :any, ventura: "7b9920aecb78c497559daec219359a84b6df4eb5438bc65fe05cb87fa1aaf67c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "022a78aa9b83a7745e4ef87a276c8c17442e54820bcc1fbb96df0143fef89856" end depends_on "cmake" => :build @@ -25,7 +25,7 @@ class ProtocGenGrpcWeb < Formula depends_on "node" => :test depends_on "typescript" => :test depends_on "abseil" - depends_on "protobuf" + depends_on "protobuf@29" depends_on "protoc-gen-js" # Backport of https://github.com/grpc/grpc-web/commit/2c39859be8e5bcf55eef129e5a5330149ce460ab @@ -44,7 +44,7 @@ def install test do # First use the plugin to generate the files. - testdata = <<~PROTO + (testpath/"test.proto").write <<~PROTO syntax = "proto3"; package test; message TestCase { @@ -60,10 +60,10 @@ def install rpc RunTest(Test) returns (TestResult); } PROTO - (testpath/"test.proto").write testdata - system "protoc", "test.proto", "--plugin=#{bin}/protoc-gen-grpc-web", - "--js_out=import_style=commonjs:.", - "--grpc-web_out=import_style=typescript,mode=grpcwebtext:." + protoc = Formula["protobuf@29"].bin/"protoc" + system protoc, "test.proto", "--plugin=#{bin}/protoc-gen-grpc-web", + "--js_out=import_style=commonjs:.", + "--grpc-web_out=import_style=typescript,mode=grpcwebtext:." # Now see if we can import them. (testpath/"test.ts").write <<~TYPESCRIPT diff --git a/Formula/p/protoc-gen-js.rb b/Formula/p/protoc-gen-js.rb index 169e8175eb2a..7a9f911d5bf0 100644 --- a/Formula/p/protoc-gen-js.rb +++ b/Formula/p/protoc-gen-js.rb @@ -4,21 +4,21 @@ class ProtocGenJs < Formula url "https://github.com/protocolbuffers/protobuf-javascript/archive/refs/tags/v3.21.4.tar.gz" sha256 "8cef92b4c803429af0c11c4090a76b6a931f82d21e0830760a17f9c6cb358150" license "BSD-3-Clause" - revision 7 + revision 8 head "https://github.com/protocolbuffers/protobuf-javascript.git", branch: "main" bottle do - sha256 cellar: :any, arm64_sequoia: "10a6dc802499f1666dd19e86c0edada7bbda19d07580da53e1a006539338c18b" - sha256 cellar: :any, arm64_sonoma: "c36d467208286205d4d2d146f8855b4664d5e2f94e2a986563e52a8022cffccb" - sha256 cellar: :any, arm64_ventura: "4de2c36868a911ea09814303d961351b73baa9c7cdb822e5e66b184ead56b9de" - sha256 cellar: :any, sonoma: "4432f9ef2b0d3a8d6097c4a5eb5feee2578863db91b10466a21ddc5f20ba9713" - sha256 cellar: :any, ventura: "c8a8278f6a1de7e6405d79d45fee1b10b0c0f88d38957522749ef9f69e279e70" - sha256 cellar: :any_skip_relocation, x86_64_linux: "d0f6aeb71ad79dd68b09b710f35be757f370939fc436ce7e2e232794f2f0e7c7" + sha256 cellar: :any, arm64_sequoia: "cbb18a5e1f74549805df90aeb3c51863148b745d727155e8fbe66db7e7f3c2f8" + sha256 cellar: :any, arm64_sonoma: "4a844f516417b1b7f26d0afa7201787c29774d25145b83b7db55dd20160458b8" + sha256 cellar: :any, arm64_ventura: "beda6ac3c389b97f9576a937f9f05a7d5eb080266616cbc3f5c128dc640087d0" + sha256 cellar: :any, sonoma: "b27424da44d8473270ad385e5d02b652e812f6fffbc6463bc7db9298532cfd13" + sha256 cellar: :any, ventura: "ef8957fa3237a984dd1cb5abca15f38578e2705041f54ffa98853e99b7775651" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b73db501545dd71f9d63bdac58dd15dbab247ecabcb1f20798323af9c5280d90" end depends_on "pkgconf" => :build depends_on "abseil" - depends_on "protobuf" + depends_on "protobuf@29" # We manually build rather than use Bazel as Bazel will build its own copy of Abseil # and Protobuf that get statically linked into binary. Check for any upstream changes at @@ -38,7 +38,7 @@ def install string name = 2; } PROTO - system Formula["protobuf"].bin/"protoc", "--js_out=import_style=commonjs:.", "person.proto" + system Formula["protobuf@29"].bin/"protoc", "--js_out=import_style=commonjs:.", "person.proto" assert_path_exists testpath/"person_pb.js" refute_predicate (testpath/"person_pb.js").size, :zero? end