[arch-commits] Commit in grpc/repos (3 files)

Felix Yan felixonmars at archlinux.org
Sat May 8 12:29:30 UTC 2021


    Date: Saturday, May 8, 2021 @ 12:29:30
  Author: felixonmars
Revision: 928792

archrelease: copy trunk to community-staging-x86_64

Added:
  grpc/repos/community-staging-x86_64/
  grpc/repos/community-staging-x86_64/PKGBUILD
    (from rev 928791, grpc/trunk/PKGBUILD)
  grpc/repos/community-staging-x86_64/parse_json-fix-status-error.patch
    (from rev 928791, grpc/trunk/parse_json-fix-status-error.patch)

-----------------------------------+
 PKGBUILD                          |  165 ++++++++++++++++++++++++++++++++++++
 parse_json-fix-status-error.patch |   22 ++++
 2 files changed, 187 insertions(+)

Copied: grpc/repos/community-staging-x86_64/PKGBUILD (from rev 928791, grpc/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-05-08 12:29:30 UTC (rev 928792)
@@ -0,0 +1,165 @@
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+# Contributor: Aleksey Filippov <sarum9in at gmail.com>
+# Contributor: Victor Aurélio Santos <victoraur.santos at gmail.com>
+
+pkgbase='grpc'
+pkgname=('grpc' 'python-grpcio' 'php-grpc' 'php7-grpc' 'grpc-cli')
+pkgver=1.36.4
+_gtestver=c9ccac7cb7345901884aabf5d1a786cfa6e2f397
+_abseilcppver=20200923.2
+pkgrel=2
+pkgdesc="High performance, open source, general RPC framework that puts mobile and HTTP/2 first."
+arch=('x86_64')
+url='https://grpc.io'
+license=('BSD')
+makedepends=('re2' 're2c' 'protobuf' 'php' 'php7' 'c-ares' 'openssl' 'chrpath' 'cython'
+             'cmake' 'benchmark' 'python-setuptools')
+source=("https://github.com/grpc/grpc/archive/v$pkgver/$pkgbase-$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"
+        parse_json-fix-status-error.patch)
+sha256sums=('8eb9d86649c4d4a7df790226df28f081b97a62bf12c5c5fe9b5d31a29cd6541a'
+            '443d383db648ebb8e391382c0ab63263b7091d03197f304390baac10f178a468'
+            'bf3f13b13a0095d926b25640e060f7e13881bd8a792705dd9e161f3c2b9aa976'
+            '6cb2101c74e0817a8037f7d5e0f0e251e5c6e87de41e286e0c930f50fe6485af')
+
+prepare() {
+  cd "$srcdir/$pkgbase-$pkgver"
+
+  # https://github.com/grpc/grpc/pull/25731
+  patch -Np1 -i ../parse_json-fix-status-error.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
+
+  mkdir build
+
+  cp -a src/php{,7}
+}
+
+build() {
+  cd "$srcdir/$pkgbase-$pkgver/build"
+  cmake \
+    -DCMAKE_BUILD_TYPE=None \
+    -DCMAKE_CXX_FLAGS="${CXXFLAGS} -DNDEBUG" \
+    -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_RE2_PROVIDER=package \
+    -DgRPC_BENCHMARK_PROVIDER=package \
+    ..
+
+  make
+  export LDFLAGS="$LDFLAGS -L$PWD"
+
+  # PHP
+  cd "$srcdir/$pkgbase-$pkgver/src/php/ext/$pkgbase"
+  phpize
+  ./configure --enable-grpc="$srcdir/$pkgbase-$pkgver"
+  make
+
+  # PHP7
+  cd "$srcdir/$pkgbase-$pkgver/src/php7/ext/$pkgbase"
+  phpize7
+  ./configure --enable-grpc="$srcdir/$pkgbase-$pkgver"
+  make
+
+  # Python
+  cd "$srcdir/$pkgbase-$pkgver"
+  GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
+  GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 \
+  GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 \
+  GRPC_PYTHON_BUILD_SYSTEM_CARES=1 \
+  GRPC_PYTHON_BUILD_SYSTEM_RE2=1 \
+  GRPC_BUILD_WITH_BORING_SSL_ASM=0 \
+  python setup.py build
+}
+
+package_grpc() {
+  depends=('c-ares' 'protobuf' 'openssl' 're2')
+  provides=(
+    'libupb.so'
+    'libgrpcpp_channelz.so'
+    'libgrpc_unsecure.so'
+    'libgrpc_plugin_support.so'
+    'libgrpc.so'
+    'libgrpc++_unsecure.so'
+    'libgrpc++_reflection.so'
+    'libgrpc++_error_details.so'
+    'libgrpc++_alts.so'
+    'libgrpc++.so'
+    'libgpr.so'
+    'libaddress_sorting.so'
+  )
+
+  cd "$srcdir/$pkgbase-$pkgver/build"
+  make DESTDIR="$pkgdir" install
+  install -Dm644 ../LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python-grpcio() {
+  pkgdesc='Python language bindings for grpc, remote procedure call (RPC) framework'
+  depends=('c-ares' 'python' 're2')
+
+  cd "$srcdir/$pkgbase-$pkgver"
+  python setup.py install -O1 --skip-build --root="$pkgdir"
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_php-grpc() {
+  pkgdesc='gRPC module for PHP'
+  depends=('grpc' 'php')
+  backup=('etc/php/conf.d/grpc.ini')
+
+  # Install PHP extension.
+  cd "$srcdir/$pkgbase-$pkgver/src/php/ext/$pkgbase"
+  make install "INSTALL_ROOT=$pkgdir"
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+  # Remove RPATH
+  chrpath -d "$pkgdir/usr/lib/php/modules/grpc.so"
+
+  echo ';extension=grpc.so' >grpc.ini
+  install -Dm644 grpc.ini "$pkgdir/etc/php/conf.d/grpc.ini"
+}
+
+package_php7-grpc() {
+  pkgdesc='gRPC module for PHP'
+  depends=('grpc' 'php7')
+  backup=('etc/php7/conf.d/grpc.ini')
+
+  # Install PHP extension.
+  cd "$srcdir/$pkgbase-$pkgver/src/php7/ext/$pkgbase"
+  make install "INSTALL_ROOT=$pkgdir"
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+  # Remove RPATH
+  chrpath -d "$pkgdir/usr/lib/php7/modules/grpc.so"
+
+  echo ';extension=grpc.so' >grpc.ini
+  install -Dm644 grpc.ini "$pkgdir/etc/php7/conf.d/grpc.ini"
+}
+
+package_grpc-cli() {
+  pkgdesc='gRPC protocol buffers cli'
+  depends=('grpc')
+
+  cd "$srcdir/$pkgbase-$pkgver"
+  install -dm0755 "$pkgdir/usr/lib"
+  cp -a build/libgrpc++_test_config.so* "$pkgdir/usr/lib/"
+
+  for solib in build/third_party/abseil-cpp/absl/flags/*.so; do
+    install -t "$pkgdir/usr/lib" "$solib"
+  done
+
+  install -Dm0755 build/grpc_cli "$pkgdir/usr/bin/grpc_cli"
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}

Copied: grpc/repos/community-staging-x86_64/parse_json-fix-status-error.patch (from rev 928791, grpc/trunk/parse_json-fix-status-error.patch)
===================================================================
--- community-staging-x86_64/parse_json-fix-status-error.patch	                        (rev 0)
+++ community-staging-x86_64/parse_json-fix-status-error.patch	2021-05-08 12:29:30 UTC (rev 928792)
@@ -0,0 +1,22 @@
+From d30b04ed7b53f36fded3f94c32ebaed88cfa1232 Mon Sep 17 00:00:00 2001
+From: Esun Kim <veblush at google.com>
+Date: Wed, 17 Mar 2021 10:00:44 -0700
+Subject: [PATCH] Fix status error (#25731)
+
+---
+ test/cpp/qps/parse_json.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/cpp/qps/parse_json.cc b/test/cpp/qps/parse_json.cc
+index 8777f171420d..f3ac1052d4d5 100644
+--- a/test/cpp/qps/parse_json.cc
++++ b/test/cpp/qps/parse_json.cc
+@@ -34,7 +34,7 @@ void ParseJson(const std::string& json, const std::string& type,
+   auto status = JsonToBinaryString(
+       type_resolver.get(), "type.googleapis.com/" + type, json, &binary);
+   if (!status.ok()) {
+-    std::string errmsg(status.error_message());
++    std::string errmsg(status.message());
+     gpr_log(GPR_ERROR, "Failed to convert json to binary: errcode=%d msg=%s",
+             status.code(), errmsg.c_str());
+     gpr_log(GPR_ERROR, "JSON: %s", json.c_str());



More information about the arch-commits mailing list