grpc: split libgrpc, ship plugin on cross-compile
Why we're at it, clean build steps, remove all reference to absl in pkg-config and cmake config.
This commit is contained in:
parent
b416dfaea9
commit
ac3a0722f7
4 changed files with 89 additions and 24 deletions
|
@ -3659,18 +3659,18 @@ liboblibs.so.0.1 oblibs-0.1.1.1_1
|
||||||
libaal-1.0.so.7 libaal-1.0.7_1
|
libaal-1.0.so.7 libaal-1.0.7_1
|
||||||
libaal-minimal.so.0 libaal-1.0.7_1
|
libaal-minimal.so.0 libaal-1.0.7_1
|
||||||
libcli.so.1.9 libcli-1.9.8.4_1
|
libcli.so.1.9 libcli-1.9.8.4_1
|
||||||
libaddress_sorting.so.18 grpc-1.39.0_1
|
libaddress_sorting.so.18 libgrpc-1.39.0_6
|
||||||
libgpr.so.18 grpc-1.39.0_1
|
libgpr.so.18 libgrpc-1.39.0_6
|
||||||
libgrpc++.so.1.39 grpc-1.39.0_1
|
libgrpc++.so.1.39 libgrpc-1.39.0_6
|
||||||
libgrpc++_alts.so.1.39 grpc-1.39.0_1
|
libgrpc++_alts.so.1.39 libgrpc-1.39.0_6
|
||||||
libgrpc++_error_details.so.1.39 grpc-1.39.0_1
|
libgrpc++_error_details.so.1.39 libgrpc-1.39.0_6
|
||||||
libgrpc++_reflection.so.1.39 grpc-1.39.0_1
|
libgrpc++_reflection.so.1.39 libgrpc-1.39.0_6
|
||||||
libgrpc++_unsecure.so.1.39 grpc-1.39.0_1
|
libgrpc++_unsecure.so.1.39 libgrpc-1.39.0_6
|
||||||
libgrpc.so.18 grpc-1.39.0_1
|
libgrpc.so.18 libgrpc-1.39.0_6
|
||||||
libgrpc_plugin_support.so.1.39 grpc-1.39.0_1
|
libgrpc_plugin_support.so.1.39 libgrpc-1.39.0_6
|
||||||
libgrpc_unsecure.so.18 grpc-1.39.0_1
|
libgrpc_unsecure.so.18 libgrpc-1.39.0_6
|
||||||
libgrpcpp_channelz.so.1.39 grpc-1.39.0_1
|
libgrpcpp_channelz.so.1.39 libgrpc-1.39.0_6
|
||||||
libupb.so.18 grpc-1.39.0_1
|
libupb.so.18 libgrpc-1.39.0_6
|
||||||
libircclient.so.1 libircclient-1.10_5
|
libircclient.so.1 libircclient-1.10_5
|
||||||
libFAudio.so.0 FAudio-19.05_1
|
libFAudio.so.0 FAudio-19.05_1
|
||||||
libqaccessibilityclient-qt5.so.0 libqaccessibilityclient-0.4.0_1
|
libqaccessibilityclient-qt5.so.0 libqaccessibilityclient-0.4.0_1
|
||||||
|
|
58
srcpkgs/grpc/patches/absl-is-private.patch
Normal file
58
srcpkgs/grpc/patches/absl-is-private.patch
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
--- grpc-1.39.1.orig/CMakeLists.txt
|
||||||
|
+++ grpc-1.39.1/CMakeLists.txt
|
||||||
|
@@ -15856,7 +15865,7 @@ generate_pkgconfig(
|
||||||
|
"gpr"
|
||||||
|
"gRPC platform support library"
|
||||||
|
"${gRPC_CORE_VERSION}"
|
||||||
|
- "absl_base absl_memory absl_optional absl_status absl_str_format absl_strings absl_synchronization absl_time"
|
||||||
|
+ ""
|
||||||
|
"-lgpr"
|
||||||
|
""
|
||||||
|
"gpr.pc")
|
||||||
|
@@ -15866,7 +15875,7 @@ generate_pkgconfig(
|
||||||
|
"gRPC"
|
||||||
|
"high performance general RPC framework"
|
||||||
|
"${gRPC_CORE_VERSION}"
|
||||||
|
- "gpr openssl absl_base absl_bind_front absl_flat_hash_map absl_inlined_vector absl_memory absl_optional absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time"
|
||||||
|
+ "gpr openssl"
|
||||||
|
"-lgrpc -laddress_sorting -lre2 -lupb -lcares -lz"
|
||||||
|
""
|
||||||
|
"grpc.pc")
|
||||||
|
@@ -15876,7 +15885,7 @@ generate_pkgconfig(
|
||||||
|
"gRPC unsecure"
|
||||||
|
"high performance general RPC framework without SSL"
|
||||||
|
"${gRPC_CORE_VERSION}"
|
||||||
|
- "gpr absl_base absl_bind_front absl_flat_hash_map absl_inlined_vector absl_memory absl_optional absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time"
|
||||||
|
+ "gpr"
|
||||||
|
"-lgrpc_unsecure"
|
||||||
|
""
|
||||||
|
"grpc_unsecure.pc")
|
||||||
|
@@ -15886,7 +15895,7 @@ generate_pkgconfig(
|
||||||
|
"gRPC++"
|
||||||
|
"C++ wrapper for gRPC"
|
||||||
|
"${gRPC_CPP_VERSION}"
|
||||||
|
- "grpc absl_base absl_bind_front absl_flat_hash_map absl_inlined_vector absl_memory absl_optional absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time"
|
||||||
|
+ "grpc"
|
||||||
|
"-lgrpc++"
|
||||||
|
""
|
||||||
|
"grpc++.pc")
|
||||||
|
@@ -15896,7 +15905,7 @@ generate_pkgconfig(
|
||||||
|
"gRPC++ unsecure"
|
||||||
|
"C++ wrapper for gRPC without SSL"
|
||||||
|
"${gRPC_CPP_VERSION}"
|
||||||
|
- "grpc_unsecure absl_base absl_bind_front absl_flat_hash_map absl_inlined_vector absl_memory absl_optional absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time"
|
||||||
|
+ "grpc_unsecure"
|
||||||
|
"-lgrpc++_unsecure"
|
||||||
|
""
|
||||||
|
"grpc++_unsecure.pc")
|
||||||
|
--- grpc-1.39.1.orig/cmake/pkg-config-template.pc.in
|
||||||
|
+++ grpc-1.39.1/cmake/pkg-config-template.pc.in
|
||||||
|
@@ -6,7 +6,7 @@ libdir=${exec_prefix}/lib
|
||||||
|
Name: @PC_NAME@
|
||||||
|
Description: @PC_DESCRIPTION@
|
||||||
|
Version: @PC_VERSION@
|
||||||
|
-Cflags: -I${includedir}
|
||||||
|
+Cflags: -I${includedir} -I${includedir}/grpc_absl
|
||||||
|
Requires: @PC_REQUIRES@
|
||||||
|
Libs: -L${libdir} @PC_LIB@
|
||||||
|
Libs.private: @PC_LIBS_PRIVATE@
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'grpc'
|
# Template file for 'grpc'
|
||||||
pkgname=grpc
|
pkgname=grpc
|
||||||
version=1.39.1
|
version=1.39.1
|
||||||
revision=5
|
revision=6
|
||||||
_abseilver=997aaf3a28308eba1b9156aa35ab7bca9688e9f6
|
_abseilver=997aaf3a28308eba1b9156aa35ab7bca9688e9f6
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
configure_args="-DBUILD_SHARED_LIBS=ON
|
configure_args="-DBUILD_SHARED_LIBS=ON
|
||||||
|
@ -39,23 +39,29 @@ post_extract() {
|
||||||
post_patch() {
|
post_patch() {
|
||||||
# re2 doesn't install CMake config modules;
|
# re2 doesn't install CMake config modules;
|
||||||
# key variables are set in configure_args
|
# key variables are set in configure_args
|
||||||
vsed -i CMakeLists.txt -e '/include(cmake\/re2\.cmake)/d'
|
# also install all plugin on cross-compiling
|
||||||
}
|
vsed -i CMakeLists.txt -e '/include(cmake\/re2\.cmake)/d' \
|
||||||
|
-e 's/gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING/gRPC_INSTALL/'
|
||||||
post_build() {
|
|
||||||
# Clean up unneeded absl linker arguments from pkgconfig files
|
|
||||||
sed -e 's/-labsl_[^[:space:]]\+[[:space:]]*//g' \
|
|
||||||
-i build/lib/pkgconfig/*.pc
|
|
||||||
}
|
}
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
# Remove unnecessary absl static libs and cmake modules
|
# Remove unnecessary absl static libs, pkg-config and cmake modules
|
||||||
rm "${DESTDIR}"/usr/lib/libabsl*.a
|
rm "${DESTDIR}"/usr/lib/libabsl*.a
|
||||||
|
rm -rf "${DESTDIR}/usr/lib/pkgconfig/"absl_*
|
||||||
rm -rf "${DESTDIR}/usr/lib/cmake/absl"
|
rm -rf "${DESTDIR}/usr/lib/cmake/absl"
|
||||||
|
|
||||||
# Add custom absl include root to grpcpp cflags
|
# Clean up unneeded absl linker arguments from cmake files
|
||||||
vsed -e 's,^Cflags:.*,& -I${includedir}/grpc_absl,' \
|
sed -e 's/absl::[a-zA-Z_-]*;//g' \
|
||||||
-i ${DESTDIR}/usr/lib/pkgconfig/grpc++*.pc
|
-e 's/ "absl::[a-zA-Z_-]*"/ /g' \
|
||||||
|
-i ${DESTDIR}/usr/lib/cmake/grpc/gRPCTargets.cmake
|
||||||
|
}
|
||||||
|
|
||||||
|
libgrpc_package() {
|
||||||
|
short_desc+=" - libraries"
|
||||||
|
pkg_install() {
|
||||||
|
vmove "usr/lib/*.so.*"
|
||||||
|
vmove usr/share
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
grpc-devel_package() {
|
grpc-devel_package() {
|
||||||
|
|
1
srcpkgs/libgrpc
Symbolic link
1
srcpkgs/libgrpc
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
grpc
|
Loading…
Add table
Add a link
Reference in a new issue