commit:     bd6aea1521e6b6329a1f4073789751a9234610f9
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 12:42:21 2025 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Fri Jun  6 12:51:43 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd6aea15

net-libs/ignition-transport: bump to 8.5.1 and fix build with latet protobuf

Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>

 net-libs/ignition-transport/Manifest               |   1 +
 net-libs/ignition-transport/files/protobuf30.patch | 348 +++++++++++++++++++++
 .../ignition-transport-8.5.1.ebuild                |  33 ++
 3 files changed, 382 insertions(+)

diff --git a/net-libs/ignition-transport/Manifest 
b/net-libs/ignition-transport/Manifest
index bb415bd6bc13..7670ddc0f487 100644
--- a/net-libs/ignition-transport/Manifest
+++ b/net-libs/ignition-transport/Manifest
@@ -1 +1,2 @@
 DIST ignition-transport8_8.4.0.tar.gz 610048 BLAKE2B 
82ece18d0777d8ca4f64d3b5c37a8532f3a1d067772303f4373e663a99e95573f8991db465a2d6d86606c8565d2af667c96f2ecf7a8dca032c5ab2d7888e7ea4
 SHA512 
7ed3d59b707f2d1b26bf80dfa7cc9633d4ce5a39b97c5396012e73bd949859ad3b71f79b8aa025ca78f5c1796bfdc9006c1c704f1b6b75e854ffcfc4c3ab53f8
+DIST ignition-transport8_8.5.1.tar.gz 610842 BLAKE2B 
8b10de23ad68cd24885570f9703ef079f61dc1d4e53e8074da124f9a320bdd1e7aed7132022b59da3be4839880cb02d81c69fe275bc6b976032c4f0684b18eb8
 SHA512 
8e5b54189ded680c704a6f6d9ddf343f41fc1581fe2b097de75e776730950f4439895ea15b5eb83b8eddc48b1e3b81bc1b8cfafe4cce972d2d75f12197653a6e

