diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-28 13:10:52 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-28 13:10:52 +0200 |
commit | d07f65467bb1191b071975c35252405d0af63511 (patch) | |
tree | ff0fc207c91ed42e7c045ecd70f81e956a857a44 | |
parent | 9320abadc982f7b9a9de4e19bff35e5b86e9c3cb (diff) |
Fix FTCBFS
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | debian/patches/0045-disable_lock_test_at_build_time.patch~ | 27 | ||||
-rw-r--r-- | debian/patches/0060-cross.patch | 47 | ||||
-rw-r--r-- | debian/patches/0060-cross.patch~ | 45 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rwxr-xr-x | debian/rules | 24 |
6 files changed, 145 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index c566c69..5bb32cf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,11 @@ sane-backends (1.0.31-1~experimental1) UNRELEASED; urgency=medium - Rename tags. * debian/patches/0125-multiarch_dll_search_path.patch: - Add $(prefix)/lib64/sane to lib search path (Closes: #931297). + * Fix FTCBFS: (Closes: #948711) + - 0060-cross.patch: Make gphoto2 detection use the host architecture + pkg-config. + - Build tools/sane-desc for the build architecture. + - Thanks to Helmut Grohne <helmut@subdivi.de>. -- Jörg Frings-Fürst <debian@jff.email> Mon, 01 Jun 2020 13:14:34 +0200 diff --git a/debian/patches/0045-disable_lock_test_at_build_time.patch~ b/debian/patches/0045-disable_lock_test_at_build_time.patch~ new file mode 100644 index 0000000..e5f82f3 --- /dev/null +++ b/debian/patches/0045-disable_lock_test_at_build_time.patch~ @@ -0,0 +1,27 @@ +Description: Disable lock test at buildtime +Author: Jörg Frings-Fürst <debian@jff.emaill> +Forwarded: not-needed +Last-Update: 2020-08-28 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: trunk/acinclude.m4 +=================================================================== +--- trunk.orig/acinclude.m4 ++++ trunk/acinclude.m4 +@@ -359,11 +359,11 @@ AC_DEFUN([SANE_CHECK_LOCKING], + touch sanetest.file + chgrp $LOCKPATH_GROUP sanetest.file 2>/dev/null || lasterror=$? + rm -f sanetest.file +- if test ! -z "$lasterror"; then +- AC_MSG_WARN([Group $LOCKPATH_GROUP does not exist on this system.]) +- AC_MSG_WARN([Locking feature will be disabled.]) +- use_locking=no +- fi ++# if test ! -z "$lasterror"; then ++# AC_MSG_WARN([Group $LOCKPATH_GROUP does not exist on this system.]) ++# AC_MSG_WARN([Locking feature will be disabled.]) ++# use_locking=no ++# fi + fi + if test $use_locking = yes ; then + INSTALL_LOCKPATH=install-lockpath diff --git a/debian/patches/0060-cross.patch b/debian/patches/0060-cross.patch new file mode 100644 index 0000000..96e5a52 --- /dev/null +++ b/debian/patches/0060-cross.patch @@ -0,0 +1,47 @@ +Index: trunk/acinclude.m4 +=================================================================== +--- trunk.orig/acinclude.m4 ++++ trunk/acinclude.m4 +@@ -439,15 +439,19 @@ AC_DEFUN([SANE_CHECK_GPHOTO2], + # a program. And, if that works, then add the -l flags to + # GPHOTO2_LIBS and any other flags to GPHOTO2_LDFLAGS to pass to + # sane-config. +- if test "$with_gphoto2" != "no" ; then +- AC_CHECK_TOOL(HAVE_GPHOTO2, pkg-config, false) ++ AS_IF([test "$with_gphoto2" != "no"],[ ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++ if test "x$PKG_CONFIG" = x; then ++ HAVE_GPHOTO2=false ++ else ++ HAVE_GPHOTO2=$PKG_CONFIG ++ fi + + if test ${HAVE_GPHOTO2} != "false" ; then +- if pkg-config --exists libgphoto2 ; then +- with_gphoto2="`pkg-config --modversion libgphoto2`" +- GPHOTO2_CPPFLAGS="`pkg-config --cflags libgphoto2`" +- GPHOTO2_LIBS="`pkg-config --libs libgphoto2`" +- ++ if $PKG_CONFIG --exists libgphoto2 ; then ++ with_gphoto2="`$PKG_CONFIG --modversion libgphoto2`" ++ GPHOTO2_CPPFLAGS="`$PKG_CONFIG --cflags libgphoto2`" ++ GPHOTO2_LIBS="`$PKG_CONFIG --libs libgphoto2`" + saved_CPPFLAGS="${CPPFLAGS}" + CPPFLAGS="${GPHOTO2_CPPFLAGS}" + saved_LIBS="${LIBS}" +@@ -467,13 +471,13 @@ AC_DEFUN([SANE_CHECK_GPHOTO2], + GPHOTO2_LIBS="" + else + SANE_EXTRACT_LDFLAGS(GPHOTO2_LIBS, GPHOTO2_LDFLAGS) +- if pkg-config --atleast-version=2.5.0 libgphoto2; then ++ if $PKG_CONFIG --atleast-version=2.5.0 libgphoto2; then + AC_DEFINE([GPLOGFUNC_NO_VARGS], [1], + [Define if GPLogFunc does not take a va_list.]) + fi + fi + fi +- fi ++ ]) + AC_SUBST(GPHOTO2_CPPFLAGS) + AC_SUBST(GPHOTO2_LIBS) + AC_SUBST(GPHOTO2_LDFLAGS) diff --git a/debian/patches/0060-cross.patch~ b/debian/patches/0060-cross.patch~ new file mode 100644 index 0000000..e3a24f8 --- /dev/null +++ b/debian/patches/0060-cross.patch~ @@ -0,0 +1,45 @@ +--- sane-backends-1.0.27.orig/acinclude.m4 ++++ sane-backends-1.0.27/acinclude.m4 +@@ -439,15 +439,19 @@ AC_DEFUN([SANE_CHECK_GPHOTO2], + # a program. And, if that works, then add the -l flags to + # GPHOTO2_LIBS and any other flags to GPHOTO2_LDFLAGS to pass to + # sane-config. +- if test "$with_gphoto2" != "no" ; then +- AC_CHECK_TOOL(HAVE_GPHOTO2, pkg-config, false) ++ AS_IF([test "$with_gphoto2" != "no"],[ ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++ if test "x$PKG_CONFIG" = x; then ++ HAVE_GPHOTO2=false ++ else ++ HAVE_GPHOTO2=$PKG_CONFIG ++ fi + + if test ${HAVE_GPHOTO2} != "false" ; then +- if pkg-config --exists libgphoto2 ; then +- with_gphoto2="`pkg-config --modversion libgphoto2`" +- GPHOTO2_CPPFLAGS="`pkg-config --cflags libgphoto2`" +- GPHOTO2_LIBS="`pkg-config --libs libgphoto2`" +- ++ if $PKG_CONFIG --exists libgphoto2 ; then ++ with_gphoto2="`$PKG_CONFIG --modversion libgphoto2`" ++ GPHOTO2_CPPFLAGS="`$PKG_CONFIG --cflags libgphoto2`" ++ GPHOTO2_LIBS="`$PKG_CONFIG --libs libgphoto2`" + saved_CPPFLAGS="${CPPFLAGS}" + CPPFLAGS="${GPHOTO2_CPPFLAGS}" + saved_LIBS="${LIBS}" +@@ -431,13 +436,13 @@ + GPHOTO2_LIBS="" + else + SANE_EXTRACT_LDFLAGS(GPHOTO2_LIBS, GPHOTO2_LDFLAGS) +- if pkg-config --atleast-version=2.5.0 libgphoto2; then ++ if $PKG_CONFIG --atleast-version=2.5.0 libgphoto2; then + AC_DEFINE([GPLOGFUNC_NO_VARGS], [1], + [Define if GPLogFunc does not take a va_list.]) + fi + fi + fi +- fi ++ ]) + AC_SUBST(GPHOTO2_CPPFLAGS) + AC_SUBST(GPHOTO2_LIBS) + AC_SUBST(GPHOTO2_LDFLAGS) diff --git a/debian/patches/series b/debian/patches/series index 22d02b4..67211d9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -15,3 +15,4 @@ 0045-disable_lock_test_at_build_time.patch 0050-Use-python3-shebang.patch 0055-Fix_build_error.patch +0060-cross.patch diff --git a/debian/rules b/debian/rules index 4d9b6e1..d798b9e 100755 --- a/debian/rules +++ b/debian/rules @@ -23,10 +23,24 @@ endif %: dh $@ +ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) +SANE_DESC = $(CURDIR)/tools/sane-desc +else +SANE_DESC = $(CURDIR)/debian/sane-desc +endif + override_dh_auto_configure: autoconf - dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) \ - --build=$(DEB_BUILD_GNU_TYPE) \ +ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) + dpkg-architecture -f "-a$(DEB_BUILD_ARCH)" -c dh_auto_configure + $(MAKE) -C $(CURDIR)/lib liblib.la + $(MAKE) -C $(CURDIR)/sanei libsanei.la + $(MAKE) -C $(CURDIR)/tools sane-desc + mv $(CURDIR)/tools/sane-desc $(CURDIR)/debian/sane-desc + $(RM) include/byteorder.h include/_stdint.h + dh_auto_clean +endif + dh_auto_configure -- \ --prefix=/usr \ --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ --sysconfdir=/etc \ @@ -59,6 +73,7 @@ override_dh_auto_clean: [ ! -f Makefile ] || $(MAKE) distclean $(RM) debian/libsane1.udev dh_auto_clean + $(RM) $(SANE_DESC) override_dh_auto_install-arch: $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp @@ -117,8 +132,9 @@ override_dh_installudev-arch: ifeq (linux,$(DEB_HOST_ARCH_OS)) # udev support # Generate the udev rules file - $(CURDIR)/tools/sane-desc -s $(CURDIR)/doc/descriptions -m udev+hwdb > $(CURDIR)/debian/libsane1.udev - $(CURDIR)/tools/sane-desc -s $(CURDIR)/doc/descriptions -m hwdb > $(CURDIR)/debian/20-sane.hwdb + $(SANE_DESC) -s $(CURDIR)/doc/descriptions -m udev+hwdb > $(CURDIR)/debian/libsane1.udev + $(SANE_DESC) -s $(CURDIR)/doc/descriptions -m hwdb > $(CURDIR)/debian/20-sane.hwdb + cp $(CURDIR)/debian/20-sane.hwdb $(CURDIR)/debian/libsane1/lib/udev/hwdb.d/ dh_installudev endif |