The header grpcpp/impl/codegen/sync.h introduces an dependency on the
abseil header absl/synchronization/mutex.h, but grpc does not install
the abseil headers. Reverting back to v1.36 pending upstream resolution
or a suitable workaround is apparent.
This reverts commit fbe8cadae4
.
69 lines
2.2 KiB
Bash
69 lines
2.2 KiB
Bash
# Template file for 'grpc'
|
|
pkgname=grpc
|
|
reverts="1.37.0_1"
|
|
version=1.36.4
|
|
revision=2
|
|
_abseilver=6f9d96a1f41439ac172ee2ef7ccd8edf0e5d068c
|
|
build_style=cmake
|
|
configure_args="-DBUILD_SHARED_LIBS=ON
|
|
-DgRPC_CARES_PROVIDER=package -DgRPC_PROTOBUF_PROVIDER=package
|
|
-DgRPC_SSL_PROVIDER=package -DgRPC_ZLIB_PROVIDER=package
|
|
-D_gRPC_RE2_LIBRARIES=${XBPS_CROSS_BASE}/usr/lib/libre2.so
|
|
-D_gRPC_RE2_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include"
|
|
hostmakedepends="which protobuf"
|
|
_devel_depends="c-ares-devel re2-devel zlib-devel openssl-devel"
|
|
makedepends="libprotoc-devel protobuf-devel gperftools-devel ${_devel_depends}"
|
|
short_desc="High performance, open source, general RPC framework"
|
|
maintainer="Andrew J. Hesford <ajh@sideband.org>"
|
|
license="Apache-2.0"
|
|
homepage="https://github.com/grpc/grpc"
|
|
distfiles="${homepage}/archive/v${version}/${pkgname}-${version}.tar.gz
|
|
https://github.com/abseil/abseil-cpp/archive/${_abseilver}/abseil-cpp-${_abseilver}.tar.gz"
|
|
checksum="8eb9d86649c4d4a7df790226df28f081b97a62bf12c5c5fe9b5d31a29cd6541a
|
|
62c27e7a633e965a2f40ff16b487c3b778eae440bab64cad83b34ef1cbe3aa93"
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
# need host grpc_cpp_plugin
|
|
hostmakedepends+=" grpc"
|
|
fi
|
|
|
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
|
makedepends+=" libatomic-devel"
|
|
configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic"
|
|
fi
|
|
|
|
post_extract() {
|
|
rm -rf third_party/abseil-cpp
|
|
mv ../abseil-cpp-${_abseilver} third_party/abseil-cpp
|
|
}
|
|
|
|
post_patch() {
|
|
# re2 doesn't install CMake config modules;
|
|
# key variables are set in configure_args
|
|
vsed -i CMakeLists.txt -e '/include(cmake\/re2\.cmake)/d'
|
|
|
|
# override building shared abseil libs
|
|
vsed -i third_party/abseil-cpp/CMakeLists.txt \
|
|
-e "/project(absl CXX)/a set(BUILD_SHARED_LIBS OFF)"
|
|
}
|
|
|
|
post_install() {
|
|
# CMake seems to install these no matter what.
|
|
# For now, they do not appear to be necessary, so scrub them.
|
|
rm ${DESTDIR}/usr/lib/libabsl*.a
|
|
|
|
# Remove hard-coded absl linker args from pkgconfig files
|
|
sed -e 's/-labsl_[^[:space:]]\+[[:space:]]*//g' \
|
|
-i ${DESTDIR}/usr/lib/pkgconfig/*.pc
|
|
}
|
|
|
|
grpc-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="${sourcepkg}>=${version}_${revision} ${_devel_depends}"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/*.so
|
|
vmove usr/lib/cmake
|
|
vmove usr/lib/pkgconfig
|
|
}
|
|
}
|