diff --git a/net-libs/ignition-transport/files/protobuf30.patch 
b/net-libs/ignition-transport/files/protobuf30.patch
new file mode 100644
index 000000000000..78b7876ece51
--- /dev/null
+++ b/net-libs/ignition-transport/files/protobuf30.patch
@@ -0,0 +1,348 @@
+See: 
https://github.com/gazebosim/gz-transport/commit/34e12ff4593370cba314a94f025172dd9af1685a
+
+Index: 
gz-transport-ignition-transport8_8.5.1/include/gz/transport/RepHandler.hh
+===================================================================
+--- 
gz-transport-ignition-transport8_8.5.1.orig/include/gz/transport/RepHandler.hh
++++ gz-transport-ignition-transport8_8.5.1/include/gz/transport/RepHandler.hh
+@@ -140,7 +140,12 @@ namespace ignition
+           return false;
+         }
+ 
+-#if GOOGLE_PROTOBUF_VERSION >= 4022000
++#if GOOGLE_PROTOBUF_VERSION >= 5028000
++      const auto msgReq =
++        google::protobuf::DynamicCastMessage<Req>(&_msgReq);
++      auto msgRep =
++        google::protobuf::DynamicCastMessage<Rep>(&_msgRep);
++#elif GOOGLE_PROTOBUF_VERSION >= 4022000
+         auto msgReq =
+           google::protobuf::internal::DownCast<const Req*>(&_msgReq);
+         auto msgRep = google::protobuf::internal::DownCast<Rep*>(&_msgRep);
+@@ -192,13 +197,13 @@ namespace ignition
+       // Documentation inherited.
+       public: virtual std::string ReqTypeName() const
+       {
+-        return Req().GetTypeName();
++        return std::string(Req().GetTypeName());
+       }
+ 
+       // Documentation inherited.
+       public: virtual std::string RepTypeName() const
+       {
+-        return Rep().GetTypeName();
++        return std::string(Rep().GetTypeName());
+       }
+ 
+       /// \brief Create a specific protobuf message given its serialized data.
+Index: 
gz-transport-ignition-transport8_8.5.1/include/gz/transport/ReqHandler.hh
+===================================================================
+--- 
gz-transport-ignition-transport8_8.5.1.orig/include/gz/transport/ReqHandler.hh
++++ gz-transport-ignition-transport8_8.5.1/include/gz/transport/ReqHandler.hh
+@@ -284,13 +284,13 @@ namespace ignition
+       // Documentation inherited.
+       public: virtual std::string ReqTypeName() const
+       {
+-        return Req().GetTypeName();
++        return std::string(Req().GetTypeName());
+       }
+ 
+       // Documentation inherited.
+       public: virtual std::string RepTypeName() const
+       {
+-        return Rep().GetTypeName();
++        return std::string(Rep().GetTypeName());
+       }
+ 
+       /// \brief Protobuf message containing the request's parameters.
+@@ -381,7 +381,7 @@ namespace ignition
+       public: virtual std::string ReqTypeName() const
+       {
+         if (this->reqMsg)
+-          return this->reqMsg->GetTypeName();
++          return std::string(this->reqMsg->GetTypeName());
+         else
+         {
+           std::cerr << "ReqHandler::ReqTypeName() Warning: Using 
ReqTypeName() "
+@@ -394,7 +394,7 @@ namespace ignition
+       public: virtual std::string RepTypeName() const
+       {
+         if (this->repMsg)
+-          return this->repMsg->GetTypeName();
++          return std::string(this->repMsg->GetTypeName());
+         else
+         {
+           std::cerr << "ReqHandler::RepTypeName() Warning: Using 
RepTypeName() "
+Index: 
gz-transport-ignition-transport8_8.5.1/include/gz/transport/SubscriptionHandler.hh
+===================================================================
+--- 
gz-transport-ignition-transport8_8.5.1.orig/include/gz/transport/SubscriptionHandler.hh
++++ 
gz-transport-ignition-transport8_8.5.1/include/gz/transport/SubscriptionHandler.hh
+@@ -185,7 +185,7 @@ namespace ignition
+       // Documentation inherited.
+       public: std::string TypeName()
+       {
+-        return T().GetTypeName();
++        return std::string(T().GetTypeName());
+       }
+ 
+       /// \brief Set the callback for this handler.
+@@ -211,7 +211,10 @@ namespace ignition
+         if (!this->UpdateThrottling())
+           return true;
+ 
+-#if GOOGLE_PROTOBUF_VERSION >= 4022000
++
++#if GOOGLE_PROTOBUF_VERSION >= 5028000
++      auto msgPtr = google::protobuf::DynamicCastMessage<T>(&_msg);
++#elif 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);
+Index: 
gz-transport-ignition-transport8_8.5.1/include/gz/transport/detail/Node.hh
+===================================================================
+--- 
gz-transport-ignition-transport8_8.5.1.orig/include/gz/transport/detail/Node.hh
++++ gz-transport-ignition-transport8_8.5.1/include/gz/transport/detail/Node.hh
+@@ -32,7 +32,7 @@ namespace ignition
+         const std::string &_topic,
+         const AdvertiseMessageOptions &_options)
+     {
+-      return this->Advertise(_topic, MessageT().GetTypeName(), _options);
++      return this->Advertise(_topic, std::string(MessageT().GetTypeName()), 
_options);
+     }
+ 
+     //////////////////////////////////////////////////
+@@ -265,7 +265,7 @@ namespace ignition
+         this->Shared()->myReplierAddress,
+         this->Shared()->replierId.ToString(),
+         this->Shared()->pUuid, this->NodeUuid(),
+-        RequestT().GetTypeName(), ReplyT().GetTypeName(), _options);
++        std::string(RequestT().GetTypeName()), 
std::string(ReplyT().GetTypeName()), _options);
+ 
+       if (!this->Shared()->AdvertisePublisher(publisher))
+       {
+@@ -418,8 +418,8 @@ namespace ignition
+         std::lock_guard<std::recursive_mutex> lk(this->Shared()->mutex);
+         localResponserFound = this->Shared()->repliers.FirstHandler(
+               fullyQualifiedTopic,
+-              RequestT().GetTypeName(),
+-              ReplyT().GetTypeName(),
++              std::string(RequestT().GetTypeName()),
++              std::string(ReplyT().GetTypeName()),
+               repHandler);
+       }
+ 
+@@ -456,7 +456,7 @@ namespace ignition
+         if (this->Shared()->TopicPublishers(fullyQualifiedTopic, addresses))
+         {
+           this->Shared()->SendPendingRemoteReqs(fullyQualifiedTopic,
+-            RequestT().GetTypeName(), ReplyT().GetTypeName());
++            std::string(RequestT().GetTypeName()), 
std::string(ReplyT().GetTypeName()));
+         }
+         else
+         {
+@@ -549,7 +549,7 @@ namespace ignition
+       // If the responser is within my process.
+       IRepHandlerPtr repHandler;
+       if (this->Shared()->repliers.FirstHandler(fullyQualifiedTopic,
+-        _request.GetTypeName(), _reply.GetTypeName(), repHandler))
++        std::string(_request.GetTypeName()), 
std::string(_reply.GetTypeName()), repHandler))
+       {
+         // There is a responser in my process, let's use it.
+         _result = repHandler->RunLocalCallback(_request, _reply);
+@@ -565,7 +565,7 @@ namespace ignition
+       if (this->Shared()->TopicPublishers(fullyQualifiedTopic, addresses))
+       {
+         this->Shared()->SendPendingRemoteReqs(fullyQualifiedTopic,
+-          _request.GetTypeName(), _reply.GetTypeName());
++          std::string(_request.GetTypeName()), 
std::string(_reply.GetTypeName()));
+       }
+       else
+       {
+Index: gz-transport-ignition-transport8_8.5.1/src/CIface_TEST.cc
+===================================================================
+--- gz-transport-ignition-transport8_8.5.1.orig/src/CIface_TEST.cc
++++ gz-transport-ignition-transport8_8.5.1/src/CIface_TEST.cc
+@@ -93,7 +93,7 @@ TEST(CIfaceTest, PubSub)
+   msg.SerializeToArray(buffer, size);
+ 
+   EXPECT_EQ(0,
+-    ignTransportPublish(node, topic, buffer, msg.GetTypeName().c_str()));
++    ignTransportPublish(node, topic, buffer, 
std::string(msg.GetTypeName()).c_str()));
+ 
+   EXPECT_EQ(2, count);
+ 
+@@ -102,7 +102,7 @@ TEST(CIfaceTest, PubSub)
+   // Unsubscribe
+   ASSERT_EQ(0, ignTransportUnsubscribe(node, topic));
+   EXPECT_EQ(0,
+-    ignTransportPublish(node, topic, buffer, msg.GetTypeName().c_str()));
++    ignTransportPublish(node, topic, buffer, 
std::string(msg.GetTypeName()).c_str()));
+   EXPECT_EQ(0, count);
+ 
+   free(buffer);
+@@ -150,12 +150,12 @@ TEST(CIfaceTest, PubSubPartitions)
+ 
+   // Publish on "bar" partition
+   EXPECT_EQ(0,
+-    ignTransportPublish(nodeBar, topic, buffer, msg.GetTypeName().c_str()));
++    ignTransportPublish(nodeBar, topic, buffer, 
std::string(msg.GetTypeName()).c_str()));
+   EXPECT_EQ(1, count);
+ 
+   // Publish on default partition
+   EXPECT_EQ(0,
+-    ignTransportPublish(nodeBar, topic, buffer, msg.GetTypeName().c_str()));
++    ignTransportPublish(nodeBar, topic, buffer, 
std::string(msg.GetTypeName()).c_str()));
+   EXPECT_EQ(2, count);
+ 
+   count = 0;
+@@ -163,7 +163,7 @@ TEST(CIfaceTest, PubSubPartitions)
+   // Unsubscribe
+   ASSERT_EQ(0, ignTransportUnsubscribe(nodeBar, topic));
+   EXPECT_EQ(0,
+-    ignTransportPublish(nodeBar, topic, buffer, msg.GetTypeName().c_str()));
++    ignTransportPublish(nodeBar, topic, buffer, 
std::string(msg.GetTypeName()).c_str()));
+   EXPECT_EQ(0, count);
+ 
+   free(buffer);
+Index: gz-transport-ignition-transport8_8.5.1/src/HandlerStorage_TEST.cc
+===================================================================
+--- gz-transport-ignition-transport8_8.5.1.orig/src/HandlerStorage_TEST.cc
++++ gz-transport-ignition-transport8_8.5.1/src/HandlerStorage_TEST.cc
+@@ -66,8 +66,8 @@ TEST(RepStorageTest, RepStorageAPI)
+   msgs::Int32 rep1Msg;
+   bool result;
+   msgs::Vector3d reqMsg;
+-  std::string reqType = reqMsg.GetTypeName();
+-  std::string rep1Type = rep1Msg.GetTypeName();
++  std::string reqType = std::string(reqMsg.GetTypeName());
++  std::string rep1Type = std::string(rep1Msg.GetTypeName());
+ 
+   reqMsg.set_x(1.0);
+   reqMsg.set_y(2.0);
+@@ -231,7 +231,7 @@ TEST(RepStorageTest, SubStorageNoCallbac
+   EXPECT_FALSE(subs.FirstHandler(topic, "incorrect type", handler));
+ 
+   // Now try to retrieve the first callback with the correct type.
+-  EXPECT_TRUE(subs.FirstHandler(topic, msg.GetTypeName(), handler));
++  EXPECT_TRUE(subs.FirstHandler(topic, std::string(msg.GetTypeName()), 
handler));
+ 
+   // Verify the handler.
+   EXPECT_EQ(handler->TypeName(), sub1HandlerPtr->TypeName());
+Index: gz-transport-ignition-transport8_8.5.1/src/Node.cc
+===================================================================
+--- gz-transport-ignition-transport8_8.5.1.orig/src/Node.cc
++++ gz-transport-ignition-transport8_8.5.1/src/Node.cc
+@@ -423,7 +423,7 @@ bool Node::Publisher::Publish(const Prot
+     };
+ 
+     if (!this->dataPtr->shared->Publish(this->dataPtr->publisher.Topic(),
+-          msgBuffer, msgSize, myDeallocator, _msg.GetTypeName()))
++          msgBuffer, msgSize, myDeallocator, std::string(_msg.GetTypeName())))
+     {
+       return false;
+     }
+Index: gz-transport-ignition-transport8_8.5.1/src/Node_TEST.cc
+===================================================================
+--- gz-transport-ignition-transport8_8.5.1.orig/src/Node_TEST.cc
++++ gz-transport-ignition-transport8_8.5.1/src/Node_TEST.cc
+@@ -527,7 +527,7 @@ TEST(NodeTest, PubWithoutAdvertise)
+   EXPECT_TRUE(node1.SubscribedTopics().empty());
+   EXPECT_TRUE(node1.AdvertisedServices().empty());
+ 
+-  auto pub1 = node1.Advertise(g_topic, msg.GetTypeName());
++  auto pub1 = node1.Advertise(g_topic, std::string(msg.GetTypeName()));
+   EXPECT_TRUE(pub1);
+ 
+   auto advertisedTopics = node1.AdvertisedTopics();
+@@ -716,7 +716,7 @@ TEST(NodeTest, RawPubSubSameThreadMessag
+   std::this_thread::sleep_for(std::chrono::milliseconds(100));
+ 
+   // Publish a first message.
+-  EXPECT_TRUE(pub.PublishRaw(msg.SerializeAsString(), msg.GetTypeName()));
++  EXPECT_TRUE(pub.PublishRaw(msg.SerializeAsString(), 
std::string(msg.GetTypeName())));
+ 
+   // Give some time to the subscribers.
+   std::this_thread::sleep_for(std::chrono::milliseconds(100));
+@@ -727,7 +727,7 @@ TEST(NodeTest, RawPubSubSameThreadMessag
+   reset();
+ 
+   // Publish a second message on topic.
+-  EXPECT_TRUE(pub.PublishRaw(msg.SerializeAsString(), msg.GetTypeName()));
++  EXPECT_TRUE(pub.PublishRaw(msg.SerializeAsString(), 
std::string(msg.GetTypeName())));
+ 
+   // Give some time to the subscribers.
+   std::this_thread::sleep_for(std::chrono::milliseconds(100));
+@@ -756,7 +756,7 @@ TEST(NodeTest, RawPubRawSubSameThreadMes
+   std::this_thread::sleep_for(std::chrono::milliseconds(100));
+ 
+   // Publish a first message.
+-  EXPECT_TRUE(pub.PublishRaw(msg.SerializeAsString(), msg.GetTypeName()));
++  EXPECT_TRUE(pub.PublishRaw(msg.SerializeAsString(), 
std::string(msg.GetTypeName())));
+ 
+   // Give some time to the subscribers.
+   std::this_thread::sleep_for(std::chrono::milliseconds(100));
+@@ -767,7 +767,7 @@ TEST(NodeTest, RawPubRawSubSameThreadMes
+   reset();
+ 
+   // Publish a second message on topic.
+-  EXPECT_TRUE(pub.PublishRaw(msg.SerializeAsString(), msg.GetTypeName()));
++  EXPECT_TRUE(pub.PublishRaw(msg.SerializeAsString(), 
std::string(msg.GetTypeName())));
+ 
+   // Give some time to the subscribers.
+   std::this_thread::sleep_for(std::chrono::milliseconds(100));
+Index: gz-transport-ignition-transport8_8.5.1/src/gz.cc
+===================================================================
+--- gz-transport-ignition-transport8_8.5.1.orig/src/gz.cc
++++ gz-transport-ignition-transport8_8.5.1/src/gz.cc
+@@ -163,7 +163,7 @@ extern "C" void IGNITION_TRANSPORT_VISIB
+   {
+     // Create the node and advertise the topic
+     Node node;
+-    auto pub = node.Advertise(_topic, msg->GetTypeName());
++    auto pub = node.Advertise(_topic, std::string(msg->GetTypeName()));
+ 
+     // Publish the message
+     if (pub)
+Index: 
gz-transport-ignition-transport8_8.5.1/test/integration/twoProcsPubSub.cc
+===================================================================
+--- 
gz-transport-ignition-transport8_8.5.1.orig/test/integration/twoProcsPubSub.cc
++++ gz-transport-ignition-transport8_8.5.1/test/integration/twoProcsPubSub.cc
+@@ -170,7 +170,7 @@ TEST(twoProcPubSub, RawPubSubTwoProcsThr
+   // Publish messages for a few seconds
+   for (auto i = 0; i < 10; ++i)
+   {
+-    EXPECT_TRUE(pub.PublishRaw(msg.SerializeAsString(), msg.GetTypeName()));
++    EXPECT_TRUE(pub.PublishRaw(msg.SerializeAsString(), 
std::string(msg.GetTypeName())));
+     std::this_thread::sleep_for(std::chrono::milliseconds(500));
+   }
+ 
+@@ -220,7 +220,7 @@ TEST(twoProcPubSub, PubRawSubWrongTypesO
+ 
+   transport::Node node;
+   EXPECT_TRUE(node.SubscribeRaw(g_topic, cbRaw,
+-                                msgs::Int32().GetTypeName()));
++                                std::string(msgs::Int32().GetTypeName())));
+ 
+   // Wait some time before publishing.
+   std::this_thread::sleep_for(std::chrono::milliseconds(1500));
+@@ -319,7 +319,7 @@ TEST(twoProcPubSub, PubSubWrongTypesTwoR
+   transport::Node node3;
+   EXPECT_TRUE(node1.SubscribeRaw(g_topic, wrongCb, "wrong.msg.type"));
+   EXPECT_TRUE(node2.SubscribeRaw(g_topic, correctCb,
+-                                 msgs::Vector3d().GetTypeName()));
++                                 
std::string(msgs::Vector3d().GetTypeName())));
+   EXPECT_TRUE(node3.SubscribeRaw(g_topic, genericCb));
+ 
+ 
+Index: 
gz-transport-ignition-transport8_8.5.1/test/integration/twoProcsPubSubSubscriber_aux.cc
+===================================================================
+--- 
gz-transport-ignition-transport8_8.5.1.orig/test/integration/twoProcsPubSubSubscriber_aux.cc
++++ 
gz-transport-ignition-transport8_8.5.1/test/integration/twoProcsPubSubSubscriber_aux.cc
+@@ -99,7 +99,7 @@ void runSubscriber()
+ 
+   // Add a raw subscription to `node`
+   EXPECT_TRUE(node.SubscribeRaw(g_topic, cbRaw,
+-                                msgs::Vector3d().GetTypeName()));
++                                std::string(msgs::Vector3d().GetTypeName())));
+ 
+   int interval = 100;
+ 

diff --git a/net-libs/ignition-transport/ignition-transport-8.5.1.ebuild 
b/net-libs/ignition-transport/ignition-transport-8.5.1.ebuild
new file mode 100644
index 000000000000..8547358da527
--- /dev/null
+++ b/net-libs/ignition-transport/ignition-transport-8.5.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Combines ZeroMQ with Protobufs to create a message passing system"
+HOMEPAGE="https://github.com/ignitionrobotics/ign-transport";
+SRC_URI="https://github.com/ignitionrobotics/ign-transport/archive/${PN}8_${PV}.tar.gz";
+
+LICENSE="Apache-2.0"
+SLOT="8"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="
+       net-libs/ignition-msgs:5=
+       dev-libs/protobuf:=
+       >=net-libs/zeromq-4.2.0:=
+       sys-apps/util-linux
+       net-libs/cppzmq
+       dev-db/sqlite:3
+"
+RDEPEND="${DEPEND}"
+DEPEND="${DEPEND}
+       dev-build/ignition-cmake:2"
+BDEPEND="
+       dev-build/ignition-cmake:2
+       virtual/pkgconfig"
+CMAKE_BUILD_TYPE=RelWithDebInfo
+S="${WORKDIR}/gz-transport-ignition-transport8_${PV}"
+PATCHES=( "${FILESDIR}/protobuf30.patch" )

Reply via email to