From ba2116183b0f9180dee757a997b6bb86fd23ad68 Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Tue, 12 Mar 2024 17:21:09 +0100 Subject: libraries/qt6: Backport upstream patches for the newer protobuf. Signed-off-by: Matteo Bernardini Signed-off-by: Willy Sudiarto Raharjo --- libraries/qt6/newer_protobuf_1.patch | 58 ++++++++++++++++++++++++++++++++++++ libraries/qt6/newer_protobuf_2.patch | 42 ++++++++++++++++++++++++++ libraries/qt6/qt6.SlackBuild | 4 ++- 3 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 libraries/qt6/newer_protobuf_1.patch create mode 100644 libraries/qt6/newer_protobuf_2.patch (limited to 'libraries') diff --git a/libraries/qt6/newer_protobuf_1.patch b/libraries/qt6/newer_protobuf_1.patch new file mode 100644 index 0000000000..a5f24bf302 --- /dev/null +++ b/libraries/qt6/newer_protobuf_1.patch @@ -0,0 +1,58 @@ +Backported to 6.5.2 from 1a610ab9c7edde2e27ff707c9e534172e288e8ed in v6.7.0-beta1~260 + +https://codereview.qt-project.org/gitweb?p=qt%2Fqtgrpc.git;a=commit;h=1a610ab9c7edde2e27ff707c9e534172e288e8ed + +diff -Naur qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtgrpcgen/clientdeclarationprinter.cpp qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtgrpcgen/clientdeclarationprinter.cpp +--- qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtgrpcgen/clientdeclarationprinter.cpp 2023-07-07 14:29:20.000000000 +0200 ++++ qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtgrpcgen/clientdeclarationprinter.cpp 2024-03-12 08:14:21.885741000 +0100 +@@ -8,7 +8,6 @@ + #include + #include + #include +-#include + + #include + #include +diff -Naur qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtgrpcgen/qgrpcgenerator.cpp qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtgrpcgen/qgrpcgenerator.cpp +--- qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtgrpcgen/qgrpcgenerator.cpp 2023-07-07 14:29:20.000000000 +0200 ++++ qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtgrpcgen/qgrpcgenerator.cpp 2024-03-12 08:16:45.956741000 +0100 +@@ -12,11 +12,10 @@ + + #include + #include +-#include +-#include ++#include + #include + #include +-#include ++#include + + using namespace ::QtGrpc; + using namespace ::qtprotoccommon; +diff -Naur qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtprotobufgen/qprotobufgenerator.cpp qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtprotobufgen/qprotobufgenerator.cpp +--- qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtprotobufgen/qprotobufgenerator.cpp 2023-07-07 14:29:20.000000000 +0200 ++++ qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtprotobufgen/qprotobufgenerator.cpp 2024-03-12 08:17:09.574741000 +0100 +@@ -17,7 +17,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff -Naur qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtprotoccommon/generatorbase.cpp qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtprotoccommon/generatorbase.cpp +--- qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtprotoccommon/generatorbase.cpp 2023-07-07 14:29:20.000000000 +0200 ++++ qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtprotoccommon/generatorbase.cpp 2024-03-12 08:18:20.905741000 +0100 +@@ -5,10 +5,9 @@ + #include "generatorbase.h" + + #include +-#include +-#include + #include + #include ++#include + + #include "utils.h" + #include "commontemplates.h" diff --git a/libraries/qt6/newer_protobuf_2.patch b/libraries/qt6/newer_protobuf_2.patch new file mode 100644 index 0000000000..cfd5277570 --- /dev/null +++ b/libraries/qt6/newer_protobuf_2.patch @@ -0,0 +1,42 @@ +Backported to 6.5.2 from 2297f2da520b7eebe10dd6b5304e5a4c3c18a57c in v6.7.0-beta1~220 + +https://codereview.qt-project.org/gitweb?p=qt/qtgrpc.git;a=commit;h=2297f2da520b7eebe10dd6b5304e5a4c3c18a57c + +diff -Naur qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtgrpcgen/qgrpcgenerator.cpp qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtgrpcgen/qgrpcgenerator.cpp +--- qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtgrpcgen/qgrpcgenerator.cpp 2023-07-07 14:29:20.000000000 +0200 ++++ qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtgrpcgen/qgrpcgenerator.cpp 2024-03-12 08:40:27.884741000 +0100 +@@ -32,13 +32,9 @@ + bool QGrpcGenerator::Generate(const FileDescriptor *file, + [[maybe_unused]] const std::string ¶meter, + GeneratorContext *generatorContext, +- std::string *error) const ++ [[maybe_unused]] std::string *error) const + { + assert(file != nullptr && generatorContext != nullptr); +- if (file->syntax() != FileDescriptor::SYNTAX_PROTO3) { +- *error = "Invalid proto used. qtgrpcgen only supports 'proto3' syntax"; +- return false; +- } + + return GenerateClientServices(file, generatorContext); + } +diff -Naur qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtprotobufgen/qprotobufgenerator.cpp qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtprotobufgen/qprotobufgenerator.cpp +--- qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtprotobufgen/qprotobufgenerator.cpp 2023-07-07 14:29:20.000000000 +0200 ++++ qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtprotobufgen/qprotobufgenerator.cpp 2024-03-12 08:42:48.976741000 +0100 +@@ -37,15 +37,10 @@ + bool QProtobufGenerator::Generate(const FileDescriptor *file, + [[maybe_unused]] const std::string ¶meter, + GeneratorContext *generatorContext, +- std::string *error) const ++ [[maybe_unused]] std::string *error) const + { + assert(file != nullptr && generatorContext != nullptr); + +- if (file->syntax() != FileDescriptor::SYNTAX_PROTO3) { +- *error = "Invalid proto used. qtprotobufgen only supports 'proto3' syntax"; +- return false; +- } +- + return GenerateMessages(file, generatorContext); + } + diff --git a/libraries/qt6/qt6.SlackBuild b/libraries/qt6/qt6.SlackBuild index e1422cff2c..92997fc905 100644 --- a/libraries/qt6/qt6.SlackBuild +++ b/libraries/qt6/qt6.SlackBuild @@ -36,7 +36,7 @@ SYSTEM_FFMPEG=${SYSTEM_FFMPEG:-ON} SYSTEM_HARFBUZZ=${SYSTEM_HARFBUZZ:-OFF} #Link against qt6's harfbuzz because Slackware 15.0's package is too old SYSTEM_SQLITE=${SYSTEM_SQLITE:-ON} SYSTEM_XCB_INPUT=${SYSTEM_XCB_INPUT:-ON} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -87,6 +87,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +patch -p1 < $CWD/newer_protobuf_1.patch +patch -p1 < $CWD/newer_protobuf_2.patch #Fix compile on -current/gcc13+ sed -i '54i #include ' qt3d/src/3rdparty/assimp/src/code/AssetLib/FBX/FBXBinaryTokenizer.cpp -- cgit v1.2.3