Source: libmtp Version: 1.1.17-3 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
libmtp fails to cross build from source, because it fails running the built mtp-hotplug during build. Looking closer, it is needed to generate files, which are installed into libmtp-common, which is Architecture: all. Since cross builds are arch-only, we don't actually need to do this. So all that is needed to make libmtp cross buildable is skipping these calls. Please consider applying the attached patch. Helmut
diff --minimal -Nru libmtp-1.1.17/debian/changelog libmtp-1.1.17/debian/changelog --- libmtp-1.1.17/debian/changelog 2020-03-26 10:10:17.000000000 +0100 +++ libmtp-1.1.17/debian/changelog 2020-09-29 21:16:35.000000000 +0200 @@ -1,3 +1,10 @@ +libmtp (1.1.17-3.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Skip mtp-hotplug calls during arch-only builds. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Tue, 29 Sep 2020 21:16:35 +0200 + libmtp (1.1.17-3) unstable; urgency=medium * Add patch to do not let printers get auto-probed. diff --minimal -Nru libmtp-1.1.17/debian/patches/cross.patch libmtp-1.1.17/debian/patches/cross.patch --- libmtp-1.1.17/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ libmtp-1.1.17/debian/patches/cross.patch 2020-09-29 21:16:35.000000000 +0200 @@ -0,0 +1,33 @@ +--- libmtp-1.1.17.orig/Makefile.am ++++ libmtp-1.1.17/Makefile.am +@@ -11,6 +11,7 @@ + if USE_LINUX + udevrulesdir=@UDEV@/rules.d + hwdbdir=@UDEV@/hwdb.d ++if ENABLE_CONFIGFILES + udevrules_DATA=@UDEV_RULES@ + hwdb_DATA=69-libmtp.hwdb + noinst_DATA=libmtp.usermap libmtp.fdi +@@ -26,6 +27,7 @@ + + $(hwdb_DATA): util/mtp-hotplug + util/mtp-hotplug -w > $(hwdb_DATA) ++endif + + CLEANFILES = libmtp.usermap @UDEV_RULES@ libmtp.fdi libmtp.hwdb + endif +--- libmtp-1.1.17.orig/configure.ac ++++ libmtp-1.1.17/configure.ac +@@ -14,6 +14,12 @@ + AC_PROG_LIBTOOL + AM_ICONV + ++AC_ARG_ENABLE(configfiles, ++ [build configuration files for integrating into udev etc], ++ [ENABLE_CONFIGFILES=$enableval], ++ [ENABLE_CONFIGFILES=yes]) ++AM_CONDITIONAL(ENABLE_CONFIGFILES,[test "$ENABLE_CONFIGFILES" = yes]) ++ + # Optionally set install location of udev + UDEV=/usr/lib/udev + AC_ARG_WITH(udev, diff --minimal -Nru libmtp-1.1.17/debian/patches/series libmtp-1.1.17/debian/patches/series --- libmtp-1.1.17/debian/patches/series 2020-03-26 10:10:17.000000000 +0100 +++ libmtp-1.1.17/debian/patches/series 2020-09-29 21:16:35.000000000 +0200 @@ -1,3 +1,4 @@ 1002-udev_rules.patch repro-doc.patch 1003-udev_rules_skip_printers.patch +cross.patch diff --minimal -Nru libmtp-1.1.17/debian/rules libmtp-1.1.17/debian/rules --- libmtp-1.1.17/debian/rules 2020-03-26 10:10:17.000000000 +0100 +++ libmtp-1.1.17/debian/rules 2020-09-29 21:16:35.000000000 +0200 @@ -7,6 +7,9 @@ ifneq (,$(findstring libmtp-doc, $(shell dh_listpackages))) DEB_CONFIGURE_EXTRA_FLAGS += --enable-doxygen endif +ifeq (,$(findstring libmtp-common, $(shell dh_listpackages))) +DEB_CONFIGURE_EXTRA_FLAGS += --disable-configfiles +endif # The default changed in libmtp 1.1.9 to /usr/lib/udev DEB_CONFIGURE_EXTRA_FLAGS += --with-udev=/lib/udev