commit: 4aa472e56c84ef292882a3c6e17c5a4261cc192e Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> AuthorDate: Mon May 26 12:52:09 2025 +0000 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> CommitDate: Fri Jun 6 12:51:42 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4aa472e5
net-libs/ignition-msgs: bump to 5.11.1 and build with protobuf 30 Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org> net-libs/ignition-msgs/Manifest | 1 + net-libs/ignition-msgs/files/protobuf30.patch | 78 ++++++++++++++++++++++ net-libs/ignition-msgs/ignition-msgs-5.11.1.ebuild | 26 ++++++++ 3 files changed, 105 insertions(+) diff --git a/net-libs/ignition-msgs/Manifest b/net-libs/ignition-msgs/Manifest index f718b83b59ea..ff8dbc645022 100644 --- a/net-libs/ignition-msgs/Manifest +++ b/net-libs/ignition-msgs/Manifest @@ -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 diff --git a/net-libs/ignition-msgs/files/protobuf30.patch b/net-libs/ignition-msgs/files/protobuf30.patch new file mode 100644 index 000000000000..3f17d6da655e --- /dev/null +++ b/net-libs/ignition-msgs/files/protobuf30.patch @@ -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 diff --git a/net-libs/ignition-msgs/ignition-msgs-5.11.1.ebuild b/net-libs/ignition-msgs/ignition-msgs-5.11.1.ebuild new file mode 100644 index 000000000000..5995e9c285dc --- /dev/null +++ b/net-libs/ignition-msgs/ignition-msgs-5.11.1.ebuild @@ -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" )
