diff --git a/31671.patch b/31671.patch new file mode 100644 index 0000000..088bab6 --- /dev/null +++ b/31671.patch @@ -0,0 +1,28 @@ +From 2bc8a76b14b5db09ceb3d00a081d8411c34451cf Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Wed, 16 Nov 2022 09:00:21 -0500 +Subject: [PATCH] Use CMake variables for paths in pkg-config files + +Use @gRPC_INSTALL_LIBDIR@ for libdir; this fixes an incorrect +-L/usr/lib on multilib Linux systems where that is the 32-bit library +path and the correct path is /usr/lib64. + +Use @gRPC_INSTALL_INCLUDEDIR@ for consistency. +--- + cmake/pkg-config-template.pc.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cmake/pkg-config-template.pc.in b/cmake/pkg-config-template.pc.in +index d56154bb3a53..3a260418a815 100644 +--- a/cmake/pkg-config-template.pc.in ++++ b/cmake/pkg-config-template.pc.in +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=${prefix} +-includedir=${prefix}/include +-libdir=${exec_prefix}/lib ++includedir=@gRPC_INSTALL_INCLUDEDIR@ ++libdir=@gRPC_INSTALL_LIBDIR@ + + Name: @PC_NAME@ + Description: @PC_DESCRIPTION@ diff --git a/grpc.spec b/grpc.spec index 307b706..d7efe9d 100644 --- a/grpc.spec +++ b/grpc.spec @@ -365,6 +365,20 @@ Patch: grpc-1.46.3-ChannelzServicerTest-python3.11-regressions.patch # https://github.com/grpc/grpc/issues/25368 # The patch simply skips the test. Patch: grpc-1.48.0-python-grpcio_tests-DynamicStubTest-hang.patch +# Use CMake variables for paths in pkg-config files +# +# Use @gRPC_INSTALL_LIBDIR@ for libdir; this fixes an incorrect +# -L/usr/lib on multilib Linux systems where that is the 32-bit library +# path and the correct path is /usr/lib64. +# +# Use @gRPC_INSTALL_INCLUDEDIR@ for consistency. +# +# See also: +# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ +# thread/P2N35UMQVEXPILAF47RQB53MWRV2GM3J/ +# +# https://github.com/grpc/grpc/pull/31671 +Patch: %{forgeurl}/pull/31671.patch Requires: grpc-data = %{version}-%{release}