Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" |
| 8 | |
| 9 | DEPENDS = "gflags c-ares protobuf protobuf-native protobuf-c protobuf-c-native openssl libnsl2" |
| 10 | DEPENDS_append_class-target = " googletest grpc-native " |
| 11 | DEPENDS_append_class-nativesdk = " grpc-native " |
| 12 | |
| 13 | S = "${WORKDIR}/git" |
| 14 | SRCREV_grpc = "2de2e8dd8921e1f7d043e01faf7fe8a291fbb072" |
| 15 | SRCREV_upb = "9effcbcb27f0a665f9f345030188c0b291e32482" |
| 16 | BRANCH = "v1.24.x" |
| 17 | SRC_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 \ |
| 19 | file://0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch \ |
| 20 | " |
| 21 | SRC_URI_append_class-target = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch \ |
| 22 | " |
| 23 | SRC_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 |
| 26 | CXXFLAGS_append_class-native = " -Wl,--no-as-needed" |
| 27 | |
| 28 | inherit cmake pkgconfig |
| 29 | |
| 30 | EXTRA_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 | -DgRPC_INSTALL_LIBDIR=${baselib} \ |
| 40 | -DgRPC_INSTALL_CMAKEDIR=${baselib}/cmake/${BPN} \ |
| 41 | " |
| 42 | |
| 43 | do_configure_prepend_mipsarch() { |
| 44 | 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 |
| 45 | } |
| 46 | |
| 47 | do_configure_prepend_powerpc() { |
| 48 | 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 |
| 49 | } |
| 50 | |
| 51 | do_configure_prepend_riscv64() { |
| 52 | 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 |
| 53 | } |
| 54 | |
| 55 | do_configure_prepend_riscv32() { |
| 56 | 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 |
| 57 | } |
| 58 | |
| 59 | do_configure_prepend_toolchain-clang_x86() { |
| 60 | 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 |
| 61 | } |
| 62 | |
| 63 | BBCLASSEXTEND = "native nativesdk" |
| 64 | |
| 65 | SYSROOT_DIRS_BLACKLIST_append_class-target = "${baselib}/cmake/grpc" |
| 66 | |
| 67 | FILES_${PN}-dev += "${bindir}" |