community/grpc to 1.29.1-1

This commit is contained in:
Kevin Mihelich 2020-06-02 12:44:42 +00:00
parent 65ac034735
commit 72f3a84260
2 changed files with 38 additions and 40 deletions

View file

@ -7,9 +7,10 @@
pkgbase='grpc'
pkgname=('grpc' 'python-grpcio' 'php-grpc' 'grpc-cli')
pkgver=1.28.1
pkgver=1.29.1
_gtestver=c9ccac7cb7345901884aabf5d1a786cfa6e2f397
_abseilcppver=20200225.1
_abseilcppver=20200225.2
_gbenchmark=1.5.0
pkgrel=1
pkgdesc="High performance, open source, general RPC framework that puts mobile and HTTP/2 first."
arch=('x86_64')
@ -19,22 +20,25 @@ makedepends=('re2c' 'protobuf' 'php' 'c-ares' 'openssl' 'chrpath' 'gflags' 'cyth
source=("https://github.com/$pkgname/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
"https://github.com/google/googletest/archive/$_gtestver/googletest-$_gtestver.tar.gz"
"https://github.com/abseil/abseil-cpp/archive/$_abseilcppver/abseil-cpp-$_abseilcppver.tar.gz"
"cmake-cli.patch")
sha256sums=('4cbce7f708917b6e58b631c24c59fe720acc8fef5f959df9a58cdf9558d0a79b'
"https://github.com/google/benchmark/archive/v$_gbenchmark/google-benchmark-$_gbenchmark.tar.gz")
sha256sums=('0343e6dbde66e9a31c691f2f61e98d79f3584e03a11511fad3f10e3667832a45'
'443d383db648ebb8e391382c0ab63263b7091d03197f304390baac10f178a468'
'0db0d26f43ba6806a8a3338da3e646bb581f0ca5359b3a201d8fb8e4752fd5f8'
'dfd1b8cd2a5860557fba06dbdb926b3b5122feca629af7972104204da1b50caf')
'f41868f7a938605c92936230081175d1eae87f6ea2c248f41077c8f88316f111'
'3c6a165b6ecc948967a1ead710d4a181d7b0fbcaa183ef7ea84604994966221a')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
patch -p1 -i "$srcdir/cmake-cli.patch"
ln -sf "$srcdir/googletest-$_gtestver/"{googlemock,googletest} \
third_party/googletest
rm -rf third_party/abseil-cpp
ln -s "$srcdir/abseil-cpp-$_abseilcppver/" third_party/abseil-cpp
rm -rf third_party/benchmark
ln -s "$srcdir/benchmark-$_gbenchmark/" third_party/benchmark
sed '/TARGET gflags::gflags/i \ set(_gRPC_GFLAGS_LIBRARIES gflags)' -i cmake/gflags.cmake
[[ $CARCH == "armv6h" || $CARCH == "arm" ]] && 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" CMakeLists.txt
mkdir build
@ -42,12 +46,14 @@ prepare() {
cmake \
-DgRPC_INSTALL=ON \
-DBUILD_SHARED_LIBS=ON \
-DgRPC_BUILD_TESTS=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DgRPC_CARES_PROVIDER=package \
-DgRPC_PROTOBUF_PROVIDER=package \
-DgRPC_SSL_PROVIDER=package \
-DgRPC_ZLIB_PROVIDER=package \
-DgRPC_GFLAGS_PROVIDER=package \
-DBENCHMARK_HAS_CXX03_FLAG=OFF \
..
}
@ -111,7 +117,7 @@ package_grpc-cli() {
cd "$srcdir/$pkgbase-$pkgver"
install -dm0755 "$pkgdir/usr/lib"
cp -a build/libgrpc{_cli_libs,++_test_config,++_proto_reflection_desc_db}.so* "$pkgdir/usr/lib/"
cp -a build/libgrpc++_test_config.so* "$pkgdir/usr/lib/"
install -Dm0755 build/grpc_cli "$pkgdir/usr/bin/grpc_cli"
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

View file

@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f7d6191..54ce048 100644
index ef11396..dd10886 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,6 +44,7 @@ set(gRPC_INSTALL_CMAKEDIR "lib/cmake/${PACKAGE_NAME}" CACHE STRING "Installation
@ -19,42 +19,34 @@ index f7d6191..54ce048 100644
set(gRPC_GFLAGS_PROVIDER "module" CACHE STRING "Provider of gflags library")
set_property(CACHE gRPC_GFLAGS_PROVIDER PROPERTY STRINGS "module" "package")
@@ -4277,7 +4278,7 @@ if(gRPC_INSTALL)
endif()
endif()
-if(gRPC_BUILD_TESTS)
+if(gRPC_BUILD_TESTS OR gRPC_BUILD_CLI)
if(gRPC_BUILD_CODEGEN)
add_library(grpc++_proto_reflection_desc_db
@@ -4411,7 +4412,7 @@ if(gRPC_INSTALL)
endif()
endif()
-if(gRPC_BUILD_TESTS)
+if(gRPC_BUILD_TESTS OR gRPC_BUILD_CLI)
add_library(grpc++_test_config
test/cpp/util/test_config_cc.cc
@@ -5268,7 +5269,7 @@ target_link_libraries(grpc_benchmark
@@ -4278,7 +4279,7 @@ target_link_libraries(b64_test
endif()
-if(gRPC_BUILD_TESTS)
+if(gRPC_BUILD_TESTS OR gRPC_BUILD_CLI)
if(gRPC_BUILD_CODEGEN)
add_library(grpc_cli_libs
@@ -5321,6 +5322,7 @@ target_link_libraries(grpc_cli_libs
grpc++_proto_reflection_desc_db
grpc++
grpc
+ gflags
${_gRPC_GFLAGS_LIBRARIES}
)
add_executable(bad_server_response_test
test/core/end2end/bad_server_response_test.cc
@@ -4401,7 +4402,7 @@ target_link_libraries(bin_decoder_test
@@ -13003,7 +13005,7 @@ target_link_libraries(grpc_alts_credentials_options_test
endif()
-if(gRPC_BUILD_TESTS)
+if(gRPC_BUILD_TESTS OR gRPC_BUILD_CLI)
add_executable(bin_encoder_test
test/core/transport/chttp2/bin_encoder_test.cc
@@ -5167,7 +5168,7 @@ target_link_libraries(fake_resolver_test
endif()
-if(gRPC_BUILD_TESTS)
+if(gRPC_BUILD_TESTS OR gRPC_BUILD_CLI)
add_executable(fake_transport_security_test
test/core/tsi/fake_transport_security_test.cc
@@ -10762,7 +10763,7 @@ target_link_libraries(global_config_test
endif()
@ -62,4 +54,4 @@ index f7d6191..54ce048 100644
+if(gRPC_BUILD_TESTS OR gRPC_BUILD_CLI)
add_executable(grpc_cli
test/cpp/util/grpc_cli.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.cc