* [gentoo-commits] repo/gentoo:master commit in: net-libs/ignition-transport/files/
@ 2016-04-30 15:21 Alexis Ballier
0 siblings, 0 replies; 2+ messages in thread
From: Alexis Ballier @ 2016-04-30 15:21 UTC (permalink / raw
To: gentoo-commits
commit: 295de3a6c62704f437339af9c5e3751bfa65f601
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 30 15:20:39 2016 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Sat Apr 30 15:21:12 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=295de3a6
net-libs/ignition-transport: add version guards to the protobuf3 patch so that protobuf2 support still works. Bug #581214 by Victor Mataré.
Package-Manager: portage-2.2.28
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>
net-libs/ignition-transport/files/protobuf3.patch | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net-libs/ignition-transport/files/protobuf3.patch b/net-libs/ignition-transport/files/protobuf3.patch
index c5cdd32..fffe229 100644
--- a/net-libs/ignition-transport/files/protobuf3.patch
+++ b/net-libs/ignition-transport/files/protobuf3.patch
@@ -2,11 +2,13 @@ Index: ignition-transport-1.1.0/include/ignition/transport/RepHandler.hh
===================================================================
--- ignition-transport-1.1.0.orig/include/ignition/transport/RepHandler.hh
+++ ignition-transport-1.1.0/include/ignition/transport/RepHandler.hh
-@@ -22,6 +22,7 @@
+@@ -22,6 +22,9 @@
#pragma warning(push, 0)
#endif
#include <google/protobuf/message.h>
++#if GOOGLE_PROTOBUF_VERSION >= 3000000
+#include <google/protobuf/stubs/casts.h>
++#endif
#ifdef _MSC_VER
#pragma warning(pop)
#endif
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-libs/ignition-transport/files/
@ 2023-08-25 12:54 Alexis Ballier
0 siblings, 0 replies; 2+ messages in thread
From: Alexis Ballier @ 2023-08-25 12:54 UTC (permalink / raw
To: gentoo-commits
commit: 811fde969d603193314004f4f212f543c28159d3
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 25 12:00:23 2023 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> 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 <aballier <AT> 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 <silvio@traversaro.it>
+Date: Tue, 6 Jun 2023 17:19:49 +0200
+Subject: [PATCH] Fix compatibility with protobuf 22
+
+Signed-off-by: Silvio Traversaro <silvio@traversaro.it>
+---
+ 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 <google/protobuf/stubs/casts.h>
+ #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<const Req*>(&_msgReq);
++ auto msgRep = google::protobuf::internal::DownCast<Rep*>(&_msgRep);
++#elif GOOGLE_PROTOBUF_VERSION > 2999999
+ auto msgReq = google::protobuf::down_cast<const Req*>(&_msgReq);
+ auto msgRep = google::protobuf::down_cast<Rep*>(&_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 <google/protobuf/stubs/common.h>
+
+-#if GOOGLE_PROTOBUF_VERSION >= 3000000
++#if GOOGLE_PROTOBUF_VERSION >= 3000000 && GOOGLE_PROTOBUF_VERSION < 4022000
+ #include <google/protobuf/stubs/casts.h>
+ #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<const T*>(&_msg);
++#elif GOOGLE_PROTOBUF_VERSION >= 3000000
+ auto msgPtr = google::protobuf::down_cast<const T*>(&_msg);
+ #else
+ auto msgPtr = google::protobuf::internal::down_cast<const T*>(&_msg);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-25 12:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-30 15:21 [gentoo-commits] repo/gentoo:master commit in: net-libs/ignition-transport/files/ Alexis Ballier
-- strict thread matches above, loose matches on Subject: below --
2023-08-25 12:54 Alexis Ballier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox