From nobody Thu Dec 14 17:03:27 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrdwH72cBz52kpb; Thu, 14 Dec 2023 17:03:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SrdwH6tcWz3YnH; Thu, 14 Dec 2023 17:03:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702573407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aQEIu1aEGpAWn7VmZWpSIGxawRbcoyGJffOT0/FEI6A=; b=jah/+f8yRNhlTC7/yzlTAtfGHDldLycnzJAYHeANf3fyPmmW44YkZ1qtLRsco/2w5qEMY4 80tC86jsvddz4b53KlolHzGI+e5OUoE1/e3KGXqw6gH1A+RcVji4+wQXP4HlAN7KGP9WR+ /E5PHx67Fi/a//a3g7RqRYn9k/STyrBCmROYI4qZsgzb5jOQjIYXXGYEt3TJmqKDAxP7WV yhZbNqS3SgQjiqCSlHg25hZ9bLd9F+8AVxZjez5v9NQPj6/TmPoyGDQLM9jp8bDPzS9ru0 orU48lktFsFVCRCQi7S15oQqeNq/ZrlHGL9xNdkCXgvWwrGChldDg2CNkLxn+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702573407; a=rsa-sha256; cv=none; b=s3lVYDlVxOONO2LRnamfqDfq2kJ8NOsJQZ6bqBQb5o7LEcBX6mylHmjBLOfWYxp+xI7CQA B/gGvo0xGpg6GmtJFIZpB5mNdqJyLF9YLZ8XMiRKISy8NUQGfxKf1LYaE+hW7onf6v6w0v 7R4Yews89QT2WnMT2yYlbg+Alhchj6+XdJBQK+9XO0jUev2TXUuoEdo8YXTw4HNZOffzpK txVZTOdeaqJy8aHS29wZnfewKj9KW2lwOMIHJtUyKpfUC+vlDTxws2JzsDgefoROfoR4wb GDmGMCTqW6eCotHHiagNhjujEZyVbQLEYOFIDBCVO/bA53qpjs3YfGd1cYuIoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702573407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aQEIu1aEGpAWn7VmZWpSIGxawRbcoyGJffOT0/FEI6A=; b=g5teOp3iNYvh/+fV5i2RFHfCrPweqgpADohit6idppAy7WY5gNK/aV+Xx85jel+LbLDEGy hKNdrCWTcFnqi6CpAL72qJZhnPTkTWbykuIk1ISafRiTyBMotbyXmv7aFKU4F9+jk2OolS V9vblEvemk2S3ayxi2W1SVkeq+1TXdogN82525C90gBqz8m+yodbzwn6ADTRnTm/HvHczA Un0I9v/WxcCaZUQn1uwQtLS/Dwr61dWOsuBgaifjsIZisyCyMhfkcvh4rh0U32y3MGNpz2 l363U00Y7pJgu/yoog2hTeV0Wm0viiFecsmfGNZVjORx9Kxh5hUBA38Qz0dMXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrdwH5rmGzbml; Thu, 14 Dec 2023 17:03:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BEH3RAg016702; Thu, 14 Dec 2023 17:03:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEH3Ru9016699; Thu, 14 Dec 2023 17:03:27 GMT (envelope-from git) Date: Thu, 14 Dec 2023 17:03:27 GMT Message-Id: <202312141703.3BEH3Ru9016699@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 3918a452589b - main - devel/protobuf-c: Fix build with protobuf 22+ List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3918a452589b579c1a84148c8e1eeba2b7c5ea5b Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=3918a452589b579c1a84148c8e1eeba2b7c5ea5b commit 3918a452589b579c1a84148c8e1eeba2b7c5ea5b Author: Po-Chuan Hsieh AuthorDate: 2023-12-14 16:22:28 +0000 Commit: Po-Chuan Hsieh CommitDate: 2023-12-14 17:03:04 +0000 devel/protobuf-c: Fix build with protobuf 22+ Reference: https://github.com/protobuf-c/protobuf-c/commit/69fc2f13bb66d24ed509d099df5da23bf3846534 --- devel/protobuf-c/Makefile | 4 +- devel/protobuf-c/files/patch-protobuf | 505 ++++++++++++++++++++++++++++++++++ 2 files changed, 508 insertions(+), 1 deletion(-) diff --git a/devel/protobuf-c/Makefile b/devel/protobuf-c/Makefile index 051a9ea6e181..d4185e2bceae 100644 --- a/devel/protobuf-c/Makefile +++ b/devel/protobuf-c/Makefile @@ -13,12 +13,14 @@ LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libprotobuf.so:devel/protobuf -USES= compiler:c++11-lang gmake libtool pkgconfig +USES= compiler:c++17-lang gmake libtool pkgconfig + GNU_CONFIGURE= yes USE_LDCONFIG= yes INSTALL_TARGET= install-strip TEST_TARGET= check +USE_CXXSTD= c++17 PORTDOCS= * CONFIGURE_ARGS= --disable-static diff --git a/devel/protobuf-c/files/patch-protobuf b/devel/protobuf-c/files/patch-protobuf new file mode 100644 index 000000000000..524128702743 --- /dev/null +++ b/devel/protobuf-c/files/patch-protobuf @@ -0,0 +1,505 @@ +--- configure.orig 2022-07-11 01:35:23 UTC ++++ configure +@@ -683,7 +683,7 @@ BUILD_COMPILER_TRUE + PROTOC + protobuf_LIBS + protobuf_CFLAGS +-HAVE_CXX11 ++HAVE_CXX17 + pkgconfigdir + PKG_CONFIG_LIBDIR + PKG_CONFIG_PATH +@@ -17724,7 +17724,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAG + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +- ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true ++ ax_cxx_compile_alternatives="17 1z" ax_cxx_compile_cxx17_required=true + ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +@@ -17737,9 +17737,9 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test x$ac_success = xno; then + for alternative in ${ax_cxx_compile_alternatives}; do + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do +- cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 +-printf %s "checking whether $CXX supports C++11 features with $switch... " >&6; } ++ cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh` ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5 ++printf %s "checking whether $CXX supports C++17 features with $switch... " >&6; } + if eval test \${$cachevar+y} + then : + printf %s "(cached) " >&6 +@@ -18067,19 +18067,19 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_e + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +- if test x$ax_cxx_compile_cxx11_required = xtrue; then ++ if test x$ax_cxx_compile_cxx17_required = xtrue; then + if test x$ac_success = xno; then +- as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 ++ as_fn_error $? "*** A compiler with support for C++17 language features is required." "$LINENO" 5 + fi + fi + if test x$ac_success = xno; then +- HAVE_CXX11=0 +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 +-printf "%s\n" "$as_me: No compiler with C++11 support was found" >&6;} ++ HAVE_CXX17=0 ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++17 support was found" >&5 ++printf "%s\n" "$as_me: No compiler with C++17 support was found" >&6;} + else +- HAVE_CXX11=1 ++ HAVE_CXX17=1 + +-printf "%s\n" "#define HAVE_CXX11 1" >>confdefs.h ++printf "%s\n" "#define HAVE_CXX17 1" >>confdefs.h + + fi + +@@ -18144,67 +18144,8 @@ fi + # Put the nasty error message in config.log where it belongs + echo "$protobuf_PKG_ERRORS" >&5 + ++ as_fn_error $? "Package requirements (protobuf >= 3.0.0) were not met: + +-pkg_failed=no +-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for protobuf" >&5 +-printf %s "checking for protobuf... " >&6; } +- +-if test -n "$protobuf_CFLAGS"; then +- pkg_cv_protobuf_CFLAGS="$protobuf_CFLAGS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"protobuf >= 2.6.0\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "protobuf >= 2.6.0") 2>&5 +- ac_status=$? +- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_protobuf_CFLAGS=`$PKG_CONFIG --cflags "protobuf >= 2.6.0" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes +-else +- pkg_failed=yes +-fi +- else +- pkg_failed=untried +-fi +-if test -n "$protobuf_LIBS"; then +- pkg_cv_protobuf_LIBS="$protobuf_LIBS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"protobuf >= 2.6.0\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "protobuf >= 2.6.0") 2>&5 +- ac_status=$? +- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_protobuf_LIBS=`$PKG_CONFIG --libs "protobuf >= 2.6.0" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes +-else +- pkg_failed=yes +-fi +- else +- pkg_failed=untried +-fi +- +- +- +-if test $pkg_failed = yes; then +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-printf "%s\n" "no" >&6; } +- +-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then +- _pkg_short_errors_supported=yes +-else +- _pkg_short_errors_supported=no +-fi +- if test $_pkg_short_errors_supported = yes; then +- protobuf_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "protobuf >= 2.6.0" 2>&1` +- else +- protobuf_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "protobuf >= 2.6.0" 2>&1` +- fi +- # Put the nasty error message in config.log where it belongs +- echo "$protobuf_PKG_ERRORS" >&5 +- +- as_fn_error $? "Package requirements (protobuf >= 2.6.0) were not met: +- + $protobuf_PKG_ERRORS + + Consider adjusting the PKG_CONFIG_PATH environment variable if you +@@ -18228,109 +18169,6 @@ See the pkg-config man page for more details. + + To get pkg-config, see . + See \`config.log' for more details" "$LINENO" 5; } +-else +- protobuf_CFLAGS=$pkg_cv_protobuf_CFLAGS +- protobuf_LIBS=$pkg_cv_protobuf_LIBS +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-printf "%s\n" "yes" >&6; } +- +-fi +- +-elif test $pkg_failed = untried; then +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-printf "%s\n" "no" >&6; } +- +-pkg_failed=no +-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for protobuf" >&5 +-printf %s "checking for protobuf... " >&6; } +- +-if test -n "$protobuf_CFLAGS"; then +- pkg_cv_protobuf_CFLAGS="$protobuf_CFLAGS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"protobuf >= 2.6.0\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "protobuf >= 2.6.0") 2>&5 +- ac_status=$? +- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_protobuf_CFLAGS=`$PKG_CONFIG --cflags "protobuf >= 2.6.0" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes +-else +- pkg_failed=yes +-fi +- else +- pkg_failed=untried +-fi +-if test -n "$protobuf_LIBS"; then +- pkg_cv_protobuf_LIBS="$protobuf_LIBS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"protobuf >= 2.6.0\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "protobuf >= 2.6.0") 2>&5 +- ac_status=$? +- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_protobuf_LIBS=`$PKG_CONFIG --libs "protobuf >= 2.6.0" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes +-else +- pkg_failed=yes +-fi +- else +- pkg_failed=untried +-fi +- +- +- +-if test $pkg_failed = yes; then +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-printf "%s\n" "no" >&6; } +- +-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then +- _pkg_short_errors_supported=yes +-else +- _pkg_short_errors_supported=no +-fi +- if test $_pkg_short_errors_supported = yes; then +- protobuf_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "protobuf >= 2.6.0" 2>&1` +- else +- protobuf_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "protobuf >= 2.6.0" 2>&1` +- fi +- # Put the nasty error message in config.log where it belongs +- echo "$protobuf_PKG_ERRORS" >&5 +- +- as_fn_error $? "Package requirements (protobuf >= 2.6.0) were not met: +- +-$protobuf_PKG_ERRORS +- +-Consider adjusting the PKG_CONFIG_PATH environment variable if you +-installed software in a non-standard prefix. +- +-Alternatively, you may set the environment variables protobuf_CFLAGS +-and protobuf_LIBS to avoid the need to call pkg-config. +-See the pkg-config man page for more details." "$LINENO" 5 +-elif test $pkg_failed = untried; then +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-printf "%s\n" "no" >&6; } +- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +-is in your PATH or set the PKG_CONFIG environment variable to the full +-path to pkg-config. +- +-Alternatively, you may set the environment variables protobuf_CFLAGS +-and protobuf_LIBS to avoid the need to call pkg-config. +-See the pkg-config man page for more details. +- +-To get pkg-config, see . +-See \`config.log' for more details" "$LINENO" 5; } +-else +- protobuf_CFLAGS=$pkg_cv_protobuf_CFLAGS +- protobuf_LIBS=$pkg_cv_protobuf_LIBS +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-printf "%s\n" "yes" >&6; } +- +-fi +- + else + protobuf_CFLAGS=$pkg_cv_protobuf_CFLAGS + protobuf_LIBS=$pkg_cv_protobuf_LIBS +--- protoc-c/c_bytes_field.h.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_bytes_field.h +@@ -87,8 +87,6 @@ class BytesFieldGenerator : public FieldGenerator { + + private: + std::map variables_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(BytesFieldGenerator); + }; + + +--- protoc-c/c_enum.h.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_enum.h +@@ -106,8 +106,6 @@ class EnumGenerator { + private: + const EnumDescriptor* descriptor_; + std::string dllexport_decl_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator); + }; + + } // namespace c +--- protoc-c/c_enum_field.h.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_enum_field.h +@@ -85,8 +85,6 @@ class EnumFieldGenerator : public FieldGenerator { + + private: + std::map variables_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator); + }; + + +--- protoc-c/c_extension.h.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_extension.h +@@ -98,8 +98,6 @@ class ExtensionGenerator { + const FieldDescriptor* descriptor_; + std::string type_traits_; + std::string dllexport_decl_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator); + }; + + } // namespace c +--- protoc-c/c_field.cc.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_field.cc +@@ -231,7 +231,7 @@ FieldGeneratorMap::~FieldGeneratorMap() {} + + const FieldGenerator& FieldGeneratorMap::get( + const FieldDescriptor* field) const { +- GOOGLE_CHECK_EQ(field->containing_type(), descriptor_); ++ ABSL_CHECK_EQ(field->containing_type(), descriptor_); + return *field_generators_[field->index()]; + } + +--- protoc-c/c_field.h.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_field.h +@@ -103,9 +103,6 @@ class FieldGenerator { + const std::string &type_macro, + const std::string &descriptor_addr) const; + const FieldDescriptor *descriptor_; +- +- private: +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGenerator); + }; + + // Convenience class which constructs FieldGenerators for a Descriptor. +@@ -121,8 +118,6 @@ class FieldGeneratorMap { + std::unique_ptr[]> field_generators_; + + static FieldGenerator* MakeGenerator(const FieldDescriptor* field); +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGeneratorMap); + }; + + } // namespace c +--- protoc-c/c_file.cc.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_file.cc +@@ -119,7 +119,11 @@ void FileGenerator::GenerateHeader(io::Printer* printe + + int min_header_version = 1000000; + #if defined(HAVE_PROTO3) ++# if GOOGLE_PROTOBUF_VERSION >= 4023000 ++ if (FileDescriptorLegacy(file_).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3) { ++# else + if (file_->syntax() == FileDescriptor::SYNTAX_PROTO3) { ++#endif + min_header_version = 1003000; + } + #endif +--- protoc-c/c_file.h.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_file.h +@@ -103,8 +103,6 @@ class FileGenerator { + std::unique_ptr[]> enum_generators_; + std::unique_ptr[]> service_generators_; + std::unique_ptr[]> extension_generators_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator); + }; + + } // namespace c +--- protoc-c/c_generator.h.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_generator.h +@@ -93,9 +93,6 @@ class PROTOC_C_EXPORT CGenerator : public CodeGenerato + const std::string& parameter, + OutputDirectory* output_directory, + std::string* error) const; +- +- private: +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CGenerator); + }; + + } // namespace c +--- protoc-c/c_helpers.cc.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_helpers.cc +@@ -286,7 +286,7 @@ const char* const kKeywordList[] = { + + std::set MakeKeywordsMap() { + std::set result; +- for (int i = 0; i < GOOGLE_ARRAYSIZE(kKeywordList); i++) { ++ for (int i = 0; i < ABSL_ARRAYSIZE(kKeywordList); i++) { + result.insert(kKeywordList[i]); + } + return result; +@@ -548,7 +548,7 @@ std::string CEscape(const std::string& src) { + std::unique_ptr dest(new char[dest_length]); + const int len = CEscapeInternal(src.data(), src.size(), + dest.get(), dest_length, false); +- GOOGLE_DCHECK_GE(len, 0); ++ ABSL_DCHECK_GE(len, 0); + return std::string(dest.get(), len); + } + +--- protoc-c/c_helpers.h.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_helpers.h +@@ -70,6 +70,10 @@ + #include + #include + ++#if GOOGLE_PROTOBUF_VERSION >= 4023000 ++# include ++#endif ++ + namespace google { + namespace protobuf { + namespace compiler { +@@ -172,7 +176,11 @@ int compare_name_indices_by_name(const void*, const vo + // This wrapper is needed to be able to compile against protobuf2. + inline int FieldSyntax(const FieldDescriptor* field) { + #ifdef HAVE_PROTO3 ++# if GOOGLE_PROTOBUF_VERSION >= 4023000 ++ return FileDescriptorLegacy(field->file()).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3 ? 3 : 2; ++# else + return field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 ? 3 : 2; ++# endif + #else + return 2; + #endif +--- protoc-c/c_message.cc.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_message.cc +@@ -499,7 +499,7 @@ GenerateMessageDescriptor(io::Printer* printer, bool g + // NOTE: not supported by protobuf + vars["maybe_static"] = ""; + vars["field_dv_ctype"] = "{ ... }"; +- GOOGLE_LOG(DFATAL) << "Messages can't have default values!"; ++ ABSL_LOG(FATAL) << "Messages can't have default values!"; + break; + case FieldDescriptor::CPPTYPE_STRING: + if (fd->type() == FieldDescriptor::TYPE_BYTES || opt.string_as_bytes()) +@@ -521,7 +521,7 @@ GenerateMessageDescriptor(io::Printer* printer, bool g + break; + } + default: +- GOOGLE_LOG(DFATAL) << "Unknown CPPTYPE"; ++ ABSL_LOG(FATAL) << "Unknown CPPTYPE"; + break; + } + if (!already_defined) +--- protoc-c/c_message.h.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_message.h +@@ -136,8 +136,6 @@ class MessageGenerator { + std::unique_ptr[]> nested_generators_; + std::unique_ptr[]> enum_generators_; + std::unique_ptr[]> extension_generators_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator); + }; + + } // namespace c +--- protoc-c/c_message_field.h.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_message_field.h +@@ -82,10 +82,6 @@ class MessageFieldGenerator : public FieldGenerator { + void GenerateDescriptorInitializer(io::Printer* printer) const; + std::string GetDefaultValue(void) const; + void GenerateStaticInit(io::Printer* printer) const; +- +- private: +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator); + }; + + +--- protoc-c/c_primitive_field.cc.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_primitive_field.cc +@@ -99,7 +99,7 @@ void PrimitiveFieldGenerator::GenerateStructMembers(io + case FieldDescriptor::TYPE_STRING : + case FieldDescriptor::TYPE_BYTES : + case FieldDescriptor::TYPE_GROUP : +- case FieldDescriptor::TYPE_MESSAGE : GOOGLE_LOG(FATAL) << "not a primitive type"; break; ++ case FieldDescriptor::TYPE_MESSAGE : ABSL_LOG(FATAL) << "not a primitive type"; break; + + // No default because we want the compiler to complain if any new + // types are added. +@@ -143,7 +143,7 @@ std::string PrimitiveFieldGenerator::GetDefaultValue() + case FieldDescriptor::CPPTYPE_BOOL: + return descriptor_->default_value_bool() ? "1" : "0"; + default: +- GOOGLE_LOG(DFATAL) << "unexpected CPPTYPE in c_primitive_field"; ++ ABSL_LOG(FATAL) << "unexpected CPPTYPE in c_primitive_field"; + return "UNEXPECTED_CPPTYPE"; + } + } +@@ -197,7 +197,7 @@ void PrimitiveFieldGenerator::GenerateDescriptorInitia + case FieldDescriptor::TYPE_STRING : + case FieldDescriptor::TYPE_BYTES : + case FieldDescriptor::TYPE_GROUP : +- case FieldDescriptor::TYPE_MESSAGE : GOOGLE_LOG(FATAL) << "not a primitive type"; break; ++ case FieldDescriptor::TYPE_MESSAGE : ABSL_LOG(FATAL) << "not a primitive type"; break; + + // No default because we want the compiler to complain if any new + // types are added. +--- protoc-c/c_primitive_field.h.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_primitive_field.h +@@ -82,10 +82,6 @@ class PrimitiveFieldGenerator : public FieldGenerator + void GenerateDescriptorInitializer(io::Printer* printer) const; + std::string GetDefaultValue(void) const; + void GenerateStaticInit(io::Printer* printer) const; +- +- private: +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator); + }; + + } // namespace c +--- protoc-c/c_service.h.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_service.h +@@ -100,8 +100,6 @@ class ServiceGenerator { + + const ServiceDescriptor* descriptor_; + std::map vars_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator); + }; + + } // namespace c +--- protoc-c/c_string_field.h.orig 2021-05-19 01:51:00 UTC ++++ protoc-c/c_string_field.h +@@ -87,8 +87,6 @@ class StringFieldGenerator : public FieldGenerator { + + private: + std::map variables_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(StringFieldGenerator); + }; + +