Antonio Rojas pushed to branch main at Arch Linux / Packaging / Packages /
qt6-grpc
Commits:
eafb2418 by Antonio Rojas at 2023-09-28T13:26:39+02:00
Rebase grpc patch
- - - - -
2 changed files:
- PKGBUILD
- + protobuf-23.patch
Changes:
=====================================
PKGBUILD
=====================================
@@ -13,8 +13,14 @@ depends=(qt6-base grpc)
makedepends=(cmake ninja protobuf)
groups=(qt6)
_pkgfn=${pkgname/6-/}-everywhere-src-$_qtver
-source=(https://download.qt.io/official_releases/qt/${pkgver%.*}/$_qtver/submodules/$_pkgfn.tar.xz)
-sha256sums=('6ebf7a73daa6388e15e95a1de021dc4d097fe0f6b71b106178c388cc7ec18b83')
+source=(https://download.qt.io/official_releases/qt/${pkgver%.*}/$_qtver/submodules/$_pkgfn.tar.xz
+ protobuf-23.patch)
+sha256sums=('6ebf7a73daa6388e15e95a1de021dc4d097fe0f6b71b106178c388cc7ec18b83'
+ '838bb8aba6f2f855e16fb08741248c8524ea165b546c186c8fb80c9943fa4b98')
+
+prepare() {
+ patch -d $_pkgfn -p1 < protobuf-23.patch # Fix build with protobuf 23
+}
build() {
cmake -B build -S $_pkgfn -G Ninja \
=====================================
protobuf-23.patch
=====================================
@@ -0,0 +1,42 @@
+diff --git a/src/tools/qtgrpcgen/qgrpcgenerator.cpp
b/src/tools/qtgrpcgen/qgrpcgenerator.cpp
+index 4cab74d..1d5e04d 100644
+--- a/src/tools/qtgrpcgen/qgrpcgenerator.cpp
++++ b/src/tools/qtgrpcgen/qgrpcgenerator.cpp
+@@ -12,6 +12,7 @@
+
+ #include <set>
+ #include <google/protobuf/compiler/code_generator.h>
++#include <google/protobuf/descriptor_legacy.h>
+ #include <google/protobuf/descriptor.h>
+ #include <google/protobuf/io/printer.h>
+ #include <google/protobuf/io/zero_copy_stream.h>
+@@ -35,7 +34,7 @@ bool QGrpcGenerator::Generate(const FileDescriptor *file,
+ std::string *error) const
+ {
+ assert(file != nullptr && generatorContext != nullptr);
+- if (file->syntax() != FileDescriptor::SYNTAX_PROTO3) {
++ if (FileDescriptorLegacy(file).syntax() !=
FileDescriptorLegacy::SYNTAX_PROTO3) {
+ *error = "Invalid proto used. qtgrpcgen only supports 'proto3'
syntax";
+ return false;
+ }
+diff --git a/src/tools/qtprotobufgen/qprotobufgenerator.cpp
b/src/tools/qtprotobufgen/qprotobufgenerator.cpp
+index 5a1ccc2..e0d8981 100644
+--- a/src/tools/qtprotobufgen/qprotobufgenerator.cpp
++++ b/src/tools/qtprotobufgen/qprotobufgenerator.cpp
+@@ -17,6 +17,7 @@
+ #include <array>
+ #include <numeric>
+ #include <set>
++#include <google/protobuf/descriptor_legacy.h>
+ #include <google/protobuf/stubs/common.h>
+ #include <google/protobuf/io/printer.h>
+ #include <google/protobuf/io/zero_copy_stream.h>
+@@ -41,7 +40,7 @@ bool QProtobufGenerator::Generate(const FileDescriptor *file,
+ {
+ assert(file != nullptr && generatorContext != nullptr);
+
+- if (file->syntax() != FileDescriptor::SYNTAX_PROTO3) {
++ if (FileDescriptorLegacy(file).syntax() !=
FileDescriptorLegacy::SYNTAX_PROTO3) {
+ *error = "Invalid proto used. qtprotobufgen only supports 'proto3'
syntax";
+ return false;
+ }
View it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/qt6-grpc/-/commit/eafb2418a54a6f0468ad0f94ef6f041608065e07
--
View it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/qt6-grpc/-/commit/eafb2418a54a6f0468ad0f94ef6f041608065e07
You're receiving this email because of your account on gitlab.archlinux.org.