net-libs/ignition-msgs: bump to 5.11.1 and build with protobuf 30

Signed-off-by: Alexis Ballier <aballier@gentoo.org>
This commit is contained in:
Alexis Ballier
2025-05-26 14:52:09 +02:00
parent c979a9ad12
commit 4aa472e56c
3 changed files with 105 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST ignition-msgs5_5.11.0.tar.gz 346560 BLAKE2B 87dd9c99f9d8bf8719f2968a89fbe9fd276d4b35f5a870eee0ab7476affdbca565fbdc7c3e5e94a29a21df6e7b6ace138a8db00ba838de6d8ba07478dd6a3456 SHA512 bbd71339c816947cbf91778303c4370e3d03b068421f0a043de3462d5eb691b16cbc3d19804cb353ad03f78f3e187af366e9d950fa05ebf22d0d08c565748bc4
DIST ignition-msgs5_5.11.1.tar.gz 346631 BLAKE2B 2d96ecd4e9fdfc6d1b63659fd63a17b75ab89588bd3acb7fb9a103a15c8469034b7a3e02acd2b82ed85b6592904e0abfe9adf204681dacb2a8386807dc1e1fac SHA512 0e9442a61a08c0ed91907b1d9855332a5a0dd5f9726a44e132261f270ac49d2c0956e3a0a0f5a118ede369bc030b3b7e4e1abb02c72e4df3187266cd56b7a0c4

View File

@@ -0,0 +1,78 @@
See: https://github.com/gazebosim/gz-msgs/commit/22c57006798470db63e8ecaff7b49dce34d5e76f
Index: gz-msgs-ignition-msgs5_5.11.1/src/Generator.cc
===================================================================
--- gz-msgs-ignition-msgs5_5.11.1.orig/src/Generator.cc
+++ gz-msgs-ignition-msgs5_5.11.1/src/Generator.cc
@@ -71,12 +71,12 @@ bool Generator::Generate(const FileDescr
OutputDirectory *_generatorContext,
std::string * /*_error*/) const
{
- std::string headerFilename = _file->name();
+ std::string headerFilename(_file->name());
std::string delim = ".proto";
size_t pos = headerFilename.rfind(delim);
headerFilename.replace(pos, delim.size(), ".pb.h");
- std::string sourceFilename = _file->name();
+ std::string sourceFilename( _file->name());
pos = sourceFilename.rfind(delim);
sourceFilename.replace(pos, delim.size(), ".pb.cc");
@@ -142,10 +142,11 @@ bool Generator::Generate(const FileDescr
printer.Print("#endif\n", "name", "includes");
// Call the IGN_REGISTER_STATIC_MSG macro
- std::string factory = "IGN_REGISTER_STATIC_MSG(\"ign_msgs.";
- factory += _file->message_type(0)->name() + "\", " +
- _file->message_type(0)->name() +")";
- printer.Print(factory.c_str(), "name", "includes");
+ std::stringstream factory;
+ factory << "IGN_REGISTER_STATIC_MSG(\"ign_msgs.";
+ factory << _file->message_type(0)->name() << "\", " <<
+ _file->message_type(0)->name() << ")";
+ printer.Print(factory.str(), "name", "includes");
}
// Inject code in the auto-generated header files immediately before closing
@@ -156,26 +157,27 @@ bool Generator::Generate(const FileDescr
io::Printer printer(output.get(), '$');
// Define std::unique_ptr types for our messages
- std::string ptrTypes = "typedef std::unique_ptr<"
- + _file->message_type(0)->name() + "> "
- + _file->message_type(0)->name() + "UniquePtr;\n";
+ std::stringstream ptrTypes;
+ ptrTypes << "typedef std::unique_ptr<"
+ << _file->message_type(0)->name() << "> "
+ << _file->message_type(0)->name() << "UniquePtr;\n";
// Define const std::unique_ptr types for our messages
- ptrTypes += "typedef std::unique_ptr<const "
- + _file->message_type(0)->name() + "> Const"
- + _file->message_type(0)->name() + "UniquePtr;\n";
+ ptrTypes << "typedef std::unique_ptr<const "
+ << _file->message_type(0)->name() << "> Const"
+ << _file->message_type(0)->name() << "UniquePtr;\n";
// Define std::shared_ptr types for our messages
- ptrTypes += "typedef std::shared_ptr<"
- + _file->message_type(0)->name() + "> "
- + _file->message_type(0)->name() + "SharedPtr;\n";
+ ptrTypes << "typedef std::shared_ptr<"
+ << _file->message_type(0)->name() << "> "
+ << _file->message_type(0)->name() << "SharedPtr;\n";
// Define const std::shared_ptr types for our messages
- ptrTypes += "typedef std::shared_ptr<const "
- + _file->message_type(0)->name() + "> Const"
- + _file->message_type(0)->name() + "SharedPtr;\n";
+ ptrTypes << "typedef std::shared_ptr<const "
+ << _file->message_type(0)->name() << "> Const"
+ << _file->message_type(0)->name() << "SharedPtr;\n";
- printer.Print(ptrTypes.c_str(), "name", "namespace_scope");
+ printer.Print(ptrTypes.str(), "name", "namespace_scope");
}
// Pop the warning suppression stack for MSVC

View File

@@ -0,0 +1,26 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake
DESCRIPTION="Protobuf messages and functions for robot applications"
HOMEPAGE="https://github.com/ignitionrobotics/ign-msgs"
SRC_URI="https://github.com/ignitionrobotics/ign-msgs/archive/${PN}5_${PV}.tar.gz"
LICENSE="Apache-2.0"
SLOT="5"
KEYWORDS="~amd64"
IUSE=""
RDEPEND="dev-libs/protobuf:=
sci-libs/ignition-math:6=
dev-libs/tinyxml2:=
"
DEPEND="${RDEPEND}
dev-build/ignition-cmake:2"
BDEPEND="dev-build/ignition-cmake:2"
CMAKE_BUILD_TYPE=RelWithDebInfo
S="${WORKDIR}/gz-msgs-ignition-msgs5_${PV}"
PATCHES=( "${FILESDIR}/protobuf30.patch" )