Remove ldflags that only make sense during build from pkgconf file

https://bugzilla.redhat.com/show_bug.cgi?id=2043092#c36
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-01-30 21:59:56 +01:00
parent dcc4a6870c
commit f254fc3fc2
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,14 @@
Libs.private should contain a list of libraries the library that the package
exposes is linked too. So let's filter out unrelated link flags.
diff --git sane-backends-1.1.1/tools/sane-backends.pc.in~ sane-backends-1.1.1/tools/sane-backends.pc.in
index b4d9731f82..dd8adfd89c 100644
--- sane-backends-1.1.1/tools/sane-backends.pc.in~
+++ sane-backends-1.1.1/tools/sane-backends.pc.in
@@ -10,5 +10,5 @@ Description: Backends for SANE, the universal scanner interface
Version: @VERSION@
Requires:
Libs: -L${libdir} -lsane
-Libs.private: ${ldflags} ${libs}
+Libs.private: ${libs}
Cflags: -I${includedir}

View File

@ -14,7 +14,7 @@
Summary: Scanner access software
Name: sane-backends
Version: 1.1.1
Release: 2%{?dist}
Release: 3%{?dist}
# lib/ is LGPLv2+, backends are GPLv2+ with exceptions
# Tools are GPLv2+, docs are public domain
# see LICENSE for details
@ -37,6 +37,8 @@ Patch1: sane-backends-1.0.23-soname.patch
Patch2: sane-backends-1.0.23-sane-config-multilib.patch
# 2042316 - genesys: backend crashes because it attempts to access a member outside of vector
Patch3: sane-genesys-gl845-crash.patch
# 2043092 - ldflags that only make sense during build are exposed in pkgconf file
Patch4: sane-backends-pkgconfig-misunderstanding.patch
URL: http://www.sane-project.org
@ -161,6 +163,7 @@ access image acquisition devices available on the local host.
%patch2 -p1 -b .sane-config-multilib
# 2042316 - genesys: backend crashes because it attempts to access a member outside of vector
%patch3 -p1 -b .genesys-gl845-crash
%patch4 -p1
%build
CFLAGS="%optflags -fno-strict-aliasing"
@ -434,6 +437,9 @@ exit 0
%{_unitdir}/saned@.service
%changelog
* Sun Jan 30 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.1-3
- 2043092 - remove ldflags that only make sense during build from pkgconf file
* Mon Jan 24 2022 Zdenek Dohnal <zdohnal@redhat.com> - 1.1.1-2
- 2042316 - genesys: backend crashes because it attempts to access a member outside of vector