From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3240B15800A for ; Fri, 25 Aug 2023 12:54:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9E6212BC013; Fri, 25 Aug 2023 12:54:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8A2292BC013 for ; Fri, 25 Aug 2023 12:54:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C25C3340B9C for ; Fri, 25 Aug 2023 12:54:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1F919108A for ; Fri, 25 Aug 2023 12:54:28 +0000 (UTC) From: "Alexis Ballier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexis Ballier" Message-ID: <1692968043.811fde969d603193314004f4f212f543c28159d3.aballier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/ignition-transport/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/ignition-transport/files/protobuf.patch X-VCS-Directories: net-libs/ignition-transport/files/ X-VCS-Committer: aballier X-VCS-Committer-Name: Alexis Ballier X-VCS-Revision: 811fde969d603193314004f4f212f543c28159d3 X-VCS-Branch: master Date: Fri, 25 Aug 2023 12:54:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d5aa0fea-4f30-4d53-89f9-a00098f8044b X-Archives-Hash: d9d488acea4fc4f4c2eae216fab47ca1 commit: 811fde969d603193314004f4f212f543c28159d3 Author: Alexis Ballier gentoo org> AuthorDate: Fri Aug 25 12:00:23 2023 +0000 Commit: Alexis Ballier gentoo org> CommitDate: Fri Aug 25 12:54:03 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=811fde96 net-libs/ignition-transport: use upstream patch Signed-off-by: Alexis Ballier gentoo.org> net-libs/ignition-transport/files/protobuf.patch | 76 ++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/net-libs/ignition-transport/files/protobuf.patch b/net-libs/ignition-transport/files/protobuf.patch new file mode 100644 index 000000000000..497da899db7a --- /dev/null +++ b/net-libs/ignition-transport/files/protobuf.patch @@ -0,0 +1,76 @@ +From e35a697b619dbcecec0ae0c8b8f0a644d368abf3 Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Tue, 6 Jun 2023 17:19:49 +0200 +Subject: [PATCH] Fix compatibility with protobuf 22 + +Signed-off-by: Silvio Traversaro +--- + CMakeLists.txt | 2 -- + include/gz/transport/RepHandler.hh | 8 ++++++-- + include/gz/transport/SubscriptionHandler.hh | 6 ++++-- + 3 files changed, 10 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5e3aab859..843fb17cb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38,9 +38,7 @@ message(STATUS "\n\n-- ====== Finding Dependencies ======") + + #-------------------------------------- + # Find Protobuf +-set(REQ_PROTOBUF_VER 3) + ign_find_package(IgnProtobuf +- VERSION ${REQ_PROTOBUF_VER} + REQUIRED + PRETTY Protobuf) + +diff --git a/include/gz/transport/RepHandler.hh b/include/gz/transport/RepHandler.hh +index 5d27f98c1..a5675fca7 100644 +--- a/include/gz/transport/RepHandler.hh ++++ b/include/gz/transport/RepHandler.hh +@@ -26,7 +26,7 @@ + #pragma warning(pop) + #endif + +-#if GOOGLE_PROTOBUF_VERSION > 2999999 ++#if GOOGLE_PROTOBUF_VERSION > 2999999 && GOOGLE_PROTOBUF_VERSION < 4022000 + #include + #endif + +@@ -140,7 +140,11 @@ namespace ignition + return false; + } + +-#if GOOGLE_PROTOBUF_VERSION > 2999999 ++#if GOOGLE_PROTOBUF_VERSION >= 4022000 ++ auto msgReq = ++ google::protobuf::internal::DownCast(&_msgReq); ++ auto msgRep = google::protobuf::internal::DownCast(&_msgRep); ++#elif GOOGLE_PROTOBUF_VERSION > 2999999 + auto msgReq = google::protobuf::down_cast(&_msgReq); + auto msgRep = google::protobuf::down_cast(&_msgRep); + #else +diff --git a/include/gz/transport/SubscriptionHandler.hh b/include/gz/transport/SubscriptionHandler.hh +index 78477add0..d69c83ddb 100644 +--- a/include/gz/transport/SubscriptionHandler.hh ++++ b/include/gz/transport/SubscriptionHandler.hh +@@ -28,7 +28,7 @@ + + #include + +-#if GOOGLE_PROTOBUF_VERSION >= 3000000 ++#if GOOGLE_PROTOBUF_VERSION >= 3000000 && GOOGLE_PROTOBUF_VERSION < 4022000 + #include + #endif + +@@ -211,7 +211,9 @@ namespace ignition + if (!this->UpdateThrottling()) + return true; + +-#if GOOGLE_PROTOBUF_VERSION >= 3000000 ++#if GOOGLE_PROTOBUF_VERSION >= 4022000 ++ auto msgPtr = google::protobuf::internal::DownCast(&_msg); ++#elif GOOGLE_PROTOBUF_VERSION >= 3000000 + auto msgPtr = google::protobuf::down_cast(&_msg); + #else + auto msgPtr = google::protobuf::internal::down_cast(&_msg);