aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2024-03-12 17:21:09 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-03-16 10:22:30 +0700
commitba2116183b0f9180dee757a997b6bb86fd23ad68 (patch)
tree1c42672c0d3f59d1d3bd597fe899052b11994164
parent406b6d88221b96e57b2944f7229dc7aa180fbfb7 (diff)
libraries/qt6: Backport upstream patches for the newer protobuf.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--libraries/qt6/newer_protobuf_1.patch58
-rw-r--r--libraries/qt6/newer_protobuf_2.patch42
-rw-r--r--libraries/qt6/qt6.SlackBuild4
3 files changed, 103 insertions, 1 deletions
diff --git a/libraries/qt6/newer_protobuf_1.patch b/libraries/qt6/newer_protobuf_1.patch
new file mode 100644
index 000000000000..a5f24bf302d5
--- /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 <google/protobuf/io/printer.h>
+ #include <google/protobuf/io/zero_copy_stream.h>
+ #include <google/protobuf/stubs/common.h>
+-#include <google/protobuf/stubs/logging.h>
+
+ #include <string>
+ #include <unordered_set>
+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 <set>
+ #include <google/protobuf/compiler/code_generator.h>
+-#include <google/protobuf/stubs/logging.h>
+-#include <google/protobuf/stubs/common.h>
++#include <google/protobuf/descriptor.h>
+ #include <google/protobuf/io/printer.h>
+ #include <google/protobuf/io/zero_copy_stream.h>
+-#include <google/protobuf/descriptor.h>
++#include <google/protobuf/stubs/common.h>
+
+ 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 <array>
+ #include <numeric>
+ #include <set>
+-#include <google/protobuf/stubs/logging.h>
+ #include <google/protobuf/stubs/common.h>
+ #include <google/protobuf/io/printer.h>
+ #include <google/protobuf/io/zero_copy_stream.h>
+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 <google/protobuf/descriptor.h>
+-#include <google/protobuf/stubs/logging.h>
+-#include <google/protobuf/stubs/common.h>
+ #include <google/protobuf/io/printer.h>
+ #include <google/protobuf/io/zero_copy_stream.h>
++#include <google/protobuf/stubs/common.h>
+
+ #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 000000000000..cfd5277570b9
--- /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 &parameter,
+ 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 &parameter,
+ 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 e1422cff2cce..92997fc90509 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 <cstdint>' qt3d/src/3rdparty/assimp/src/code/AssetLib/FBX/FBXBinaryTokenizer.cpp