Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions Formula/p/protoc-gen-js.rb
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
class ProtocGenJs < Formula
desc "Protocol buffers JavaScript generator plugin"
homepage "https://github.com/protocolbuffers/protobuf-javascript"
url "https://github.com/protocolbuffers/protobuf-javascript/archive/refs/tags/v4.0.1.tar.gz"
sha256 "123fac2e86109b24e80ccd356aa914e268bf5863ad1354d224d6ceaed6f5c45b"
url "https://github.com/protocolbuffers/protobuf-javascript/archive/refs/tags/v4.0.2.tar.gz"
sha256 "a08244115ed0535971ec894abf078da90ad2c0938700612f90dc550f218627ee"
license "BSD-3-Clause"
revision 2
head "https://github.com/protocolbuffers/protobuf-javascript.git", branch: "main"

bottle do
sha256 cellar: :any, arm64_tahoe: "ca12ea6599efeedd3cf511a173e37da21b84df144d9735e2507255470d593bed"
sha256 cellar: :any, arm64_sequoia: "205d481940df0d700e1d9c4c3d558a0e99292c2dab5a3326c3f52d1b11f42946"
sha256 cellar: :any, arm64_sonoma: "2bf6a22e1ec1b538178affd2df7b0076e7d9a3e4a26c8187640446a8822b92c6"
sha256 cellar: :any, sonoma: "3eada4b863ae7e2981a9665904cb60d4253c81448f3897c52e5bb07c04b72a8b"
sha256 cellar: :any_skip_relocation, arm64_linux: "c9fe1dc5f351a6ea94d9b632e1349255fed5ab8f388bb7509a9dac29c54f55b9"
sha256 cellar: :any_skip_relocation, x86_64_linux: "4ab4081275b0bafb529632cb95698ecdddf7f912b4a57135d561c6e6f421dd04"
sha256 cellar: :any, arm64_tahoe: "16e55d7c88f0fb3e16aae2220f54a00fb93cf32350afe1631884452e7e02584f"
sha256 cellar: :any, arm64_sequoia: "1a736dd76989d61a4f4148088ca8e7b4178240d10fcf1b558f03e78e6f97930a"
sha256 cellar: :any, arm64_sonoma: "692ee1c3eb53ab457bc70cf4ebe56360c6d1052e3f66b1d60c4c28eafb7a3aa2"
sha256 cellar: :any, sonoma: "89f23b91a5cff99b988237ef831f7a4237ac947d61e42fe5a4662bad2c5f933a"
sha256 cellar: :any_skip_relocation, arm64_linux: "fc8bfc5662384fe1c6b0eacd40c10523447459cfd652996fdfdacc89de6f748f"
sha256 cellar: :any_skip_relocation, x86_64_linux: "600621ff129fd4511f9d6bb7d83164ac834c57daa61c919e6526285c0e7fe943"
end

depends_on "node" => :build
depends_on "pkgconf" => :build
depends_on "abseil"
depends_on "protobuf"
Expand All @@ -25,9 +23,11 @@ class ProtocGenJs < Formula
# and Protobuf that get statically linked into binary. Check for any upstream changes at
# https://github.com/protocolbuffers/protobuf-javascript/blob/main/generator/BUILD.bazel
def install
system "node", "generate-version-header.js", "generator/version.h"
system ENV.cxx, "-std=c++17", "generator/generate-version-header.cc", "-o", "generate-version-header"
system "./generate-version-header", "package.json", "generator/version.h"
protobuf_flags = Utils.safe_popen_read("pkgconf", "--cflags", "--libs", "protobuf").chomp.split.uniq
system ENV.cxx, "-std=c++17", *Dir["generator/*.cc"], "-o", "protoc-gen-js", "-I.", *protobuf_flags, "-lprotoc"
system ENV.cxx, "-std=c++17", "generator/js_generator.cc", "generator/protoc-gen-js.cc",
"generator/well_known_types_embed.cc", "-o", "protoc-gen-js", "-I.", *protobuf_flags, "-lprotoc"
bin.install "protoc-gen-js"
end

Expand Down
Loading