diff options
author | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-07-22 06:48:47 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-07-22 07:44:01 +0700 |
commit | 6ed3e28d089aaacfcaaf24ecdf771859b2196441 (patch) | |
tree | 62c70bc8fb0920f0e89cb7edcea76fd8f308fc9b /libraries | |
parent | a73263ad3842a91881d6d8213e62c61d12461116 (diff) |
libraries/protobuf-c: Remove faulty patch.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/protobuf-c/711.patch | 51 | ||||
-rw-r--r-- | libraries/protobuf-c/protobuf-c.SlackBuild | 2 |
2 files changed, 1 insertions, 52 deletions
diff --git a/libraries/protobuf-c/711.patch b/libraries/protobuf-c/711.patch index a26633a54e71..1be8f50fa5ef 100644 --- a/libraries/protobuf-c/711.patch +++ b/libraries/protobuf-c/711.patch @@ -116,54 +116,3 @@ index 062d330b..be28b601 100644 // Work around changes in protobuf >= 22.x without breaking compilation against -From d95aced22df60a2f0049fc03af48c8b02ce4d474 Mon Sep 17 00:00:00 2001 -From: Robert Edmonds <edmonds@users.noreply.github.com> -Date: Wed, 20 Mar 2024 22:43:30 -0400 -Subject: [PATCH 3/3] CGenerator: Protect against being invoked against - "edition" syntax .proto files - -The Google protobuf project is currently experimenting with a new syntax -for .proto files called "editions". Since protobuf-c is a proto2/proto3 -compiler, after the previous commit reimplementing `FieldSyntax()`, the -protobuf compiler will abort like this if presented with an "editions" -syntax .proto file due to the safety check in `FieldSyntax()`: - - $ protoc --experimental_editions --c_out=. test.proto - protoc-gen-c: ./protoc-c/c_helpers.h:178: int google::protobuf::compiler::c::FieldSyntax(const google::protobuf::FieldDescriptor*): Assertion `syntax == "proto2" || syntax == "proto3"' failed. - --c_out: protoc-gen-c: Plugin killed by signal 6. - -On protobuf 26, our `CodeGenerator` can implement certain methods to -declare that we "support" editions, and then reject any other edition -except proto2 and proto3, which have apparently been retroactively -declared to be "editions". Of course this needs to be wrapped in a -version guard. - -With this protection in place, the protobuf compiler cleanly exits with -a nice error message like this: - - $ protoc --experimental_editions --c_out=. test.proto - WARNING: All log messages before absl::InitializeLog() is called are written to STDERR - E0000 00:00:1710988958.296200 20022 descriptor.cc:4620] Invalid proto descriptor for file "test.proto": - E0000 00:00:1710988958.296239 20022 descriptor.cc:4623] test.proto: Edition 2023 is later than the maximum supported edition PROTO3 - --c_out: protoc-gen-c: Plugin failed with status code 1. ---- - protoc-c/c_generator.h | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/protoc-c/c_generator.h b/protoc-c/c_generator.h -index b8b44aaa..4aeb5790 100644 ---- a/protoc-c/c_generator.h -+++ b/protoc-c/c_generator.h -@@ -93,6 +93,12 @@ class PROTOC_C_EXPORT CGenerator : public CodeGenerator { - const std::string& parameter, - OutputDirectory* output_directory, - std::string* error) const; -+ -+#if GOOGLE_PROTOBUF_VERSION >= 5026000 -+ uint64_t GetSupportedFeatures() const { return CodeGenerator::FEATURE_SUPPORTS_EDITIONS; } -+ Edition GetMinimumEdition() const { return Edition::EDITION_PROTO2; } -+ Edition GetMaximumEdition() const { return Edition::EDITION_PROTO3; } -+#endif - }; - - } // namespace c diff --git a/libraries/protobuf-c/protobuf-c.SlackBuild b/libraries/protobuf-c/protobuf-c.SlackBuild index dd82091e380e..49d1beab69a5 100644 --- a/libraries/protobuf-c/protobuf-c.SlackBuild +++ b/libraries/protobuf-c/protobuf-c.SlackBuild @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=protobuf-c VERSION=${VERSION:-1.5.0} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} |