--- Begin Message ---
Source: sane-airscan
Version: 0.99.13-1
Tags: patch upstream
User: debian-cross@lists.debian.org
Usertags: ftcbfs
sane-airscan fails to cross build from source for two reasons.
The first is using the build architecture pkg-config. The upstream
Makefile hard codes the build architecture pkg-config despite setting up
the standard PKG_CONFIG variable. All it needs to do here is use the
variable to pick up the correct pkg-config passed by dh_auto_build.
It also passes -s to install, which causes the build architecture strip
to be invoked. Beyond breaking cross compilation, this breaks generation
of -dbgsym packages and DEB_BUILD_OPTIONS=nostrip. It is best practice
to defer all stripping to dh_strip, which does the right thing. While
the upstream build system supports a way of avoiding that (passing an
empty STRIP variable), it would be nice if it would also support the
standard debhelper way. dh_auto_install passes an INSTALL that never
strips (even if requested via -s). Alternatively, adding an
override_dh_auto_install passing STRIP= to would also do.
Please consider applying the attached patch to fix all mentioned issues.
Helmut
--- sane-airscan-0.99.13.orig/Makefile
+++ sane-airscan-0.99.13/Makefile
@@ -21,6 +21,7 @@
MANDIR = /usr/share/man/
PKG_CONFIG = /usr/bin/pkg-config
STRIP = -s
+INSTALL = install
# These variables are not intended to be user-settable
OBJDIR = objs/
@@ -42,11 +43,11 @@
OBJ = $(addprefix $(OBJDIR), $(SRC:.c=.o))
# Obtain CFLAGS and LDFLAGS for dependencies
-deps_CFLAGS := $(foreach lib, $(DEPS_COMMON), $(shell pkg-config --cflags $(lib)))
-deps_CFLAGS += $(foreach lib, $(DEPS_CODECS), $(shell pkg-config --cflags $(lib)))
+deps_CFLAGS := $(foreach lib, $(DEPS_COMMON), $(shell $(PKG_CONFIG) --cflags $(lib)))
+deps_CFLAGS += $(foreach lib, $(DEPS_CODECS), $(shell $(PKG_CONFIG) --cflags $(lib)))
-deps_LIBS := $(foreach lib, $(DEPS_COMMON), $(shell pkg-config --libs $(lib))) -lm
-deps_LIBS_CODECS := $(foreach lib, $(DEPS_CODECS), $(shell pkg-config --libs $(lib)))
+deps_LIBS := $(foreach lib, $(DEPS_COMMON), $(shell $(PKG_CONFIG) --libs $(lib))) -lm
+deps_LIBS_CODECS := $(foreach lib, $(DEPS_CODECS), $(shell $(PKG_CONFIG) --libs $(lib)))
# Compute CFLAGS and LDFLAGS for backend and tools
#
@@ -89,13 +90,13 @@
mkdir -p $(DESTDIR)$(PREFIX)$(BINDIR)
mkdir -p $(DESTDIR)$(PREFIX)$(CONFDIR)
mkdir -p $(DESTDIR)$(PREFIX)$(CONFDIR)/dll.d
- install $(STRIP) -D -t $(DESTDIR)$(PREFIX)$(BINDIR) $(DISCOVER)
+ $(INSTALL) $(STRIP) -D -t $(DESTDIR)$(PREFIX)$(BINDIR) $(DISCOVER)
cp -n airscan.conf $(DESTDIR)$(PREFIX)$(CONFDIR)
cp -n dll.conf $(DESTDIR)$(PREFIX)$(CONFDIR)/dll.d/airscan
- install $(STRIP) -D -t $(DESTDIR)$(PREFIX)$(LIBDIR)/sane $(BACKEND)
+ $(INSTALL) $(STRIP) -D -t $(DESTDIR)$(PREFIX)$(LIBDIR)/sane $(BACKEND)
mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man5
- install -m 644 -D -t $(DESTDIR)$(PREFIX)$(MANDIR)/man1 $(MAN_DISCOVER)
- install -m 644 -D -t $(DESTDIR)$(PREFIX)$(MANDIR)/man5 $(MAN_BACKEND)
+ $(INSTALL) -m 644 -D -t $(DESTDIR)$(PREFIX)$(MANDIR)/man1 $(MAN_DISCOVER)
+ $(INSTALL) -m 644 -D -t $(DESTDIR)$(PREFIX)$(MANDIR)/man5 $(MAN_BACKEND)
[ "$(COMPRESS)" = "" ] || $(COMPRESS) -f $(DESTDIR)$(PREFIX)$(MANDIR)/man1/$(MAN_DISCOVER)
[ "$(COMPRESS)" = "" ] || $(COMPRESS) -f $(DESTDIR)$(PREFIX)$(MANDIR)/man5/$(MAN_BACKEND)
--- End Message ---
--- Begin Message ---
Source: sane-airscan
Source-Version: 0.99.13-2
Done: Didier Raboud <odyx@debian.org>
We believe that the bug you reported is fixed in the latest version of
sane-airscan, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 968421@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Didier Raboud <odyx@debian.org> (supplier of updated sane-airscan package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sun, 16 Aug 2020 13:21:43 +0200
Source: sane-airscan
Architecture: source
Version: 0.99.13-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Printing Team <debian-printing@lists.debian.org>
Changed-By: Didier Raboud <odyx@debian.org>
Closes: 968421
Changes:
sane-airscan (0.99.13-2) unstable; urgency=medium
.
[ Helmut Grohne ]
* Fix FTCBFS (Closes: #968421):
- Respect provided INSTALL to never strip
- Respect provided PKG_CONFIG
Checksums-Sha1:
dfa5af6995b57699447a52cea2a47085cc5c4172 2204 sane-airscan_0.99.13-2.dsc
062051bc76f6e69d52190dd0a20bf74a09e24bd5 3824 sane-airscan_0.99.13-2.debian.tar.xz
Checksums-Sha256:
aaddc8d1bf8d873976c9799d51271bb58ac09936d1de6e7c80c48a83f756e15e 2204 sane-airscan_0.99.13-2.dsc
ed9ee34c3924f747a6f7b1fe918ec05cca60f0d4a617112edd059a826d9aab75 3824 sane-airscan_0.99.13-2.debian.tar.xz
Files:
725b35b6e11e9fb738f07b155f83587e 2204 graphics optional sane-airscan_0.99.13-2.dsc
a48606e57b337bed3bc7dec05b2c60f7 3824 graphics optional sane-airscan_0.99.13-2.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEJ3k7rA0YCplkx4gZqcb6xg1jAWkFAl85GLAACgkQqcb6xg1j
AWmqdg//YioqEznKwh0lnMQIRp7pH/JlcBjT5Efqr5F3yrc0XZiJ+lPuGUfO6yzu
vEihuHDknphnokdvMpdZiOS+OKiPQhb9Pzk49WsudgoBhChJCx/DBzSJJVoVgy7o
8XgmZqNY5/6KMcLmSk9YdpiFdl2mFPIToJuI0kzGLxdldWrQ2v8/O0z856ja5PdX
TAlnJdNGxJAw/wvlRs/PxZRi3Exr5R1tkxxL0dyFRtcmN3SRL6iO4yYVmoL0bqRg
PUaloNW1sIbTEo1SLu+w9n+x8EIjCjYMdnAedt4H3VGMZyciOP+hrw3Npsb3jyR7
0+013PY1Bs4kzRudT1nqWHdmldJmstHwu2E6wUPMJhGWFmPodx41zwVz9VsLkz3N
fom2LmGchP3a82s2357iw5H1ZdlOZsSQP1h85K2kdO0cM/cU4gNHCOJTBsBh/weH
Q3gXKicJOHroIeuq/TjsbBpbCgBmgKg43zpQy7cg+3n6lCTXW31k5E1CnQFVaM3f
OgQL3Fk1NJtI7KPxySNP39pft1f+zhtL2DKuVrC6aJu2t5L3nkXCjb8gZ+MigBl7
Rux0lails2L7QH2unOv0IV5WC9L1snjPNBETvJN2HIspyc555L+p0YEv3GqqeKM0
76NKl5o+ZS2aoqWMq4gjW445edOXzFtUFxUWJbrN3qrFp6tktHE=
=Ju/P
-----END PGP SIGNATURE-----
--- End Message ---