diff options
author | Armin Kuster <akuster808@gmail.com> | 2018-03-05 16:46:25 -0800 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2018-03-12 10:02:03 -0700 |
commit | ed26fb616cb8df57ac52a9aaa88a5a5e1485d7d0 (patch) | |
tree | b702d5704c4e26ee946298cd2f5eb3071411ca8b /meta-oe/recipes-devtools | |
parent | e2b18f893a152bd288c18547fc248436773522e6 (diff) | |
download | meta-openembedded-ed26fb616cb8df57ac52a9aaa88a5a5e1485d7d0.tar.gz |
grpc: move it from oe to networking layer
grpc has dependancy on meta-networking packages.
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools')
4 files changed, 0 insertions, 312 deletions
diff --git a/meta-oe/recipes-devtools/grpc/grpc/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 deleted file mode 100644 index 5774e62eb..000000000 --- a/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | From cc6dbabea0e452ebc93682df860a79ed9a45722e Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexey Firago <alexey_firago@mentor.com> | ||
3 | Date: Fri, 20 Oct 2017 00:04:19 +0300 | ||
4 | Subject: [PATCH] CMakeLists.txt: Fix grpc_cpp_plugin path during | ||
5 | cross-compilation | ||
6 | |||
7 | Signed-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 | |||
13 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
14 | index f9cd630..9663934 100644 | ||
15 | --- a/CMakeLists.txt | ||
16 | +++ b/CMakeLists.txt | ||
17 | @@ -328,6 +328,13 @@ function(protobuf_generate_grpc_cpp) | ||
18 | return() | ||
19 | endif() | ||
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 | set(_protobuf_include_path -I . -I ${PROTOBUF_WELLKNOWN_IMPORT_DIR}) | ||
29 | foreach(FIL ${ARGN}) | ||
30 | get_filename_component(ABS_FIL ${FIL} ABSOLUTE) | ||
31 | @@ -345,7 +352,7 @@ function(protobuf_generate_grpc_cpp) | ||
32 | COMMAND ${_gRPC_PROTOBUF_PROTOC_EXECUTABLE} | ||
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 | ||
40 | diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template | ||
41 | index 64daf04..a7e8629 100644 | ||
42 | --- a/templates/CMakeLists.txt.template | ||
43 | +++ b/templates/CMakeLists.txt.template | ||
44 | @@ -373,6 +373,13 @@ | ||
45 | return() | ||
46 | endif() | ||
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 | set(_protobuf_include_path -I . -I <%text>${PROTOBUF_WELLKNOWN_IMPORT_DIR}</%text>) | ||
56 | foreach(FIL <%text>${ARGN}</%text>) | ||
57 | get_filename_component(ABS_FIL <%text>${FIL}</%text> ABSOLUTE) | ||
58 | @@ -390,7 +397,7 @@ | ||
59 | COMMAND <%text>${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}</%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 | -- | ||
68 | 2.7.4 | ||
diff --git a/meta-oe/recipes-devtools/grpc/grpc/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 deleted file mode 100644 index f8d965294..000000000 --- a/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch +++ /dev/null | |||
@@ -1,166 +0,0 @@ | |||
1 | From 8e9bf962a45a82f1c2eb5858e29fa89a3a60b564 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexey Firago <alexey_firago@mentor.com> | ||
3 | Date: Mon, 30 Oct 2017 23:24:49 +0300 | ||
4 | Subject: [PATCH 1/4] CMakeLists.txt: Fix libraries installation for Linux | ||
5 | |||
6 | * Set libs versions as in Makefile | ||
7 | |||
8 | Signed-off-by: Alexey Firago <alexey_firago@mentor.com> | ||
9 | |||
10 | %% original patch: 0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch | ||
11 | --- | ||
12 | CMakeLists.txt | 55 +++++++++++++++++++++++++++++++++++ | ||
13 | CMakeLists.txt => CMakeLists.txt.orig | 0 | ||
14 | 2 files changed, 55 insertions(+) | ||
15 | copy CMakeLists.txt => CMakeLists.txt.orig (100%) | ||
16 | |||
17 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
18 | index b1a49df..13e64ac 100644 | ||
19 | --- a/CMakeLists.txt | ||
20 | +++ b/CMakeLists.txt | ||
21 | @@ -30,6 +30,15 @@ set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}") | ||
22 | set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") | ||
23 | project(${PACKAGE_NAME} C CXX) | ||
24 | |||
25 | +set (CORE_VERSION_MAJOR "4") | ||
26 | +set (CORE_VERSION "4.0.0") | ||
27 | + | ||
28 | +set (CPP_VERSION_MAJOR "1") | ||
29 | +set (CPP_VERSION "${PACKAGE_VERSION}") | ||
30 | + | ||
31 | +set (CSHARP_VERSION_MAJOR "1") | ||
32 | +set (CSHARP_VERSION "${PACKAGE_VERSION}") | ||
33 | + | ||
34 | set(gRPC_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") | ||
35 | set(gRPC_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") | ||
36 | set(gRPC_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers") | ||
37 | @@ -841,6 +850,10 @@ if(WIN32 AND MSVC) | ||
38 | endif() | ||
39 | endif() | ||
40 | |||
41 | +if(_gRPC_PLATFORM_LINUX) | ||
42 | + set_property(TARGET gpr PROPERTY VERSION ${CORE_VERSION}) | ||
43 | + set_property(TARGET gpr PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) | ||
44 | +endif() | ||
45 | |||
46 | target_include_directories(gpr | ||
47 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
48 | @@ -1221,6 +1234,10 @@ if(WIN32 AND MSVC) | ||
49 | endif() | ||
50 | endif() | ||
51 | |||
52 | +if(_gRPC_PLATFORM_LINUX) | ||
53 | + set_property(TARGET grpc PROPERTY VERSION ${CORE_VERSION}) | ||
54 | + set_property(TARGET grpc PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) | ||
55 | +endif() | ||
56 | |||
57 | target_include_directories(grpc | ||
58 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
59 | @@ -1535,6 +1552,10 @@ if(WIN32 AND MSVC) | ||
60 | endif() | ||
61 | endif() | ||
62 | |||
63 | +if(_gRPC_PLATFORM_LINUX) | ||
64 | + set_property(TARGET grpc_cronet PROPERTY VERSION ${CORE_VERSION}) | ||
65 | + set_property(TARGET grpc_cronet PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) | ||
66 | +endif() | ||
67 | |||
68 | target_include_directories(grpc_cronet | ||
69 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
70 | @@ -2377,6 +2398,10 @@ if(WIN32 AND MSVC) | ||
71 | endif() | ||
72 | endif() | ||
73 | |||
74 | +if(_gRPC_PLATFORM_LINUX) | ||
75 | + set_property(TARGET grpc_unsecure PROPERTY VERSION ${CORE_VERSION}) | ||
76 | + set_property(TARGET grpc_unsecure PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) | ||
77 | +endif() | ||
78 | |||
79 | target_include_directories(grpc_unsecure | ||
80 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
81 | @@ -2592,6 +2617,10 @@ if(WIN32 AND MSVC) | ||
82 | endif() | ||
83 | endif() | ||
84 | |||
85 | +if(_gRPC_PLATFORM_LINUX) | ||
86 | + set_property(TARGET grpc++ PROPERTY VERSION ${CPP_VERSION}) | ||
87 | + set_property(TARGET grpc++ PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) | ||
88 | +endif() | ||
89 | |||
90 | target_include_directories(grpc++ | ||
91 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
92 | @@ -3078,6 +3107,10 @@ if(WIN32 AND MSVC) | ||
93 | endif() | ||
94 | endif() | ||
95 | |||
96 | +if(_gRPC_PLATFORM_LINUX) | ||
97 | + set_property(TARGET grpc++_cronet PROPERTY VERSION ${CPP_VERSION}) | ||
98 | + set_property(TARGET grpc++_cronet PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) | ||
99 | +endif() | ||
100 | |||
101 | target_include_directories(grpc++_cronet | ||
102 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
103 | @@ -3282,6 +3315,11 @@ protobuf_generate_grpc_cpp( | ||
104 | src/proto/grpc/status/status.proto | ||
105 | ) | ||
106 | |||
107 | +if(_gRPC_PLATFORM_LINUX) | ||
108 | + set_property(TARGET grpc++_error_details PROPERTY VERSION ${CPP_VERSION}) | ||
109 | + set_property(TARGET grpc++_error_details PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) | ||
110 | +endif() | ||
111 | + | ||
112 | target_include_directories(grpc++_error_details | ||
113 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
114 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} | ||
115 | @@ -3408,6 +3446,11 @@ protobuf_generate_grpc_cpp( | ||
116 | src/proto/grpc/reflection/v1alpha/reflection.proto | ||
117 | ) | ||
118 | |||
119 | +if(_gRPC_PLATFORM_LINUX) | ||
120 | + set_property(TARGET grpc++_reflection PROPERTY VERSION ${CPP_VERSION}) | ||
121 | + set_property(TARGET grpc++_reflection PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) | ||
122 | +endif() | ||
123 | + | ||
124 | target_include_directories(grpc++_reflection | ||
125 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
126 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} | ||
127 | @@ -3827,6 +3870,10 @@ if(WIN32 AND MSVC) | ||
128 | endif() | ||
129 | endif() | ||
130 | |||
131 | +if(_gRPC_PLATFORM_LINUX) | ||
132 | + set_property(TARGET grpc++_unsecure PROPERTY VERSION ${CPP_VERSION}) | ||
133 | + set_property(TARGET grpc++_unsecure PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) | ||
134 | +endif() | ||
135 | |||
136 | target_include_directories(grpc++_unsecure | ||
137 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
138 | @@ -4140,6 +4187,10 @@ if(WIN32 AND MSVC) | ||
139 | endif() | ||
140 | endif() | ||
141 | |||
142 | +if(_gRPC_PLATFORM_LINUX) | ||
143 | + set_property(TARGET grpc_plugin_support PROPERTY VERSION ${CORE_VERSION}) | ||
144 | + set_property(TARGET grpc_plugin_support PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) | ||
145 | +endif() | ||
146 | |||
147 | target_include_directories(grpc_plugin_support | ||
148 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
149 | @@ -4649,6 +4700,10 @@ if(WIN32 AND MSVC) | ||
150 | endif() | ||
151 | endif() | ||
152 | |||
153 | +if(_gRPC_PLATFORM_LINUX) | ||
154 | + set_property(TARGET grpc_csharp_ext PROPERTY VERSION ${CSHARP_VERSION}) | ||
155 | + set_property(TARGET grpc_csharp_ext PROPERTY SOVERSION ${CSHARP_VERSION_MAJOR}) | ||
156 | +endif() | ||
157 | |||
158 | target_include_directories(grpc_csharp_ext | ||
159 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
160 | diff --git a/CMakeLists.txt b/CMakeLists.txt.orig | ||
161 | similarity index 100% | ||
162 | copy from CMakeLists.txt | ||
163 | copy to CMakeLists.txt.orig | ||
164 | -- | ||
165 | 2.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 deleted file mode 100644 index 8985022fa..000000000 --- a/meta-oe/recipes-devtools/grpc/grpc/0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From a498b56ba96948015f0f2784b2ab8296946716ee Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 1 Feb 2018 23:28:17 -0800 | ||
4 | Subject: [PATCH 4/4] CMakeLists.txt: Find c-ares in target sysroot alone | ||
5 | |||
6 | Current code lets it look into native sysroot as well | ||
7 | which is then preferred during cross compile and it adds | ||
8 | absolute path to libcares into linker flags | ||
9 | on heterogenous architectures linker complains and build | ||
10 | fails | ||
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 | ||
13 | cares.so.2.2.0: file not recognized: File format not recognized | ||
14 | | collect2: error: ld returned 1 exit status | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | |||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | --- | ||
20 | CMakeLists.txt | 6 ++---- | ||
21 | 1 file changed, 2 insertions(+), 4 deletions(-) | ||
22 | |||
23 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
24 | index 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 | -- | ||
41 | 2.16.1 | ||
42 | |||
diff --git a/meta-oe/recipes-devtools/grpc/grpc_1.8.5.bb b/meta-oe/recipes-devtools/grpc/grpc_1.8.5.bb deleted file mode 100644 index 0883ec176..000000000 --- a/meta-oe/recipes-devtools/grpc/grpc_1.8.5.bb +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | DESCRIPTION = "A high performance, open source, general-purpose RPC framework. \ | ||
2 | Provides gRPC libraries for multiple languages written on top of shared C core library \ | ||
3 | (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)" | ||
4 | HOMEPAGE = "https://github.com/grpc/grpc" | ||
5 | SECTION = "libs" | ||
6 | LICENSE = "Apache-2" | ||
7 | |||
8 | DEPENDS = "gflags c-ares protobuf protobuf-native protobuf-c protobuf-c-native openssl" | ||
9 | DEPENDS_append_class-target = " gtest grpc-native " | ||
10 | |||
11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
12 | |||
13 | SRC_URI = "https://github.com/grpc/grpc/archive/v${PV}.tar.gz \ | ||
14 | file://0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch \ | ||
15 | file://0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch \ | ||
16 | " | ||
17 | SRC_URI[md5sum] = "b565fa6787e42f4969395870c2ad436e" | ||
18 | SRC_URI[sha256sum] = "df9168da760fd2ee970c74c9d1b63377e0024be248deaa844e784d0df47599de" | ||
19 | |||
20 | SRC_URI_append_class-target = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch" | ||
21 | |||
22 | inherit cmake | ||
23 | |||
24 | EXTRA_OECMAKE = " \ | ||
25 | -DgRPC_CARES_PROVIDER=package \ | ||
26 | -DgRPC_ZLIB_PROVIDER=package \ | ||
27 | -DgRPC_SSL_PROVIDER=package \ | ||
28 | -DgRPC_PROTOBUF_PROVIDER=package \ | ||
29 | -DgRPC_GFLAGS_PROVIDER=package \ | ||
30 | -DgRPC_INSTALL=1 \ | ||
31 | -DBUILD_SHARED_LIBS=ON \ | ||
32 | " | ||
33 | |||
34 | FILES_${PN}-dev += "${libdir}/cmake" | ||
35 | |||
36 | BBCLASSEXTEND = "native" | ||