Init qtgrpc
This commit is contained in:
parent
a0c08146d6
commit
d78a70ba17
76
0001-Fix-include-of-std-set.patch
Normal file
76
0001-Fix-include-of-std-set.patch
Normal file
@ -0,0 +1,76 @@
|
||||
From 0d0d14e5510127e9c5162e140a9ef6d004c2616a Mon Sep 17 00:00:00 2001
|
||||
From: Konrad Kujawa <konrad.kujawa@qt.io>
|
||||
Date: Thu, 22 Jun 2023 15:30:20 +0200
|
||||
Subject: [PATCH 1/3] Fix include of std::set
|
||||
|
||||
With new version of gRPC, compiler complains about missing include of
|
||||
the std::set. Move include from .cpp to .h files.
|
||||
|
||||
Pick-to: 6.6
|
||||
Change-Id: Ibfef277598cb9e620ab1b693a42564706302c9cc
|
||||
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
||||
---
|
||||
src/tools/qtgrpcgen/qgrpcgenerator.cpp | 1 -
|
||||
src/tools/qtgrpcgen/qgrpcgenerator.h | 3 ++-
|
||||
src/tools/qtprotobufgen/qprotobufgenerator.cpp | 4 ++--
|
||||
src/tools/qtprotobufgen/qprotobufgenerator.h | 2 ++
|
||||
4 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/tools/qtgrpcgen/qgrpcgenerator.cpp b/src/tools/qtgrpcgen/qgrpcgenerator.cpp
|
||||
index 4cab74d..3c2597e 100644
|
||||
--- a/src/tools/qtgrpcgen/qgrpcgenerator.cpp
|
||||
+++ b/src/tools/qtgrpcgen/qgrpcgenerator.cpp
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "utils.h"
|
||||
#include "options.h"
|
||||
|
||||
-#include <set>
|
||||
#include <google/protobuf/compiler/code_generator.h>
|
||||
#include <google/protobuf/stubs/logging.h>
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
diff --git a/src/tools/qtgrpcgen/qgrpcgenerator.h b/src/tools/qtgrpcgen/qgrpcgenerator.h
|
||||
index 809925e..996d37c 100644
|
||||
--- a/src/tools/qtgrpcgen/qgrpcgenerator.h
|
||||
+++ b/src/tools/qtgrpcgen/qgrpcgenerator.h
|
||||
@@ -4,8 +4,9 @@
|
||||
#ifndef QGRPCGENERATOR_H
|
||||
#define QGRPCGENERATOR_H
|
||||
|
||||
-#include <memory>
|
||||
#include "generatorbase.h"
|
||||
+#include <memory>
|
||||
+#include <set>
|
||||
|
||||
namespace google::protobuf {
|
||||
class FileDescriptor;
|
||||
diff --git a/src/tools/qtprotobufgen/qprotobufgenerator.cpp b/src/tools/qtprotobufgen/qprotobufgenerator.cpp
|
||||
index 5a1ccc2..8eaab81 100644
|
||||
--- a/src/tools/qtprotobufgen/qprotobufgenerator.cpp
|
||||
+++ b/src/tools/qtprotobufgen/qprotobufgenerator.cpp
|
||||
@@ -12,11 +12,10 @@
|
||||
#include "utils.h"
|
||||
#include "options.h"
|
||||
|
||||
-#include <cassert>
|
||||
-
|
||||
#include <array>
|
||||
+#include <cassert>
|
||||
#include <numeric>
|
||||
-#include <set>
|
||||
+
|
||||
#include <google/protobuf/stubs/logging.h>
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
#include <google/protobuf/io/printer.h>
|
||||
diff --git a/src/tools/qtprotobufgen/qprotobufgenerator.h b/src/tools/qtprotobufgen/qprotobufgenerator.h
|
||||
index 8aec33a..6239fd4 100644
|
||||
--- a/src/tools/qtprotobufgen/qprotobufgenerator.h
|
||||
+++ b/src/tools/qtprotobufgen/qprotobufgenerator.h
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#include "generatorbase.h"
|
||||
|
||||
+#include <set>
|
||||
+
|
||||
namespace google::protobuf {
|
||||
class FileDescriptor;
|
||||
class Descriptor;
|
||||
79
0002-Remove-protobuf-logging.h-include.patch
Normal file
79
0002-Remove-protobuf-logging.h-include.patch
Normal file
@ -0,0 +1,79 @@
|
||||
From 13905778c4b04e18bf19f4bf47055068613d86bd Mon Sep 17 00:00:00 2001
|
||||
From: Konrad Kujawa <konrad.kujawa@qt.io>
|
||||
Date: Thu, 22 Jun 2023 15:33:11 +0200
|
||||
Subject: [PATCH] Remove protobuf logging.h include
|
||||
|
||||
This include was removed in the new version of the protobuf,
|
||||
and it was unused anyway.
|
||||
|
||||
Pick-to: 6.6
|
||||
Change-Id: I5c68f960c031d7f366ab3dc1b690dc9050369975
|
||||
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
||||
---
|
||||
src/tools/qtgrpcgen/clientdeclarationprinter.cpp | 1 -
|
||||
src/tools/qtgrpcgen/qgrpcgenerator.cpp | 5 ++---
|
||||
src/tools/qtprotobufgen/qprotobufgenerator.cpp | 1 -
|
||||
src/tools/qtprotoccommon/generatorbase.cpp | 3 +--
|
||||
4 files changed, 3 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/tools/qtgrpcgen/clientdeclarationprinter.cpp b/src/tools/qtgrpcgen/clientdeclarationprinter.cpp
|
||||
index 9bd57a1..eedb91f 100644
|
||||
--- a/src/tools/qtgrpcgen/clientdeclarationprinter.cpp
|
||||
+++ b/src/tools/qtgrpcgen/clientdeclarationprinter.cpp
|
||||
@@ -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 --git a/src/tools/qtgrpcgen/qgrpcgenerator.cpp b/src/tools/qtgrpcgen/qgrpcgenerator.cpp
|
||||
index 3c2597e..ef2ce62 100644
|
||||
--- a/src/tools/qtgrpcgen/qgrpcgenerator.cpp
|
||||
+++ b/src/tools/qtgrpcgen/qgrpcgenerator.cpp
|
||||
@@ -11,11 +11,10 @@
|
||||
#include "options.h"
|
||||
|
||||
#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 --git a/src/tools/qtprotobufgen/qprotobufgenerator.cpp b/src/tools/qtprotobufgen/qprotobufgenerator.cpp
|
||||
index 8eaab81..941ef97 100644
|
||||
--- a/src/tools/qtprotobufgen/qprotobufgenerator.cpp
|
||||
+++ b/src/tools/qtprotobufgen/qprotobufgenerator.cpp
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <cassert>
|
||||
#include <numeric>
|
||||
|
||||
-#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 --git a/src/tools/qtprotoccommon/generatorbase.cpp b/src/tools/qtprotoccommon/generatorbase.cpp
|
||||
index bc51206..eeb05f2 100644
|
||||
--- a/src/tools/qtprotoccommon/generatorbase.cpp
|
||||
+++ b/src/tools/qtprotoccommon/generatorbase.cpp
|
||||
@@ -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"
|
||||
--
|
||||
2.41.0
|
||||
|
||||
27
0003-Add-missing-memory-include.patch
Normal file
27
0003-Add-missing-memory-include.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 994f268079d4c56262e19f874b0e7091b9199e70 Mon Sep 17 00:00:00 2001
|
||||
From: Konrad Kujawa <konrad.kujawa@qt.io>
|
||||
Date: Thu, 22 Jun 2023 16:00:22 +0200
|
||||
Subject: [PATCH 3/3] Add missing memory include
|
||||
|
||||
Pick-to: 6.6
|
||||
Change-Id: I1235a410865cc7f7dfab37c6b73aebd6f9cbb14e
|
||||
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
||||
---
|
||||
src/tools/qtprotobufgen/qprotobufgenerator.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/tools/qtprotobufgen/qprotobufgenerator.h b/src/tools/qtprotobufgen/qprotobufgenerator.h
|
||||
index 1266f02..552f7f2 100644
|
||||
--- a/src/tools/qtprotobufgen/qprotobufgenerator.h
|
||||
+++ b/src/tools/qtprotobufgen/qprotobufgenerator.h
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "generatorbase.h"
|
||||
|
||||
+#include <memory>
|
||||
#include <set>
|
||||
|
||||
namespace google::protobuf {
|
||||
--
|
||||
2.41.0
|
||||
|
||||
109
qt6-qtgrpc.spec
Normal file
109
qt6-qtgrpc.spec
Normal file
@ -0,0 +1,109 @@
|
||||
%global qt_module qtgrpc
|
||||
|
||||
%global examples 0
|
||||
|
||||
%define short_version 6.5
|
||||
|
||||
Summary: gRPC and Protobuf generator and bindings for Qt framework
|
||||
Name: qt6-%{qt_module}
|
||||
Version: 6.5.1
|
||||
Release: 1
|
||||
License: LGPLv3 or GPLv2+
|
||||
URL: https://www.qt.io
|
||||
Source0: https://download.qt.io/official_releases/qt/%{short_version}/%{version}/submodules/%{qt_module}-everywhere-src-%{version}.tar.xz
|
||||
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch0: 0001-Fix-include-of-std-set.patch
|
||||
Patch1: 0002-Remove-protobuf-logging.h-include.patch
|
||||
Patch2: 0003-Add-missing-memory-include.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: grpc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: protobuf
|
||||
BuildRequires: ninja-build
|
||||
BuildRequires: qt6-qtbase-devel >= %{version}
|
||||
BuildRequires: qt6-qtbase-private-devel
|
||||
%{?_qt6:Requires: %{_qt6}%{?_isa} = %{_qt6_version}}
|
||||
|
||||
%description
|
||||
gRPC and Protobuf generator and bindings for Qt framework.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: qt6-qtbase-devel%{?_isa}
|
||||
%description devel
|
||||
%{summary}.
|
||||
|
||||
%if 0%{?examples}
|
||||
%package examples
|
||||
Summary: Programming examples for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
%description examples
|
||||
%{summary}.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -n %{qt_module}-everywhere-src-%{version} -p1
|
||||
|
||||
|
||||
%build
|
||||
%cmake_qt6 -DQT_BUILD_EXAMPLES:BOOL=%{?examples:ON}%{!?examples:OFF}
|
||||
|
||||
cmake --build . %{?_smp_mflags} --verbose
|
||||
|
||||
|
||||
%install
|
||||
DESTDIR="%{buildroot}" cmake --install .
|
||||
|
||||
## .prl/.la file love
|
||||
# nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs
|
||||
pushd %{buildroot}%{_qt6_libdir}
|
||||
for prl_file in libQt6*.prl ; do
|
||||
sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" ${prl_file}
|
||||
if [ -f "$(basename ${prl_file} .prl).so" ]; then
|
||||
rm -fv "$(basename ${prl_file} .prl).la"
|
||||
sed -i -e "/^QMAKE_PRL_LIBS/d" ${prl_file}
|
||||
fi
|
||||
done
|
||||
popd
|
||||
|
||||
%files
|
||||
%license LICENSES/*
|
||||
%{_qt6_libdir}/libQt6Grpc.so.6*
|
||||
%{_qt6_libdir}/libQt6Protobuf.so.6*
|
||||
|
||||
%files devel
|
||||
%{_qt6_libdir}/cmake/Qt6Grpc/
|
||||
%{_qt6_libdir}/cmake/Qt6Protobuf/
|
||||
%{_qt6_libdir}/cmake/Qt6/FindWrapgRPC.cmake
|
||||
%{_qt6_libdir}/cmake/Qt6/FindWrapgRPCPlugin.cmake
|
||||
%{_qt6_libdir}/cmake/Qt6/FindWrapProtobuf.cmake
|
||||
%{_qt6_libdir}/cmake/Qt6/FindWrapProtoc.cmake
|
||||
%{_qt6_libdir}/cmake/Qt6BuildInternals/StandaloneTests/QtGrpcTestsConfig.cmake
|
||||
%{_qt6_archdatadir}/modules/Grpc.json
|
||||
%{_qt6_archdatadir}/modules/Protobuf.json
|
||||
%{_qt6_archdatadir}/metatypes/qt6grpc_*_metatypes.json
|
||||
%{_qt6_archdatadir}/metatypes/qt6protobuf_*_metatypes.json
|
||||
%{_qt6_includedir}/QtGrpc/
|
||||
%{_qt6_includedir}/QtProtobuf/
|
||||
%{_qt6_libdir}/libQt6Grpc.prl
|
||||
%{_qt6_libdir}/libQt6Grpc.so
|
||||
%{_qt6_mkspecsdir}/modules/qt_lib_grpc.pri
|
||||
%{_qt6_mkspecsdir}/modules/qt_lib_grpc_private.pri
|
||||
%{_qt6_mkspecsdir}/modules/qt_lib_protobuf.pri
|
||||
%{_qt6_mkspecsdir}/modules/qt_lib_protobuf_private.pri
|
||||
%{_qt6_libdir}/libQt6Protobuf.prl
|
||||
%{_qt6_libdir}/libQt6Protobuf.so
|
||||
%{_qt6_libdir}/pkgconfig/Qt6Grpc.pc
|
||||
%{_qt6_libdir}/pkgconfig/Qt6Protobuf.pc
|
||||
|
||||
%if 0%{?examples}
|
||||
%files examples
|
||||
%{_qt6_examplesdir}/
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Aug 18 2023 EastDong <xudong23@iscas.ac.cn> - 6.5.1-1
|
||||
- Init package
|
||||
4
qt6-qtgrpc.yaml
Normal file
4
qt6-qtgrpc.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: git
|
||||
src_repo: https://code.qt.io/qt/qtgrpc.git
|
||||
tag_prefix: "^v"
|
||||
separator: "."
|
||||
BIN
qtgrpc-everywhere-src-6.5.1.tar.xz
Normal file
BIN
qtgrpc-everywhere-src-6.5.1.tar.xz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user