From nobody Thu Aug 15 11:56:17 2024 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 4Wl3Vs1JBmz5TVlp; Thu, 15 Aug 2024 11:56:21 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wl3Vp4FMBz42v0; Thu, 15 Aug 2024 11:56:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723722978; 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=QstFo/y2vvZJhqjXcV5MercHxa9O28aaf1Pc0kenBjs=; b=RTtmhHtbjsudy2/o/VEPA7sStFKxZgJB2m6P1rT9NJIECssFY78D3yqo3z6UjrrJHzrs5C dNk2VDlg4iSy0FFrJBuOySpfTIiZTv0q9szZBESGyInGgofawQn+bIbZi9Dbie4Q0MrkMd lDJgiSaJwoaduL/u+AIsWMFulwEZbdPSf7+fsdUqp2D+Yyz2KftPWfWRcu0odOruIE2uvo DaTaT/aZigwuHTrM0yOD5sWAwl2/WJ3Ql6HsidQIA/UbYv4c4LSiAODbsHU92HLw2TbNbS 2MFZ0/XwOSCL8caD9MUspMpdBECIZoj5SlwLny8nQkTPjS8BLNdo/z0RPb9x2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723722978; a=rsa-sha256; cv=none; b=InlqUi7iBl3rBc7buzXkIh1zWkNBgRFbylC/o4EgsIX0aQuyWfgtZhgN1WsbpKpqjS4Rta gEEwNGoJf8M0CK4Nip7tYM0YxfEkXyA4lVFN4c4hmLeSbSSsDqVyqaHPI2P8LuqnbHM73N j0emiGNQg6jjjlXdxmg6jiSjFxOV7e2CO8/M2HEEeR1eVX7IIJfRCHTJVVnVa+RuDfaJA5 bh7z46VUXG+r0TukKGJSM7gitxmL9OhamZrAVgi93laxSkwzlJvVOeTeW1w1BfpHDC4/V6 VzTLAIDe7zXJodv0zaGGE+pyY9Q3JLUIS0crPR79xa7zfdhUUZB5Op01AajMNQ== 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=1723722978; 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=QstFo/y2vvZJhqjXcV5MercHxa9O28aaf1Pc0kenBjs=; b=S+U6axfAb/swhR6r+9hFZmao1DPnzJZGdGIMF/6GbR5ZfHP8dr3iMDTZ0ZEqgUgimQhOcy mXzkDBefwDq0psoxrGw8blHwOlTYHNVoBxyOBSMTb5dHRVZByp7kRgvg4afjhmbH4q15gT xH0g+W4pIF/U2BTkB0muTua44KDH3JgYc1BPik55wLEXV454R4E38XlYCRyMIlLAplHG2l segiWs9sB8QQqOkoC0DsqbxTvVS1L+6zo6guEt//oHmLC6s4ffGfNvUawsM8H52D1d7Ege QihS0W3gQAIZz8ovGapCe3eqMOUYS/anYeevhs+iMiSqr/jXsrRpsF7olpG+LA== 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 4Wl3Vp08CdzMT3; Thu, 15 Aug 2024 11:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47FBuHPP060639; Thu, 15 Aug 2024 11:56:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47FBuHgD060634; Thu, 15 Aug 2024 11:56:17 GMT (envelope-from git) Date: Thu, 15 Aug 2024 11:56:17 GMT Message-Id: <202408151156.47FBuHgD060634@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: a016c8dde31a - main - devel/protobuf-c: Fix build with protobuf 26.0+ 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: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-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: a016c8dde31ac70c527f6eeacc5ab99d4a9b12c5 Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=a016c8dde31ac70c527f6eeacc5ab99d4a9b12c5 commit a016c8dde31ac70c527f6eeacc5ab99d4a9b12c5 Author: Po-Chuan Hsieh AuthorDate: 2024-08-15 09:46:51 +0000 Commit: Po-Chuan Hsieh CommitDate: 2024-08-15 11:47:41 +0000 devel/protobuf-c: Fix build with protobuf 26.0+ - Bump PORTREVISION for package change Obtained from: https://github.com/protobuf-c/protobuf-c/pull/711 (based on) --- devel/protobuf-c/Makefile | 4 +- devel/protobuf-c/files/patch-protobuf | 90 +++++++++++++++++++---------------- 2 files changed, 51 insertions(+), 43 deletions(-) diff --git a/devel/protobuf-c/Makefile b/devel/protobuf-c/Makefile index 53afc0ad07b7..c970402ef817 100644 --- a/devel/protobuf-c/Makefile +++ b/devel/protobuf-c/Makefile @@ -1,8 +1,8 @@ PORTNAME= protobuf-c DISTVERSION= 1.4.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel -MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/v${DISTVERSION}/ +MASTER_SITES= https://github.com/protobuf-c/protobuf-c/releases/download/v${DISTVERSION}/ MAINTAINER= truckman@FreeBSD.org COMMENT= Code generator and libraries to use Protocol Buffers from pure C diff --git a/devel/protobuf-c/files/patch-protobuf b/devel/protobuf-c/files/patch-protobuf index 524128702743..916d2de557d0 100644 --- a/devel/protobuf-c/files/patch-protobuf +++ b/devel/protobuf-c/files/patch-protobuf @@ -1,6 +1,6 @@ --- configure.orig 2022-07-11 01:35:23 UTC +++ configure -@@ -683,7 +683,7 @@ BUILD_COMPILER_TRUE +@@ -683,7 +683,7 @@ protobuf_CFLAGS PROTOC protobuf_LIBS protobuf_CFLAGS @@ -9,7 +9,7 @@ pkgconfigdir PKG_CONFIG_LIBDIR PKG_CONFIG_PATH -@@ -17724,7 +17724,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAG +@@ -17724,7 +17724,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_compiler_gnu=$ac_cv_cxx_compiler_gnu @@ -31,7 +31,7 @@ if eval test \${$cachevar+y} then : printf %s "(cached) " >&6 -@@ -18067,19 +18067,19 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_e +@@ -18067,19 +18067,19 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu @@ -127,7 +127,7 @@ $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. +@@ -18228,109 +18169,6 @@ See \`config.log' for more details" "$LINENO" 5; } To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } @@ -283,7 +283,7 @@ } // 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() {} +@@ -231,7 +231,7 @@ const FieldGenerator& FieldGeneratorMap::get( const FieldGenerator& FieldGeneratorMap::get( const FieldDescriptor* field) const { @@ -315,18 +315,20 @@ } // 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 +@@ -117,12 +117,7 @@ void FileGenerator::GenerateHeader(io::Printer* printe + void FileGenerator::GenerateHeader(io::Printer* printer) { + std::string filename_identifier = FilenameIdentifier(file_->name()); + +- int min_header_version = 1000000; +-#if defined(HAVE_PROTO3) +- if (file_->syntax() == FileDescriptor::SYNTAX_PROTO3) { +- min_header_version = 1003000; +- } +-#endif ++ int min_header_version = 1003000; + + // Generate top of header. + printer->Print( --- protoc-c/c_file.h.orig 2021-05-19 01:51:00 UTC +++ protoc-c/c_file.h @@ -103,8 +103,6 @@ class FileGenerator { @@ -340,19 +342,23 @@ } // 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, +@@ -94,8 +94,11 @@ class PROTOC_C_EXPORT CGenerator : public CodeGenerato OutputDirectory* output_directory, std::string* error) const; -- + - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CGenerator); ++#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_2023; } ++#endif }; } // 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[] = { +@@ -286,7 +286,7 @@ std::set MakeKeywordsMap() { std::set MakeKeywordsMap() { std::set result; @@ -372,29 +378,31 @@ --- 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 +@@ -171,11 +171,20 @@ inline int FieldSyntax(const FieldDescriptor* field) { + // Return the syntax version of the file containing the field. // 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 +-#ifdef HAVE_PROTO3 +- return field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 ? 3 : 2; +-#else ++ auto proto = FileDescriptorProto(); ++ field->file()->CopyTo(&proto); ++ ++ if (proto.has_syntax()) { ++ auto syntax = proto.syntax(); ++ assert(syntax == "proto2" || syntax == "proto3"); ++ if (syntax == "proto2") { ++ return 2; ++ } else if (syntax == "proto3") { ++ return 3; ++ } ++ } ++ return 2; - #endif +-#endif + } + + } // namespace c --- 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