pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libArcus: Migration to protobuf v30.0



Module Name:	pkgsrc-wip
Committed By:	Atsushi Toyokura <asteria.at%gmail.com@localhost>
Pushed By:	steleto
Date:		Wed Dec 31 23:33:17 2025 +0900
Changeset:	435d01b09a43a7eafc7d93d3d6ccacb54058f78d

Modified Files:
	libArcus/Makefile
	libArcus/distinfo
	libArcus/patches/patch-src_MessageTypeStore.cpp
Added Files:
	libArcus/patches/patch-python_PythonMessage.cpp

Log Message:
libArcus: Migration to protobuf v30.0

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=435d01b09a43a7eafc7d93d3d6ccacb54058f78d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 libArcus/Makefile                               |  8 +++---
 libArcus/distinfo                               |  3 +-
 libArcus/patches/patch-python_PythonMessage.cpp | 18 ++++++++++++
 libArcus/patches/patch-src_MessageTypeStore.cpp | 37 +++++++++++++++++++++++--
 4 files changed, 59 insertions(+), 7 deletions(-)

diffs:
diff --git a/libArcus/Makefile b/libArcus/Makefile
index 1c930212fd..d8d5f7d3a1 100644
--- a/libArcus/Makefile
+++ b/libArcus/Makefile
@@ -13,9 +13,8 @@ HOMEPAGE=	https://github.com/Ultimaker/libArcus/
 COMMENT=	Creating a socket in a thread and using this socket to messages
 LICENSE=	gnu-lgpl-v3
 
-USE_CMAKE=	yes
 USE_LANGUAGES=	c c++
-FORCE_CXX_STD+=	c++14
+FORCE_CXX_STD=	c++17
 
 SUBST_CLASSES+=		sip
 SUBST_STAGE.sip=	pre-configure
@@ -25,11 +24,12 @@ SUBST_SED.sip=		-e 's|\(SIP_EXECUTABLE sip\)|\1${PYVERSSUFFIX}|'
 
 PY_PATCHPLIST=	YES
 
-PYTHON_VERSIONS_ACCEPTED=	311 310
+PYTHON_VERSIONS_ACCEPTED=	311
 
 BUILDLINK_DEPMETHOD.py-sip4?=	build
 
-.include "../../lang/python/extension.mk"
+.include "../../devel/cmake/build.mk"
 .include "../../devel/protobuf/buildlink3.mk"
+.include "../../lang/python/extension.mk"
 .include "../../wip/py-sip4/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/libArcus/distinfo b/libArcus/distinfo
index 969638fc58..34e2bfa8bb 100644
--- a/libArcus/distinfo
+++ b/libArcus/distinfo
@@ -4,5 +4,6 @@ BLAKE2s (libArcus/4.13.0.tar.gz) = effa6edbb0f4a10e1957a3f735cbd2e71fd3b3ab0a763
 SHA512 (libArcus/4.13.0.tar.gz) = a48ab1cb286c13b817363e113707499f2619724c8d2f7672309f9aad78123a89f60e60e92932d8761af87ec5f868f8c319717457532d45e3f2d8e5c3cc010db5
 Size (libArcus/4.13.0.tar.gz) = 32079 bytes
 SHA1 (patch-CMakeLists.txt) = f2d9c078cab1fe741c18d749ad7cac265624335e
-SHA1 (patch-src_MessageTypeStore.cpp) = f8a5b7d07c276167969330ad6a5a2bfd4be3406e
+SHA1 (patch-python_PythonMessage.cpp) = 6c137c70fe9b74dc00b65501e6d2900c4389c59d
+SHA1 (patch-src_MessageTypeStore.cpp) = ca5608aab27c1cdd6fb737d3a740bf9ced9ef209
 SHA1 (patch-src_Socket__p.h) = c7933e7fe5e6c7a4ebf913bade8b99fdc3fe1395
diff --git a/libArcus/patches/patch-python_PythonMessage.cpp b/libArcus/patches/patch-python_PythonMessage.cpp
new file mode 100644
index 0000000000..31a1e746e2
--- /dev/null
+++ b/libArcus/patches/patch-python_PythonMessage.cpp
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Migration to protobuf v30.0
+* string_view return type
+
+https://protobuf.dev/support/migration/
+
+--- python/PythonMessage.cpp.orig	2025-12-31 14:06:43.017240303 +0000
++++ python/PythonMessage.cpp
+@@ -47,7 +47,7 @@ PythonMessage::~PythonMessage()
+ 
+ std::string Arcus::PythonMessage::getTypeName() const
+ {
+-    return  _message->GetTypeName();
++    return  std::string{_message->GetTypeName()};
+ }
+ 
+ MessagePtr Arcus::PythonMessage::getSharedMessage() const
diff --git a/libArcus/patches/patch-src_MessageTypeStore.cpp b/libArcus/patches/patch-src_MessageTypeStore.cpp
index ac9bae1786..029354c20d 100644
--- a/libArcus/patches/patch-src_MessageTypeStore.cpp
+++ b/libArcus/patches/patch-src_MessageTypeStore.cpp
@@ -1,8 +1,14 @@
 $NetBSD$
 
-Migration to protobuf v22
+Migration to protobuf v22.0
+* ErrorCollector Migration
 
---- src/MessageTypeStore.cpp.orig	2024-08-19 13:43:12.527078688 +0000
+Migration to protobuf v30.0
+* string_view return type
+
+https://protobuf.dev/support/migration/
+
+--- src/MessageTypeStore.cpp.orig	2021-11-26 15:37:16.000000000 +0000
 +++ src/MessageTypeStore.cpp
 @@ -52,7 +52,7 @@ class ErrorCollector : public google::pr
  public:
@@ -13,3 +19,30 @@ Migration to protobuf v22
      {
          _stream << "[" << filename << " (" << line << "," << column << ")] " << message << std::endl;
          _error_count++;
+@@ -127,7 +127,7 @@ MessagePtr Arcus::MessageTypeStore::crea
+ 
+ uint32_t Arcus::MessageTypeStore::getMessageTypeId(const MessagePtr& message)
+ {
+-    return hash(message->GetTypeName());
++    return hash(std::string{message->GetTypeName()});
+ }
+ 
+ std::string Arcus::MessageTypeStore::getErrorMessages() const
+@@ -137,7 +137,7 @@ std::string Arcus::MessageTypeStore::get
+ 
+ bool Arcus::MessageTypeStore::registerMessageType(const google::protobuf::Message* message_type)
+ {
+-    uint32_t type_id = hash(message_type->GetTypeName());
++    uint32_t type_id = hash(std::string{message_type->GetTypeName()});
+ 
+     if(hasType(type_id))
+     {
+@@ -189,7 +189,7 @@ bool Arcus::MessageTypeStore::registerAl
+ 
+         auto message_type = d->message_factory->GetPrototype(message_type_descriptor);
+ 
+-        uint32_t type_id = hash(message_type->GetTypeName());
++        uint32_t type_id = hash(std::string{message_type->GetTypeName()});
+ 
+         d->message_types[type_id] = message_type;
+         d->message_type_mapping[message_type_descriptor] = type_id;


Home | Main Index | Thread Index | Old Index