From f254fc3fc232e32d85220325f3b0fe044fb03ac5 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Jan 30 2022 21:13:32 +0000 Subject: Remove ldflags that only make sense during build from pkgconf file https://bugzilla.redhat.com/show_bug.cgi?id=2043092#c36 --- diff --git a/sane-backends-pkgconfig-misunderstanding.patch b/sane-backends-pkgconfig-misunderstanding.patch new file mode 100644 index 0000000..80e309f --- /dev/null +++ b/sane-backends-pkgconfig-misunderstanding.patch @@ -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} diff --git a/sane-backends.spec b/sane-backends.spec index 139e3b6..477e402 100644 --- a/sane-backends.spec +++ b/sane-backends.spec @@ -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 - 1.1.1-3 +- 2043092 - remove ldflags that only make sense during build from pkgconf file + * Mon Jan 24 2022 Zdenek Dohnal - 1.1.1-2 - 2042316 - genesys: backend crashes because it attempts to access a member outside of vector