mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
community/grpc to 1.27.0-2
This commit is contained in:
parent
d40e55ab26
commit
1c1f042f9a
5 changed files with 25 additions and 137 deletions
|
@ -10,53 +10,50 @@ pkgname=('grpc' 'python-grpcio' 'php-grpc' 'grpc-cli')
|
|||
pkgver=1.27.0
|
||||
_gtestver=c9ccac7cb7345901884aabf5d1a786cfa6e2f397
|
||||
_abseilcppver=37dd2562ec830d547a1524bb306be313ac3f2556
|
||||
pkgrel=1
|
||||
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=('re2c' 'protobuf' 'php' 'c-ares' 'openssl' 'chrpath' 'gflags'
|
||||
'cython')
|
||||
makedepends=('re2c' 'protobuf' 'php' 'c-ares' 'openssl' 'chrpath' 'gflags' 'cython' 'cmake')
|
||||
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"
|
||||
"makefile.patch"
|
||||
"makefile-remove-extra-semi.patch"
|
||||
"makefile-disable-strip.patch"
|
||||
"makefile-disable-ldconfig.patch")
|
||||
"https://github.com/abseil/abseil-cpp/archive/$_abseilcppver/abseil-cpp-$_abseilcppver.tar.gz")
|
||||
sha256sums=('3ccc4e5ae8c1ce844456e39cc11f1c991a7da74396faabe83d779836ef449bce'
|
||||
'443d383db648ebb8e391382c0ab63263b7091d03197f304390baac10f178a468'
|
||||
'19391fb4882601a65cb648d638c11aa301ce5f525ef02da1a9eafd22f72d7c59'
|
||||
'f292cb387f0cf7567e6e8004a6dd57bf0375abbaa8968dcd97cbd7e72409670f'
|
||||
'e2b70ba6c75de1f50bd33686e01b3fe35f08e74556c5cbc9755c758d700815d8'
|
||||
'da7ef0f69f2318ccd50bbb011b07bd973a8609e098b016fdec25833ff8fccd9a'
|
||||
'1d910fb15f93f7d4f74a11c092bc427f0624aedb4185af143640afa137e1fb73')
|
||||
'19391fb4882601a65cb648d638c11aa301ce5f525ef02da1a9eafd22f72d7c59')
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
|
||||
for patch in "$srcdir/"*.patch; do
|
||||
patch -p1 -i "$patch"
|
||||
done
|
||||
|
||||
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
|
||||
cd build
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DgRPC_BUILD_CSHARP_EXT=OFF \
|
||||
-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF \
|
||||
-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF \
|
||||
-DgRPC_CARES_PROVIDER=package \
|
||||
-DgRPC_PROTOBUF_PROVIDER=package \
|
||||
-DgRPC_SSL_PROVIDER=package \
|
||||
-DgRPC_ZLIB_PROVIDER=package \
|
||||
..
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
export CFLAGS="$CFLAGS -Wno-unused-parameter"
|
||||
export CXXFLAGS="$CXXFLAGS -Wno-unused-parameter"
|
||||
|
||||
export CFLAGS="$CFLAGS -Wno-unused-parameter -Wno-unused-function"
|
||||
export CXXFLAGS="$CXXFLAGS -Wno-unused-parameter -Wno-unused-function"
|
||||
[[ $CARCH == "armv6h" || $CARCH == "arm" ]] && LIBS="-latomic"
|
||||
make prefix=/usr EXTRA_LDLIBS="$LIBS"
|
||||
make prefix=/usr grpc_cli EXTRA_LDLIBS="$LIBS"
|
||||
|
||||
# Don't install it as part of main package
|
||||
mv bins/opt/grpc_cli .
|
||||
make shared plugins EXTRA_LDLIBS="$LIBS"
|
||||
|
||||
# Python
|
||||
GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
|
||||
|
@ -82,6 +79,7 @@ package_grpc() {
|
|||
}
|
||||
|
||||
package_python-grpcio() {
|
||||
description='Python language bindings for grpc, remote procedure call (RPC) framework'
|
||||
depends=('c-ares' 'python')
|
||||
|
||||
cd "$srcdir/$pkgbase-$pkgver"
|
||||
|
@ -90,6 +88,7 @@ package_python-grpcio() {
|
|||
}
|
||||
|
||||
package_php-grpc() {
|
||||
description='gRPC module for PHP'
|
||||
depends=('grpc' 'php')
|
||||
backup=('etc/php/conf.d/grpc.ini')
|
||||
|
||||
|
@ -106,9 +105,10 @@ package_php-grpc() {
|
|||
}
|
||||
|
||||
package_grpc-cli() {
|
||||
description='gRPC protocol buffers cli'
|
||||
depends=('c-ares' 'gflags' 'protobuf' 'openssl')
|
||||
|
||||
cd "$srcdir/$pkgbase-$pkgver"
|
||||
install -Dm755 grpc_cli "$pkgdir"/usr/bin/grpc_cli
|
||||
make prefix="$pkgdir/usr" install-grpc-cli
|
||||
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
||||
}
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 9546b7a..f845de2 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -3288,11 +3288,6 @@ else ifneq ($(SYSTEM),Darwin)
|
||||
$(Q) ln -sf $(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libupb.so.9
|
||||
$(Q) ln -sf $(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libupb.so
|
||||
endif
|
||||
-ifneq ($(SYSTEM),MINGW32)
|
||||
-ifneq ($(SYSTEM),Darwin)
|
||||
- $(Q) ldconfig || true
|
||||
-endif
|
||||
-endif
|
||||
|
||||
|
||||
install-shared_cxx: shared_cxx install-shared_c install-pkg-config_cxx
|
||||
@@ -3350,11 +3345,6 @@ else ifneq ($(SYSTEM),Darwin)
|
||||
$(Q) ln -sf $(SHARED_PREFIX)grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/lib/libgrpcpp_channelz.so.1
|
||||
$(Q) ln -sf $(SHARED_PREFIX)grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/lib/libgrpcpp_channelz.so
|
||||
endif
|
||||
-ifneq ($(SYSTEM),MINGW32)
|
||||
-ifneq ($(SYSTEM),Darwin)
|
||||
- $(Q) ldconfig || true
|
||||
-endif
|
||||
-endif
|
||||
|
||||
|
||||
install-shared_csharp: shared_csharp strip-shared_csharp
|
||||
@@ -3367,11 +3357,6 @@ else ifneq ($(SYSTEM),Darwin)
|
||||
$(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(prefix)/lib/libgrpc_csharp_ext.so.2
|
||||
$(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(prefix)/lib/libgrpc_csharp_ext.so
|
||||
endif
|
||||
-ifneq ($(SYSTEM),MINGW32)
|
||||
-ifneq ($(SYSTEM),Darwin)
|
||||
- $(Q) ldconfig || true
|
||||
-endif
|
||||
-endif
|
||||
|
||||
|
||||
install-plugins: $(PROTOC_PLUGINS)
|
|
@ -1,40 +0,0 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index d65551c..9546b7a 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -3191,7 +3191,7 @@ install-headers_cxx:
|
||||
|
||||
install-static: install-static_c install-static_cxx
|
||||
|
||||
-install-static_c: static_c strip-static_c install-pkg-config_c
|
||||
+install-static_c: static_c install-pkg-config_c
|
||||
$(E) "[INSTALL] Installing libaddress_sorting.a"
|
||||
$(Q) $(INSTALL) -d $(prefix)/lib
|
||||
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(prefix)/lib/libaddress_sorting.a
|
||||
@@ -3211,7 +3211,7 @@ install-static_c: static_c strip-static_c install-pkg-config_c
|
||||
$(Q) $(INSTALL) -d $(prefix)/lib
|
||||
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libupb.a $(prefix)/lib/libupb.a
|
||||
|
||||
-install-static_cxx: static_cxx strip-static_cxx install-pkg-config_cxx
|
||||
+install-static_cxx: static_cxx install-pkg-config_cxx
|
||||
$(E) "[INSTALL] Installing libgrpc++.a"
|
||||
$(Q) $(INSTALL) -d $(prefix)/lib
|
||||
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(prefix)/lib/libgrpc++.a
|
||||
@@ -3233,7 +3233,7 @@ install-static_cxx: static_cxx strip-static_cxx install-pkg-config_cxx
|
||||
|
||||
|
||||
|
||||
-install-shared_c: shared_c strip-shared_c install-pkg-config_c
|
||||
+install-shared_c: shared_c install-pkg-config_c
|
||||
$(E) "[INSTALL] Installing $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)"
|
||||
$(Q) $(INSTALL) -d $(prefix)/lib
|
||||
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/$(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)
|
||||
@@ -3295,7 +3295,7 @@ endif
|
||||
endif
|
||||
|
||||
|
||||
-install-shared_cxx: shared_cxx strip-shared_cxx install-shared_c install-pkg-config_cxx
|
||||
+install-shared_cxx: shared_cxx install-shared_c install-pkg-config_cxx
|
||||
$(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)"
|
||||
$(Q) $(INSTALL) -d $(prefix)/lib
|
||||
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/lib/$(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)
|
|
@ -1,17 +0,0 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 694f0f2..50eec93 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -315,12 +315,6 @@ ifeq ($(HAS_WORKING_NO_CXX14_COMPAT),true)
|
||||
W_NO_CXX14_COMPAT=-Wno-c++14-compat
|
||||
endif
|
||||
|
||||
-CHECK_EXTRA_SEMI_WORKS_CMD = $(CC) -std=c99 -Werror -Wextra-semi -o $(TMPOUT) -c test/build/extra-semi.c
|
||||
-HAS_WORKING_EXTRA_SEMI = $(shell $(CHECK_EXTRA_SEMI_WORKS_CMD) 2> /dev/null && echo true || echo false)
|
||||
-ifeq ($(HAS_WORKING_EXTRA_SEMI),true)
|
||||
-W_EXTRA_SEMI=-Wextra-semi
|
||||
-NO_W_EXTRA_SEMI=-Wno-extra-semi
|
||||
-endif
|
||||
CHECK_NO_SHIFT_NEGATIVE_VALUE_WORKS_CMD = $(CC) -std=c99 -Werror -Wno-shift-negative-value -o $(TMPOUT) -c test/build/no-shift-negative-value.c
|
||||
HAS_WORKING_NO_SHIFT_NEGATIVE_VALUE = $(shell $(CHECK_NO_SHIFT_NEGATIVE_VALUE_WORKS_CMD) 2> /dev/null && echo true || echo false)
|
||||
ifeq ($(HAS_WORKING_NO_SHIFT_NEGATIVE_VALUE),true)
|
|
@ -1,15 +0,0 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index d8a0e01..9596d6c 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -3022,8 +3022,8 @@ install-headers_c:
|
||||
|
||||
install-headers_cxx:
|
||||
$(E) "[INSTALL] Installing public C++ headers"
|
||||
- $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) -d $(prefix)/$(dir $(h)) && ) exit 0 || exit 1
|
||||
- $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) $(h) $(prefix)/$(h) && ) exit 0 || exit 1
|
||||
+ $(Q) DIRS="$(shell dirname $(PUBLIC_HEADERS_CXX) | uniq )"; for d in $$DIRS; do [ ! -d $(prefix)/$$d ] && $(INSTALL) -d $(prefix)/$$d || : ; done
|
||||
+ $(Q) for f in $(PUBLIC_HEADERS_CXX); do $(INSTALL) $$f $(prefix)/$$f ; done
|
||||
|
||||
install-static: install-static_c install-static_cxx
|
||||
|
Loading…
Reference in a new issue