Source: gphoto2 Version: 2.5.11-1 Tags: patch upstream User: helm...@debian.org Usertags: rebootstrap
gphoto2 fails to cross build from source, because it uses the build architecture pkg-config when the host architecture one is needed. The cause is on the GP_PKG_CONFIG macro, which fails to consider $ac_tool_prefix. The upstream macro PKG_PROG_PKG_CONFIG does a better job at solving the same problem and simply replacing the failing macro fixes the cross build. Please consider applying the attached patch after stretch is released. Helmut
diff --minimal -Nru gphoto2-2.5.11/debian/changelog gphoto2-2.5.11/debian/changelog --- gphoto2-2.5.11/debian/changelog 2016-11-23 14:10:38.000000000 +0100 +++ gphoto2-2.5.11/debian/changelog 2017-03-18 10:11:58.000000000 +0100 @@ -1,3 +1,10 @@ +gphoto2 (2.5.11-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: cross.patch (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Sat, 18 Mar 2017 10:11:58 +0100 + gphoto2 (2.5.11-1) unstable; urgency=medium * New upstream release. diff --minimal -Nru gphoto2-2.5.11/debian/control gphoto2-2.5.11/debian/control --- gphoto2-2.5.11/debian/control 2016-11-05 17:48:16.000000000 +0100 +++ gphoto2-2.5.11/debian/control 2017-03-18 10:06:31.000000000 +0100 @@ -4,8 +4,8 @@ Maintainer: Debian PhotoTools Maintainers <pkg-phototools-devel@lists.alioth.debian.org> Uploaders: Herbert Parentes Fortes Neto <h...@debian.org> Build-Depends: - autotools-dev, debhelper (>= 9), + dh-autoreconf, libaa1-dev, libcdk5-dev, libexif-dev (>= 0.5.9), diff --minimal -Nru gphoto2-2.5.11/debian/patches/cross.patch gphoto2-2.5.11/debian/patches/cross.patch --- gphoto2-2.5.11/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ gphoto2-2.5.11/debian/patches/cross.patch 2017-03-18 10:11:53.000000000 +0100 @@ -0,0 +1,77 @@ +From: Helmut Grohne <hel...@subdivi.de> +Subject: fix cross compilation + +Replace broken macro GP_PKG_CONFIG with upstream macro PKG_PROG_PKG_CONFIG. + +Index: gphoto2-2.5.11/gphoto-m4/gp-check-library.m4 +=================================================================== +--- gphoto2-2.5.11.orig/gphoto-m4/gp-check-library.m4 ++++ gphoto2-2.5.11/gphoto-m4/gp-check-library.m4 +@@ -106,7 +106,7 @@ + # ---------------------------------------------------------------------- + dnl + AC_REQUIRE([GP_CONFIG_MSG])dnl +-AC_REQUIRE([GP_PKG_CONFIG])dnl ++AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl + AC_REQUIRE([_GP_CHECK_LIBRARY_SOEXT])dnl + # Use _CFLAGS and _LIBS given to configure. + # This makes it possible to set these vars in a configure script +Index: gphoto2-2.5.11/gphoto-m4/gp-pkg-config.m4 +=================================================================== +--- gphoto2-2.5.11.orig/gphoto-m4/gp-pkg-config.m4 ++++ /dev/null +@@ -1,42 +0,0 @@ +-dnl @synopsis GP_PKG_CONFIG +-dnl +-dnl If you want to set the PKG_CONFIG_PATH, best do so before +-dnl calling GP_PKG_CONFIG +-AC_DEFUN([GP_PKG_CONFIG],[ +-# +-# [GP_PKG_CONFIG] +-# +-AC_ARG_VAR([PKG_CONFIG],[pkg-config package config utility]) +-export PKG_CONFIG +-AC_ARG_VAR([PKG_CONFIG_PATH],[directory where pkg-config looks for *.pc files]) +-export PKG_CONFIG_PATH +- +-AC_MSG_CHECKING([PKG_CONFIG_PATH]) +-if test "x${PKG_CONFIG_PATH}" = "x"; then +- AC_MSG_RESULT([empty]) +-else +- AC_MSG_RESULT([${PKG_CONFIG_PATH}]) +-fi +- +-dnl AC_REQUIRE([PKG_CHECK_MODULES]) +-AC_PATH_PROG([PKG_CONFIG],[pkg-config],[false]) +-if test "$PKG_CONFIG" = "false"; then +-AC_MSG_ERROR([ +-*** Build requires pkg-config +-*** +-*** Possible solutions: +-*** - set PKG_CONFIG to where your pkg-config is located +-*** - set PATH to include the directory where pkg-config is installed +-*** - get it from http://freedesktop.org/software/pkgconfig/ and install it +-]) +-fi +-])dnl +- +-dnl Please do not remove this: +-dnl filetype: d87b877b-80ec-447c-b042-21ec4a27c6f0 +-dnl I use this to find all the different instances of this file which +-dnl are supposed to be synchronized. +- +-dnl Local Variables: +-dnl mode: autoconf +-dnl End: +Index: gphoto2-2.5.11/configure.ac +=================================================================== +--- gphoto2-2.5.11.orig/configure.ac ++++ gphoto2-2.5.11/configure.ac +@@ -35,7 +35,6 @@ + AM_PROG_LIBTOOL + AC_PROG_INSTALL + AC_SYS_LARGEFILE +-GP_PKG_CONFIG + + GP_CONFIG_MSG([Compiler],[${CC}]) + AC_DEFINE_UNQUOTED([HAVE_CC],"$CC",[The C compiler we're using]) diff --minimal -Nru gphoto2-2.5.11/debian/patches/series gphoto2-2.5.11/debian/patches/series --- gphoto2-2.5.11/debian/patches/series 2016-11-23 14:10:38.000000000 +0100 +++ gphoto2-2.5.11/debian/patches/series 2017-03-18 10:07:20.000000000 +0100 @@ -1,3 +1,4 @@ 00-support_now_timevalue.patch 02-do_not_use_PATH_MAX.patch break_line_manpage.patch +cross.patch diff --minimal -Nru gphoto2-2.5.11/debian/rules gphoto2-2.5.11/debian/rules --- gphoto2-2.5.11/debian/rules 2016-11-23 14:10:38.000000000 +0100 +++ gphoto2-2.5.11/debian/rules 2017-03-18 10:07:14.000000000 +0100 @@ -13,4 +13,4 @@ dh_installchangelogs NEWS %: - dh $@ --with autotools_dev + dh $@ --with autoreconf
_______________________________________________ Pkg-phototools-devel mailing list Pkg-phototools-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-phototools-devel