blob: d527ca4d7b76e413951d9715d3f1f32e041e2a1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
# Contributor: wener <wenermail@gmail.com>
# Maintainer: wener <wenermail@gmail.com>
pkgname=grpc
pkgver=1.40.0
pkgrel=1
pkgdesc="The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)"
url="https://grpc.io/"
arch="all !ppc64le !armv7 !armhf !s390x !mips64" # Fails to build on armhf/armv7/s390x/mips64
license="Apache-2.0"
depends="protobuf"
makedepends="
abseil-cpp-dev
autoconf
automake
c-ares-dev
chrpath
cmake
gtest-dev
libexecinfo-dev
libstdc++
libtool
linux-headers
openssl-dev
protobuf-dev
re2-dev
samurai
yaml-dev
zlib-dev
"
subpackages="$pkgname-dev $pkgname-cli"
_googletest_rev=c9ccac7cb7345901884aabf5d1a786cfa6e2f397
_benchmark_ver=1.5.1
source="https://github.com/grpc/grpc/archive/v$pkgver/grpc-v$pkgver.tar.gz
googletest-$_googletest_rev.tar.gz::https://github.com/google/googletest/archive/$_googletest_rev.tar.gz
benchmark-$_benchmark_ver.tar.gz::https://github.com/google/benchmark/archive/v$_benchmark_ver.tar.gz
01-chttp2-maybe-uninitialized.patch
"
prepare() {
default_prepare
rm -r \
third_party/googletest \
third_party/benchmark
mv "$srcdir"/googletest-$_googletest_rev third_party/googletest
mv "$srcdir"/benchmark-$_benchmark_ver third_party/benchmark
}
build() {
cmake -B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=TRUE \
-DgRPC_INSTALL=ON \
-DgRPC_CARES_PROVIDER=package \
-DgRPC_PROTOBUF_PROVIDER=package \
-DgRPC_SSL_PROVIDER=package \
-DgRPC_ZLIB_PROVIDER=package \
-DgRPC_ABSL_PROVIDER=package \
-DgRPC_RE2_PROVIDER=package \
-DgRPC_BUILD_TESTS=ON
cmake --build build
}
check() {
cd build
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
DESTDIR="$pkgdir" cmake --install build
rm "$pkgdir"/usr/share/grpc/roots.pem
}
cli() {
pkgdesc="gRPC command line tool"
install -Dm644 -t "$subpkgdir"/usr/lib "$builddir"/build/libgrpc++_test_config.so.$pkgver
install -Dm755 -t "$subpkgdir"/usr/bin "$builddir"/build/grpc_cli
# Fix "Has /home/... in rpath"
chrpath -d "$subpkgdir"/usr/lib/libgrpc++_test_config.so.$pkgver
chrpath -d "$subpkgdir"/usr/bin/grpc_cli
}
sha512sums="
b509f1a60dddc83912bf87418acd400f6c9dc6c285ea688a3de58aacf66d462b4f99c1bd91a5b0ca4e2092bd7cd91103b9192c69d5fe34a4d14ca9aaa6d1b13a grpc-v1.40.0.tar.gz
7dda1e090d5054896899a250433d78ba9fcc004a60c886c93098c726ff12f70bb8d222112f8845e98c1ceacdb060b96699bb90d8f4207496546996195ae90343 googletest-c9ccac7cb7345901884aabf5d1a786cfa6e2f397.tar.gz
1e8782ab6846b8b29c5eea41ed1ba19dd92a46a135cf74acdc588e2cd5ef05581c644d20fc0d6403456d65417538e1db80109ae87989601298b2fc56ae3c3161 benchmark-1.5.1.tar.gz
7fa146ce86ddd4f160bb1ca9ff01cb7aca6b2b8c9aa50e4fa6b84504b9117b104be0d1e31ccb452d846549dfe1e9012ceccfcdc1f2357ed567621d71fb8b08c5 01-chttp2-maybe-uninitialized.patch
"
|