summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/grpc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-02-01 23:47:25 -0800
committerArmin Kuster <akuster808@gmail.com>2018-02-11 11:53:41 -0800
commit38f6ef9b1432cbafd416ec162b0a30366311095b (patch)
treee59835eb6fa6c726386b50c83f5c6867369abbc8 /meta-oe/recipes-devtools/grpc
parent6cb84a77bbf537651838bef88f84a55e239c2881 (diff)
downloadmeta-openembedded-38f6ef9b1432cbafd416ec162b0a30366311095b.tar.gz
grpc: Update to 1.8.5
Drop upstream patches which are not needed update version in the patch to 1.8.5 as well add a new patch to stop looking into native sysroot for libcares Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/grpc')
-rw-r--r--meta-oe/recipes-devtools/grpc/grpc-1.6.6/0001-CMakeLists-when-cross-compiling-the-host-grpc_cpp_pl.patch68
-rw-r--r--meta-oe/recipes-devtools/grpc/grpc-1.6.6/0001-use-the-right-protoc-executable-regardless-of-protob.patch77
-rw-r--r--meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch (renamed from meta-oe/recipes-devtools/grpc/grpc-1.6.6/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch)0
-rw-r--r--meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch (renamed from meta-oe/recipes-devtools/grpc/grpc-1.6.6/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch)113
-rw-r--r--meta-oe/recipes-devtools/grpc/grpc/0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch42
-rw-r--r--meta-oe/recipes-devtools/grpc/grpc_1.8.5.bb (renamed from meta-oe/recipes-devtools/grpc/grpc_1.6.6.bb)14
6 files changed, 109 insertions, 205 deletions
diff --git a/meta-oe/recipes-devtools/grpc/grpc-1.6.6/0001-CMakeLists-when-cross-compiling-the-host-grpc_cpp_pl.patch b/meta-oe/recipes-devtools/grpc/grpc-1.6.6/0001-CMakeLists-when-cross-compiling-the-host-grpc_cpp_pl.patch
deleted file mode 100644
index 31c36422e..000000000
--- a/meta-oe/recipes-devtools/grpc/grpc-1.6.6/0001-CMakeLists-when-cross-compiling-the-host-grpc_cpp_pl.patch
+++ /dev/null
@@ -1,68 +0,0 @@
1From 43ae4e81056888623a73069c11da28a80c39a297 Mon Sep 17 00:00:00 2001
2From: Alexey Firago <alexey_firago@mentor.com>
3Date: Thu, 19 Oct 2017 00:20:36 +0300
4Subject: [PATCH] CMakeLists: when cross-compiling, the host grpc_cpp_plugin
5 should be used
6
7Signed-off-by: Alexey Firago <alexey_firago@mentor.com>
8---
9 CMakeLists.txt | 9 ++++++++-
10 templates/CMakeLists.txt.template | 9 ++++++++-
11 2 files changed, 16 insertions(+), 2 deletions(-)
12
13diff --git a/CMakeLists.txt b/CMakeLists.txt
14index 2f66066..af2046c 100644
15--- a/CMakeLists.txt
16+++ b/CMakeLists.txt
17@@ -333,6 +333,13 @@ function(protobuf_generate_grpc_cpp)
18 get_filename_component(REL_DIR ${REL_FIL} DIRECTORY)
19 set(RELFIL_WE "${REL_DIR}/${FIL_WE}")
20
21+ #if cross-compiling, find host plugin
22+ if(CMAKE_CROSSCOMPILING)
23+ find_program(gRPC_CPP_PLUGIN grpc_cpp_plugin)
24+ else()
25+ set(gRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>)
26+ endif()
27+
28 add_custom_command(
29 OUTPUT "${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.grpc.pb.cc"
30 "${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.grpc.pb.h"
31@@ -342,7 +349,7 @@ function(protobuf_generate_grpc_cpp)
32 COMMAND ${_gRPC_PROTOBUF_PROTOC}
33 ARGS --grpc_out=generate_mock_code=true:${_gRPC_PROTO_GENS_DIR}
34 --cpp_out=${_gRPC_PROTO_GENS_DIR}
35- --plugin=protoc-gen-grpc=$<TARGET_FILE:grpc_cpp_plugin>
36+ --plugin=protoc-gen-grpc=${gRPC_CPP_PLUGIN}
37 ${_protobuf_include_path}
38 ${REL_FIL}
39 DEPENDS ${ABS_FIL} ${_gRPC_PROTOBUF_PROTOC} grpc_cpp_plugin
40diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template
41index 850404b..09c1388 100644
42--- a/templates/CMakeLists.txt.template
43+++ b/templates/CMakeLists.txt.template
44@@ -378,6 +378,13 @@
45 get_filename_component(REL_DIR <%text>${REL_FIL}</%text> DIRECTORY)
46 set(RELFIL_WE "<%text>${REL_DIR}/${FIL_WE}</%text>")
47
48+ #if cross-compiling, find host plugin
49+ if(CMAKE_CROSSCOMPILING)
50+ find_program(gRPC_CPP_PLUGIN grpc_cpp_plugin)
51+ else()
52+ set(gRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>)
53+ endif()
54+
55 add_custom_command(
56 OUTPUT <%text>"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.grpc.pb.cc"</%text>
57 <%text>"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.grpc.pb.h"</%text>
58@@ -387,7 +394,7 @@
59 COMMAND <%text>$<TARGET_FILE:${_gRPC_PROTOBUF_PROTOC}></%text>
60 ARGS --grpc_out=<%text>generate_mock_code=true:${_gRPC_PROTO_GENS_DIR}</%text>
61 --cpp_out=<%text>${_gRPC_PROTO_GENS_DIR}</%text>
62- --plugin=protoc-gen-grpc=$<TARGET_FILE:grpc_cpp_plugin>
63+ --plugin=protoc-gen-grpc=${gRPC_CPP_PLUGIN}
64 <%text>${_protobuf_include_path}</%text>
65 <%text>${REL_FIL}</%text>
66 DEPENDS <%text>${ABS_FIL}</%text> <%text>${_gRPC_PROTOBUF_PROTOC}</%text> grpc_cpp_plugin
67--
682.7.4
diff --git a/meta-oe/recipes-devtools/grpc/grpc-1.6.6/0001-use-the-right-protoc-executable-regardless-of-protob.patch b/meta-oe/recipes-devtools/grpc/grpc-1.6.6/0001-use-the-right-protoc-executable-regardless-of-protob.patch
deleted file mode 100644
index 4621dc6fd..000000000
--- a/meta-oe/recipes-devtools/grpc/grpc-1.6.6/0001-use-the-right-protoc-executable-regardless-of-protob.patch
+++ /dev/null
@@ -1,77 +0,0 @@
1From f640fcc81c76953b2e84fc3087f905141b6643b9 Mon Sep 17 00:00:00 2001
2From: Jan Tattermusch <jtattermusch@google.com>
3Date: Thu, 24 Aug 2017 17:51:47 +0200
4Subject: [PATCH] use the right protoc executable regardless of protobuf
5 provider
6
7---
8 CMakeLists.txt | 5 ++++-
9 templates/CMakeLists.txt.template | 5 ++++-
10 2 files changed, 8 insertions(+), 2 deletions(-)
11
12diff --git a/CMakeLists.txt b/CMakeLists.txt
13index bde8946..f9cd630 100644
14--- a/CMakeLists.txt
15+++ b/CMakeLists.txt
16@@ -190,6 +190,7 @@ if("${gRPC_PROTOBUF_PROVIDER}" STREQUAL "module")
17 endif()
18 if(TARGET protoc)
19 set(_gRPC_PROTOBUF_PROTOC protoc)
20+ set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE $<TARGET_FILE:protoc>)
21 endif()
22 else()
23 message(WARNING "gRPC_PROTOBUF_PROVIDER is \"module\" but PROTOBUF_ROOT_DIR is wrong")
24@@ -213,8 +214,10 @@ elseif("${gRPC_PROTOBUF_PROVIDER}" STREQUAL "package")
25 endif()
26 if(TARGET protobuf::protoc)
27 set(_gRPC_PROTOBUF_PROTOC protobuf::protoc)
28+ set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE $<TARGET_FILE:protobuf::protoc>)
29 else()
30 set(_gRPC_PROTOBUF_PROTOC ${PROTOBUF_PROTOC_EXECUTABLE})
31+ set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE ${PROTOBUF_PROTOC_EXECUTABLE})
32 endif()
33 set(_gRPC_FIND_PROTOBUF "if(NOT Protobuf_FOUND AND NOT PROTOBUF_FOUND)\n find_package(Protobuf ${gRPC_PROTOBUF_PACKAGE_TYPE})\nendif()")
34 endif()
35@@ -339,7 +342,7 @@ function(protobuf_generate_grpc_cpp)
36 "${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}_mock.grpc.pb.h"
37 "${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.cc"
38 "${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.h"
39- COMMAND $<TARGET_FILE:${_gRPC_PROTOBUF_PROTOC}>
40+ COMMAND ${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}
41 ARGS --grpc_out=generate_mock_code=true:${_gRPC_PROTO_GENS_DIR}
42 --cpp_out=${_gRPC_PROTO_GENS_DIR}
43 --plugin=protoc-gen-grpc=$<TARGET_FILE:grpc_cpp_plugin>
44diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template
45index 850404b..64daf04 100644
46--- a/templates/CMakeLists.txt.template
47+++ b/templates/CMakeLists.txt.template
48@@ -235,6 +235,7 @@
49 endif()
50 if(TARGET protoc)
51 set(_gRPC_PROTOBUF_PROTOC protoc)
52+ set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE $<TARGET_FILE:protoc>)
53 endif()
54 else()
55 message(WARNING "gRPC_PROTOBUF_PROVIDER is \"module\" but PROTOBUF_ROOT_DIR is wrong")
56@@ -258,8 +259,10 @@
57 endif()
58 if(TARGET protobuf::protoc)
59 set(_gRPC_PROTOBUF_PROTOC protobuf::protoc)
60+ set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE $<TARGET_FILE:protobuf::protoc>)
61 else()
62 set(_gRPC_PROTOBUF_PROTOC <%text>${PROTOBUF_PROTOC_EXECUTABLE}</%text>)
63+ set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE <%text>${PROTOBUF_PROTOC_EXECUTABLE}</%text>)
64 endif()
65 set(_gRPC_FIND_PROTOBUF "if(NOT Protobuf_FOUND AND NOT PROTOBUF_FOUND)\n find_package(Protobuf <%text>${gRPC_PROTOBUF_PACKAGE_TYPE}</%text>)\nendif()")
66 endif()
67@@ -384,7 +387,7 @@
68 <%text>"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}_mock.grpc.pb.h"</%text>
69 <%text>"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.cc"</%text>
70 <%text>"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.h"</%text>
71- COMMAND <%text>$<TARGET_FILE:${_gRPC_PROTOBUF_PROTOC}></%text>
72+ COMMAND <%text>${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}</%text>
73 ARGS --grpc_out=<%text>generate_mock_code=true:${_gRPC_PROTO_GENS_DIR}</%text>
74 --cpp_out=<%text>${_gRPC_PROTO_GENS_DIR}</%text>
75 --plugin=protoc-gen-grpc=$<TARGET_FILE:grpc_cpp_plugin>
76--
772.7.4
diff --git a/meta-oe/recipes-devtools/grpc/grpc-1.6.6/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch
index 5774e62eb..5774e62eb 100644
--- a/meta-oe/recipes-devtools/grpc/grpc-1.6.6/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch
+++ b/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch
diff --git a/meta-oe/recipes-devtools/grpc/grpc-1.6.6/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch
index c3d406ea3..f8d965294 100644
--- a/meta-oe/recipes-devtools/grpc/grpc-1.6.6/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch
+++ b/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch
@@ -1,157 +1,166 @@
1From cc170860e5b77d7c9f3b9ce8730b719976dab2bb Mon Sep 17 00:00:00 2001 1From 8e9bf962a45a82f1c2eb5858e29fa89a3a60b564 Mon Sep 17 00:00:00 2001
2From: Alexey Firago <alexey_firago@mentor.com> 2From: Alexey Firago <alexey_firago@mentor.com>
3Date: Mon, 30 Oct 2017 23:24:49 +0300 3Date: Mon, 30 Oct 2017 23:24:49 +0300
4Subject: [PATCH] CMakeLists.txt: Fix libraries installation for Linux 4Subject: [PATCH 1/4] CMakeLists.txt: Fix libraries installation for Linux
5 5
6* Set libs versions as in Makefile 6* Set libs versions as in Makefile
7 7
8Signed-off-by: Alexey Firago <alexey_firago@mentor.com> 8Signed-off-by: Alexey Firago <alexey_firago@mentor.com>
9
10%% original patch: 0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch
9--- 11---
10 CMakeLists.txt | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 12 CMakeLists.txt | 55 +++++++++++++++++++++++++++++++++++
11 1 file changed, 55 insertions(+) 13 CMakeLists.txt => CMakeLists.txt.orig | 0
14 2 files changed, 55 insertions(+)
15 copy CMakeLists.txt => CMakeLists.txt.orig (100%)
12 16
13diff --git a/CMakeLists.txt b/CMakeLists.txt 17diff --git a/CMakeLists.txt b/CMakeLists.txt
14index 9663934..5719435 100644 18index b1a49df..13e64ac 100644
15--- a/CMakeLists.txt 19--- a/CMakeLists.txt
16+++ b/CMakeLists.txt 20+++ b/CMakeLists.txt
17@@ -30,6 +30,15 @@ set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}") 21@@ -30,6 +30,15 @@ set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
18 set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") 22 set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")
19 project(${PACKAGE_NAME} C CXX) 23 project(${PACKAGE_NAME} C CXX)
20 24
21+set (CORE_VERSION_MAJOR "4") 25+set (CORE_VERSION_MAJOR "4")
22+set (CORE_VERSION "4.0.0") 26+set (CORE_VERSION "4.0.0")
23+ 27+
24+set (CPP_VERSION_MAJOR "1") 28+set (CPP_VERSION_MAJOR "1")
25+set (CPP_VERSION "1.6.6") 29+set (CPP_VERSION "${PACKAGE_VERSION}")
26+ 30+
27+set (CSHARP_VERSION_MAJOR "1") 31+set (CSHARP_VERSION_MAJOR "1")
28+set (CSHARP_VERSION "1.6.6") 32+set (CSHARP_VERSION "${PACKAGE_VERSION}")
29+ 33+
30 set(gRPC_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") 34 set(gRPC_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
31 set(gRPC_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") 35 set(gRPC_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
32 set(gRPC_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers") 36 set(gRPC_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers")
33@@ -840,6 +849,10 @@ if(WIN32 AND MSVC) 37@@ -841,6 +850,10 @@ if(WIN32 AND MSVC)
34 endif() 38 endif()
35 endif() 39 endif()
36 40
37+if(_gRPC_PLATFORM_LINUX) 41+if(_gRPC_PLATFORM_LINUX)
38+ set_property(TARGET gpr PROPERTY VERSION ${CORE_VERSION}) 42+ set_property(TARGET gpr PROPERTY VERSION ${CORE_VERSION})
39+ set_property(TARGET gpr PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) 43+ set_property(TARGET gpr PROPERTY SOVERSION ${CORE_VERSION_MAJOR})
40+endif() 44+endif()
41 45
42 target_include_directories(gpr 46 target_include_directories(gpr
43 PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 47 PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
44@@ -1228,6 +1241,10 @@ if(WIN32 AND MSVC) 48@@ -1221,6 +1234,10 @@ if(WIN32 AND MSVC)
45 endif() 49 endif()
46 endif() 50 endif()
47 51
48+if(_gRPC_PLATFORM_LINUX) 52+if(_gRPC_PLATFORM_LINUX)
49+ set_property(TARGET grpc PROPERTY VERSION ${CORE_VERSION}) 53+ set_property(TARGET grpc PROPERTY VERSION ${CORE_VERSION})
50+ set_property(TARGET grpc PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) 54+ set_property(TARGET grpc PROPERTY SOVERSION ${CORE_VERSION_MAJOR})
51+endif() 55+endif()
52 56
53 target_include_directories(grpc 57 target_include_directories(grpc
54 PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 58 PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
55@@ -1534,6 +1551,10 @@ if(WIN32 AND MSVC) 59@@ -1535,6 +1552,10 @@ if(WIN32 AND MSVC)
56 endif() 60 endif()
57 endif() 61 endif()
58 62
59+if(_gRPC_PLATFORM_LINUX) 63+if(_gRPC_PLATFORM_LINUX)
60+ set_property(TARGET grpc_cronet PROPERTY VERSION ${CORE_VERSION}) 64+ set_property(TARGET grpc_cronet PROPERTY VERSION ${CORE_VERSION})
61+ set_property(TARGET grpc_cronet PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) 65+ set_property(TARGET grpc_cronet PROPERTY SOVERSION ${CORE_VERSION_MAJOR})
62+endif() 66+endif()
63 67
64 target_include_directories(grpc_cronet 68 target_include_directories(grpc_cronet
65 PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 69 PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
66@@ -2366,6 +2387,10 @@ if(WIN32 AND MSVC) 70@@ -2377,6 +2398,10 @@ if(WIN32 AND MSVC)
67 endif() 71 endif()
68 endif() 72 endif()
69 73
70+if(_gRPC_PLATFORM_LINUX) 74+if(_gRPC_PLATFORM_LINUX)
71+ set_property(TARGET grpc_unsecure PROPERTY VERSION ${CORE_VERSION}) 75+ set_property(TARGET grpc_unsecure PROPERTY VERSION ${CORE_VERSION})
72+ set_property(TARGET grpc_unsecure PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) 76+ set_property(TARGET grpc_unsecure PROPERTY SOVERSION ${CORE_VERSION_MAJOR})
73+endif() 77+endif()
74 78
75 target_include_directories(grpc_unsecure 79 target_include_directories(grpc_unsecure
76 PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 80 PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
77@@ -2583,6 +2608,10 @@ if(WIN32 AND MSVC) 81@@ -2592,6 +2617,10 @@ if(WIN32 AND MSVC)
78 endif() 82 endif()
79 endif() 83 endif()
80 84
81+if(_gRPC_PLATFORM_LINUX) 85+if(_gRPC_PLATFORM_LINUX)
82+ set_property(TARGET grpc++ PROPERTY VERSION ${CPP_VERSION}) 86+ set_property(TARGET grpc++ PROPERTY VERSION ${CPP_VERSION})
83+ set_property(TARGET grpc++ PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) 87+ set_property(TARGET grpc++ PROPERTY SOVERSION ${CPP_VERSION_MAJOR})
84+endif() 88+endif()
85 89
86 target_include_directories(grpc++ 90 target_include_directories(grpc++
87 PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 91 PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
88@@ -3013,6 +3042,10 @@ if(WIN32 AND MSVC) 92@@ -3078,6 +3107,10 @@ if(WIN32 AND MSVC)
89 endif() 93 endif()
90 endif() 94 endif()
91 95
92+if(_gRPC_PLATFORM_LINUX) 96+if(_gRPC_PLATFORM_LINUX)
93+ set_property(TARGET grpc++_cronet PROPERTY VERSION ${CPP_VERSION}) 97+ set_property(TARGET grpc++_cronet PROPERTY VERSION ${CPP_VERSION})
94+ set_property(TARGET grpc++_cronet PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) 98+ set_property(TARGET grpc++_cronet PROPERTY SOVERSION ${CPP_VERSION_MAJOR})
95+endif() 99+endif()
96 100
97 target_include_directories(grpc++_cronet 101 target_include_directories(grpc++_cronet
98 PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 102 PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
99@@ -3213,6 +3246,11 @@ protobuf_generate_grpc_cpp( 103@@ -3282,6 +3315,11 @@ protobuf_generate_grpc_cpp(
100 src/proto/grpc/status/status.proto 104 src/proto/grpc/status/status.proto
101 ) 105 )
102 106
103+if(_gRPC_PLATFORM_LINUX) 107+if(_gRPC_PLATFORM_LINUX)
104+ set_property(TARGET grpc++_error_details PROPERTY VERSION ${CPP_VERSION}) 108+ set_property(TARGET grpc++_error_details PROPERTY VERSION ${CPP_VERSION})
105+ set_property(TARGET grpc++_error_details PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) 109+ set_property(TARGET grpc++_error_details PROPERTY SOVERSION ${CPP_VERSION_MAJOR})
106+endif() 110+endif()
107+ 111+
108 target_include_directories(grpc++_error_details 112 target_include_directories(grpc++_error_details
109 PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 113 PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
110 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} 114 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
111@@ -3343,6 +3381,11 @@ protobuf_generate_grpc_cpp( 115@@ -3408,6 +3446,11 @@ protobuf_generate_grpc_cpp(
112 src/proto/grpc/reflection/v1alpha/reflection.proto 116 src/proto/grpc/reflection/v1alpha/reflection.proto
113 ) 117 )
114 118
115+if(_gRPC_PLATFORM_LINUX) 119+if(_gRPC_PLATFORM_LINUX)
116+ set_property(TARGET grpc++_reflection PROPERTY VERSION ${CPP_VERSION}) 120+ set_property(TARGET grpc++_reflection PROPERTY VERSION ${CPP_VERSION})
117+ set_property(TARGET grpc++_reflection PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) 121+ set_property(TARGET grpc++_reflection PROPERTY SOVERSION ${CPP_VERSION_MAJOR})
118+endif() 122+endif()
119+ 123+
120 target_include_directories(grpc++_reflection 124 target_include_directories(grpc++_reflection
121 PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 125 PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
122 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} 126 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
123@@ -3762,6 +3805,10 @@ if(WIN32 AND MSVC) 127@@ -3827,6 +3870,10 @@ if(WIN32 AND MSVC)
124 endif() 128 endif()
125 endif() 129 endif()
126 130
127+if(_gRPC_PLATFORM_LINUX) 131+if(_gRPC_PLATFORM_LINUX)
128+ set_property(TARGET grpc++_unsecure PROPERTY VERSION ${CPP_VERSION}) 132+ set_property(TARGET grpc++_unsecure PROPERTY VERSION ${CPP_VERSION})
129+ set_property(TARGET grpc++_unsecure PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) 133+ set_property(TARGET grpc++_unsecure PROPERTY SOVERSION ${CPP_VERSION_MAJOR})
130+endif() 134+endif()
131 135
132 target_include_directories(grpc++_unsecure 136 target_include_directories(grpc++_unsecure
133 PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 137 PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
134@@ -4075,6 +4122,10 @@ if(WIN32 AND MSVC) 138@@ -4140,6 +4187,10 @@ if(WIN32 AND MSVC)
135 endif() 139 endif()
136 endif() 140 endif()
137 141
138+if(_gRPC_PLATFORM_LINUX) 142+if(_gRPC_PLATFORM_LINUX)
139+ set_property(TARGET grpc_plugin_support PROPERTY VERSION ${CORE_VERSION}) 143+ set_property(TARGET grpc_plugin_support PROPERTY VERSION ${CORE_VERSION})
140+ set_property(TARGET grpc_plugin_support PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) 144+ set_property(TARGET grpc_plugin_support PROPERTY SOVERSION ${CORE_VERSION_MAJOR})
141+endif() 145+endif()
142 146
143 target_include_directories(grpc_plugin_support 147 target_include_directories(grpc_plugin_support
144 PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 148 PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
145@@ -4599,6 +4650,10 @@ if(WIN32 AND MSVC) 149@@ -4649,6 +4700,10 @@ if(WIN32 AND MSVC)
146 endif() 150 endif()
147 endif() 151 endif()
148 152
149+if(_gRPC_PLATFORM_LINUX) 153+if(_gRPC_PLATFORM_LINUX)
150+ set_property(TARGET grpc_csharp_ext PROPERTY VERSION ${CSHARP_VERSION}) 154+ set_property(TARGET grpc_csharp_ext PROPERTY VERSION ${CSHARP_VERSION})
151+ set_property(TARGET grpc_csharp_ext PROPERTY SOVERSION ${CSHARP_VERSION_MAJOR}) 155+ set_property(TARGET grpc_csharp_ext PROPERTY SOVERSION ${CSHARP_VERSION_MAJOR})
152+endif() 156+endif()
153 157
154 target_include_directories(grpc_csharp_ext 158 target_include_directories(grpc_csharp_ext
155 PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 159 PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
156-- 160diff --git a/CMakeLists.txt b/CMakeLists.txt.orig
1572.7.4 161similarity index 100%
162copy from CMakeLists.txt
163copy to CMakeLists.txt.orig
164--
1652.16.1
166
diff --git a/meta-oe/recipes-devtools/grpc/grpc/0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch b/meta-oe/recipes-devtools/grpc/grpc/0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch
new file mode 100644
index 000000000..8985022fa
--- /dev/null
+++ b/meta-oe/recipes-devtools/grpc/grpc/0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch
@@ -0,0 +1,42 @@
1From a498b56ba96948015f0f2784b2ab8296946716ee Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 1 Feb 2018 23:28:17 -0800
4Subject: [PATCH 4/4] CMakeLists.txt: Find c-ares in target sysroot alone
5
6Current code lets it look into native sysroot as well
7which is then preferred during cross compile and it adds
8absolute path to libcares into linker flags
9on heterogenous architectures linker complains and build
10fails
11
12| /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-gnueabi/grpc/1.8.5-r0/recipe-sysroot-native/usr/lib/lib
13cares.so.2.2.0: file not recognized: File format not recognized
14| collect2: error: ld returned 1 exit status
15
16Upstream-Status: Pending
17
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 CMakeLists.txt | 6 ++----
21 1 file changed, 2 insertions(+), 4 deletions(-)
22
23diff --git a/CMakeLists.txt b/CMakeLists.txt
24index 1d7eef1..058423d 100644
25--- a/CMakeLists.txt
26+++ b/CMakeLists.txt
27@@ -153,10 +153,8 @@ if("${gRPC_CARES_PROVIDER}" STREQUAL "module")
28 set(gRPC_INSTALL FALSE)
29 endif()
30 elseif("${gRPC_CARES_PROVIDER}" STREQUAL "package")
31- find_package(c-ares REQUIRED CONFIG)
32- if(TARGET c-ares::cares)
33- set(_gRPC_CARES_LIBRARIES c-ares::cares)
34- endif()
35+ find_package(c-ares REQUIRED)
36+ set(_gRPC_CARES_LIBRARIES cares)
37 set(_gRPC_FIND_CARES "if(NOT c-ares_FOUND)\n find_package(c-ares CONFIG)\nendif()")
38 endif()
39
40--
412.16.1
42
diff --git a/meta-oe/recipes-devtools/grpc/grpc_1.6.6.bb b/meta-oe/recipes-devtools/grpc/grpc_1.8.5.bb
index 6fde33d85..0883ec176 100644
--- a/meta-oe/recipes-devtools/grpc/grpc_1.6.6.bb
+++ b/meta-oe/recipes-devtools/grpc/grpc_1.8.5.bb
@@ -10,14 +10,12 @@ DEPENDS_append_class-target = " gtest grpc-native "
10 10
11LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 11LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
12 12
13SRC_URI = "https://github.com/grpc/grpc/archive/v1.6.6.tar.gz" 13SRC_URI = "https://github.com/grpc/grpc/archive/v${PV}.tar.gz \
14SRC_URI[md5sum] = "a960878ad0231189d48ac8ff17eeca3c" 14 file://0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch \
15SRC_URI[sha256sum] = "b97eaa0c8a63b0492dc94bdad621795b4815278e841f06b0c78d6bcbd4c8bdec" 15 file://0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch \
16 16 "
17SRC_URI += " \ 17SRC_URI[md5sum] = "b565fa6787e42f4969395870c2ad436e"
18 file://0001-use-the-right-protoc-executable-regardless-of-protob.patch \ 18SRC_URI[sha256sum] = "df9168da760fd2ee970c74c9d1b63377e0024be248deaa844e784d0df47599de"
19 file://0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch \
20"
21 19
22SRC_URI_append_class-target = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch" 20SRC_URI_append_class-target = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch"
23 21