summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongju Chae <dongju.chae@samsung.com>2021-02-03 14:36:06 +0900
committerDongju Chae <dongju.chae@samsung.com>2021-02-03 14:59:14 +0900
commitd7dfaf3ec28a2879188d20c5fe9c208f0e50bcc5 (patch)
treeaa86d7284a6229d179818f5a4d0e443992ee15ce
parent9b66d922bdade05f9d3e7b135a0cd968caaad83a (diff)
downloadflatbuffers-tizen_6.5_m1.tar.gz
flatbuffers-tizen_6.5_m1.tar.bz2
flatbuffers-tizen_6.5_m1.zip
This patch fixes cpp codegen for gRPC-1.35.0, which is to be the latest version in tizen upstream. The path of cpp header files has been changed. See also - https://github.com/google/flatbuffers/issues/5836 - https://github.com/google/flatbuffers/pull/6338 Change-Id: I8b284c08de6387d4df45f4a94678d29d5725fb98 Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
-rw-r--r--debian/changelog6
-rw-r--r--debian/patches/0002-Fix-cpp-codegen-for-gRPC-1.35.0.patch61
-rw-r--r--debian/patches/series1
-rw-r--r--packaging/0002-Fix-cpp-codegen-for-gRPC-1.35.0.patch61
-rw-r--r--packaging/flatbuffers.spec7
5 files changed, 135 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index b3e22e6d..bd8dd5f8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+flatbuffers (1.12.0-5) unstable; urgency=medium
+
+ * Apply the patch file to fix gRPC cpp codegen
+
+ -- Dongju Chae <dongju.chae@samsung.com> Wed, 03 Feb 2021 14:45:00 +0900
+
flatbuffers (1.12.0-4) unstable; urgency=medium
* Apply the patch file to fix out-of-sync with gRPC
diff --git a/debian/patches/0002-Fix-cpp-codegen-for-gRPC-1.35.0.patch b/debian/patches/0002-Fix-cpp-codegen-for-gRPC-1.35.0.patch
new file mode 100644
index 00000000..6d686104
--- /dev/null
+++ b/debian/patches/0002-Fix-cpp-codegen-for-gRPC-1.35.0.patch
@@ -0,0 +1,61 @@
+--- a/grpc/src/compiler/cpp_generator.cc
++++ b/grpc/src/compiler/cpp_generator.cc
+@@ -144,15 +144,15 @@ grpc::string GetHeaderIncludes(grpc_generator::File *file,
+ std::map<grpc::string, grpc::string> vars;
+
+ static const char *headers_strs[] = {
+- "grpc++/impl/codegen/async_stream.h",
+- "grpc++/impl/codegen/async_unary_call.h",
+- "grpc++/impl/codegen/method_handler_impl.h",
+- "grpc++/impl/codegen/proto_utils.h",
+- "grpc++/impl/codegen/rpc_method.h",
+- "grpc++/impl/codegen/service_type.h",
+- "grpc++/impl/codegen/status.h",
+- "grpc++/impl/codegen/stub_options.h",
+- "grpc++/impl/codegen/sync_stream.h"};
++ "grpcpp/impl/codegen/async_stream.h",
++ "grpcpp/impl/codegen/async_unary_call.h",
++ "grpcpp/impl/codegen/method_handler.h",
++ "grpcpp/impl/codegen/proto_utils.h",
++ "grpcpp/impl/codegen/rpc_method.h",
++ "grpcpp/impl/codegen/service_type.h",
++ "grpcpp/impl/codegen/status.h",
++ "grpcpp/impl/codegen/stub_options.h",
++ "grpcpp/impl/codegen/sync_stream.h"};
+ std::vector<grpc::string> headers(headers_strs, array_end(headers_strs));
+ PrintIncludes(printer.get(), headers, params);
+ printer->Print(vars, "\n");
+@@ -1179,14 +1179,14 @@ grpc::string GetSourceIncludes(grpc_generator::File *file,
+ std::map<grpc::string, grpc::string> vars;
+
+ static const char *headers_strs[] = {
+- "grpc++/impl/codegen/async_stream.h",
+- "grpc++/impl/codegen/async_unary_call.h",
+- "grpc++/impl/codegen/channel_interface.h",
+- "grpc++/impl/codegen/client_unary_call.h",
+- "grpc++/impl/codegen/method_handler_impl.h",
+- "grpc++/impl/codegen/rpc_service_method.h",
+- "grpc++/impl/codegen/service_type.h",
+- "grpc++/impl/codegen/sync_stream.h"};
++ "grpcpp/impl/codegen/async_stream.h",
++ "grpcpp/impl/codegen/async_unary_call.h",
++ "grpcpp/impl/codegen/channel_interface.h",
++ "grpcpp/impl/codegen/client_unary_call.h",
++ "grpcpp/impl/codegen/method_handler.h",
++ "grpcpp/impl/codegen/rpc_service_method.h",
++ "grpcpp/impl/codegen/service_type.h",
++ "grpcpp/impl/codegen/sync_stream.h"};
+ std::vector<grpc::string> headers(headers_strs, array_end(headers_strs));
+ PrintIncludes(printer.get(), headers, params);
+
+@@ -1604,8 +1604,8 @@ grpc::string GetMockIncludes(grpc_generator::File *file,
+ std::map<grpc::string, grpc::string> vars;
+
+ static const char *headers_strs[] = {
+- "grpc++/impl/codegen/async_stream.h",
+- "grpc++/impl/codegen/sync_stream.h",
++ "grpcpp/impl/codegen/async_stream.h",
++ "grpcpp/impl/codegen/sync_stream.h",
+ "gmock/gmock.h",
+ };
+ std::vector<grpc::string> headers(headers_strs, array_end(headers_strs));
diff --git a/debian/patches/series b/debian/patches/series
index 9ce32910..83873899 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
0001-gRPC-Fix-out-of-sync-in-gRPC-support.patch
+0002-Fix-cpp-codegen-for-gRPC-1.35.0.patch
diff --git a/packaging/0002-Fix-cpp-codegen-for-gRPC-1.35.0.patch b/packaging/0002-Fix-cpp-codegen-for-gRPC-1.35.0.patch
new file mode 100644
index 00000000..6d686104
--- /dev/null
+++ b/packaging/0002-Fix-cpp-codegen-for-gRPC-1.35.0.patch
@@ -0,0 +1,61 @@
+--- a/grpc/src/compiler/cpp_generator.cc
++++ b/grpc/src/compiler/cpp_generator.cc
+@@ -144,15 +144,15 @@ grpc::string GetHeaderIncludes(grpc_generator::File *file,
+ std::map<grpc::string, grpc::string> vars;
+
+ static const char *headers_strs[] = {
+- "grpc++/impl/codegen/async_stream.h",
+- "grpc++/impl/codegen/async_unary_call.h",
+- "grpc++/impl/codegen/method_handler_impl.h",
+- "grpc++/impl/codegen/proto_utils.h",
+- "grpc++/impl/codegen/rpc_method.h",
+- "grpc++/impl/codegen/service_type.h",
+- "grpc++/impl/codegen/status.h",
+- "grpc++/impl/codegen/stub_options.h",
+- "grpc++/impl/codegen/sync_stream.h"};
++ "grpcpp/impl/codegen/async_stream.h",
++ "grpcpp/impl/codegen/async_unary_call.h",
++ "grpcpp/impl/codegen/method_handler.h",
++ "grpcpp/impl/codegen/proto_utils.h",
++ "grpcpp/impl/codegen/rpc_method.h",
++ "grpcpp/impl/codegen/service_type.h",
++ "grpcpp/impl/codegen/status.h",
++ "grpcpp/impl/codegen/stub_options.h",
++ "grpcpp/impl/codegen/sync_stream.h"};
+ std::vector<grpc::string> headers(headers_strs, array_end(headers_strs));
+ PrintIncludes(printer.get(), headers, params);
+ printer->Print(vars, "\n");
+@@ -1179,14 +1179,14 @@ grpc::string GetSourceIncludes(grpc_generator::File *file,
+ std::map<grpc::string, grpc::string> vars;
+
+ static const char *headers_strs[] = {
+- "grpc++/impl/codegen/async_stream.h",
+- "grpc++/impl/codegen/async_unary_call.h",
+- "grpc++/impl/codegen/channel_interface.h",
+- "grpc++/impl/codegen/client_unary_call.h",
+- "grpc++/impl/codegen/method_handler_impl.h",
+- "grpc++/impl/codegen/rpc_service_method.h",
+- "grpc++/impl/codegen/service_type.h",
+- "grpc++/impl/codegen/sync_stream.h"};
++ "grpcpp/impl/codegen/async_stream.h",
++ "grpcpp/impl/codegen/async_unary_call.h",
++ "grpcpp/impl/codegen/channel_interface.h",
++ "grpcpp/impl/codegen/client_unary_call.h",
++ "grpcpp/impl/codegen/method_handler.h",
++ "grpcpp/impl/codegen/rpc_service_method.h",
++ "grpcpp/impl/codegen/service_type.h",
++ "grpcpp/impl/codegen/sync_stream.h"};
+ std::vector<grpc::string> headers(headers_strs, array_end(headers_strs));
+ PrintIncludes(printer.get(), headers, params);
+
+@@ -1604,8 +1604,8 @@ grpc::string GetMockIncludes(grpc_generator::File *file,
+ std::map<grpc::string, grpc::string> vars;
+
+ static const char *headers_strs[] = {
+- "grpc++/impl/codegen/async_stream.h",
+- "grpc++/impl/codegen/sync_stream.h",
++ "grpcpp/impl/codegen/async_stream.h",
++ "grpcpp/impl/codegen/sync_stream.h",
+ "gmock/gmock.h",
+ };
+ std::vector<grpc::string> headers(headers_strs, array_end(headers_strs));
diff --git a/packaging/flatbuffers.spec b/packaging/flatbuffers.spec
index 8ba227d8..72b3571a 100644
--- a/packaging/flatbuffers.spec
+++ b/packaging/flatbuffers.spec
@@ -8,6 +8,7 @@ License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.manifest
Source2: 0001-gRPC-Fix-out-of-sync-in-gRPC-support.patch
+Source3: 0002-Fix-cpp-codegen-for-gRPC-1.35.0.patch
BuildRequires: cmake
BuildRequires: gcc-c++
@@ -30,6 +31,7 @@ This package provides headers and other miscellaneous files required to use flat
%setup -q
cp %{SOURCE1} .
%{__patch} -p1 < %{SOURCE2}
+%{__patch} -p1 < %{SOURCE3}
%build
export CFLAGS+=" -fno-lto"
@@ -79,7 +81,10 @@ sed -i 's#@includedir@#%{_includedir}#g' %{buildroot}%{_libdir}/pkgconfig/%{name
%{_libdir}/pkgconfig/flatbuffers.pc
%changelog
-* Fri Nov 27 2020 Dongju Chae <wook16.song@samsung.com>
+* Tue Feb 03 2021 Dongju Chae <dongju.chae@samsung.com>
+- Apply the patch file to fix gRPC cpp codegen
+
+* Fri Nov 27 2020 Dongju Chae <dongju.chae@samsung.com>
- Apply the patch file to fix out-of-sync with gRPC
* Tue Sep 15 2020 Wook Song <wook16.song@samsung.com>