blob: 5cfa3aa82e28dc23abbf44129a7406f10d11da2d [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001DESCRIPTION = "A high performance, open source, general-purpose RPC framework. \
2Provides gRPC libraries for multiple languages written on top of shared C core library \
3(C++, Node.js, Python, Ruby, Objective-C, PHP, C#)"
4HOMEPAGE = "https://github.com/grpc/grpc"
5SECTION = "libs"
6LICENSE = "Apache-2"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
8
9DEPENDS = "gflags c-ares protobuf protobuf-native protobuf-c protobuf-c-native openssl"
Brad Bishop26bdd442019-08-16 17:08:17 -040010DEPENDS_append_class-target = " googletest grpc-native "
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080011DEPENDS_append_class-nativesdk = " grpc-native "
12
13S = "${WORKDIR}/git"
Brad Bishop63ae8782019-10-09 09:56:13 -040014SRCREV_grpc = "fe494ff4104b6f6a78117ab2da71d29c93053267"
15SRCREV_upb = "9effcbcb27f0a665f9f345030188c0b291e32482"
16BRANCH = "v1.24.x"
17SRC_URI = "git://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \
18 git://github.com/protocolbuffers/upb;name=upb;destsuffix=git/third_party/upb \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019 file://0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch \
20 "
Brad Bishop26bdd442019-08-16 17:08:17 -040021SRC_URI_append_class-target = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch \
Brad Bishop26bdd442019-08-16 17:08:17 -040022 "
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080023SRC_URI_append_class-nativesdk = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch"
24
25# Fixes build with older compilers 4.8 especially on ubuntu 14.04
26CXXFLAGS_append_class-native = " -Wl,--no-as-needed"
27
Brad Bishop63ae8782019-10-09 09:56:13 -040028inherit cmake pkgconfig
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029
30EXTRA_OECMAKE = " \
31 -DgRPC_CARES_PROVIDER=package \
32 -DgRPC_ZLIB_PROVIDER=package \
33 -DgRPC_SSL_PROVIDER=package \
34 -DgRPC_PROTOBUF_PROVIDER=package \
35 -DgRPC_GFLAGS_PROVIDER=package \
36 -DgRPC_INSTALL=ON \
37 -DCMAKE_CROSSCOMPILING=ON \
38 -DBUILD_SHARED_LIBS=ON \
39 "
40
Brad Bishop63ae8782019-10-09 09:56:13 -040041do_configure_prepend_mipsarch() {
42 sed -i -e "s/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} rt m pthread)/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} atomic rt m pthread)/g" ${S}/CMakeLists.txt
43}
44
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080045BBCLASSEXTEND = "native nativesdk"
46
47SYSROOT_DIRS_BLACKLIST_append_class-target = "${libdir}/cmake/grpc"
48
49FILES_${PN}-dev += "${bindir}"