Source: m17n-lib Version: 1.7.0-3 Tags: patch User: helm...@debian.org Usertags: rebootstrap
m17n-lib fails to cross build from source, because it uses the build architecture pkg-config. That leads to it not finding relevant libraries (which are only requested for the host architecture) and finally symbol differences (adjust_anchor goes missing because otf is not found). The attached patch fixes the remaining pkg-config invocations to use a triplet-prefixed PKG_CONFIG (correctly detected by the PKG_PROG_PKG_CONFIG macro). It also changes configure.ac to prefer pkg-config over libotf-config, because the latter does also uses the build architecture pkg-config. Please consider applying the attached patch. Helmut
diff --minimal -Nru m17n-lib-1.7.0/debian/changelog m17n-lib-1.7.0/debian/changelog --- m17n-lib-1.7.0/debian/changelog +++ m17n-lib-1.7.0/debian/changelog @@ -1,3 +1,10 @@ +m17n-lib (1.7.0-3.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: cross.patch: use triplet-prefixed pkg-config (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Sat, 29 Oct 2016 10:48:13 +0200 + m17n-lib (1.7.0-3) unstable; urgency=low * debian/control: libm17n-dev depends on dpkg-dev diff --minimal -Nru m17n-lib-1.7.0/debian/patches/0003-cross.patch m17n-lib-1.7.0/debian/patches/0003-cross.patch --- m17n-lib-1.7.0/debian/patches/0003-cross.patch +++ m17n-lib-1.7.0/debian/patches/0003-cross.patch @@ -0,0 +1,74 @@ +From: Helmut Grohne <hel...@subdivi.de> +Subject: use triplet-prefixed pkg-config + +Also prefer pkg-config over libotf-config, which is not cross-aware. + +Index: m17n-lib-1.7.0/configure.ac +=================================================================== +--- m17n-lib-1.7.0.orig/configure.ac ++++ m17n-lib-1.7.0/configure.ac +@@ -118,7 +118,7 @@ + + M17N_EXT_LIBS= + +-AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes) ++PKG_PROG_PKG_CONFIG + + if test "x$no_x" != "xyes"; then + AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11.]) +@@ -167,16 +167,15 @@ + if test "x$with_libotf" != "xno"; then + save_CPPFLAGS="$CPPFLAGS" + save_LIBS="$LIBS" +- AC_CHECK_PROG(HAVE_OTFLIB_CONFIG, libotf-config, yes) +- OTF_LD_FLAGS=-lotf +- if test "x$HAVE_OTFLIB_CONFIG" = "xyes"; then +- CPPFLAGS="$CPPFLAGS `libotf-config --cflags`" +- OTF_LD_FLAGS="`libotf-config --libs`" +- LIBS="$LIBS $OTF_LD_FLAGS" +- elif test "x$HAVE_PKG_CONFIG" = "xyes" ; then +- if pkg-config libotf ; then +- CPPFLAGS="$CPPFLAGS `pkg-config --cflags libotf`" +- OTF_LD_FLAGS="`pkg-config --libs libotf`" ++ if test "x$PKG_CONFIG" != x && $PKG_CONFIG libotf; then ++ CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libotf`" ++ OTF_LD_FLAGS="`$PKG_CONFIG --libs libotf`" ++ else ++ AC_CHECK_PROG(HAVE_OTFLIB_CONFIG, libotf-config, yes) ++ if test "x$HAVE_OTFLIB_CONFIG" = "xyes"; then ++ CPPFLAGS="$CPPFLAGS `libotf-config --cflags`" ++ OTF_LD_FLAGS="`libotf-config --libs`" ++ LIBS="$LIBS $OTF_LD_FLAGS" + fi + fi + ## We check the availability of OTF_check_features +@@ -241,10 +240,10 @@ + if test "x$HAVE_XFT_CONFIG" = "xyes"; then + CPPFLAGS="$CPPFLAGS `xft-config --cflags`" + XFT2_LD_FLAGS="`xft-config --libs`" +-elif test "x$HAVE_PKG_CONFIG" = "xyes" ; then +- if pkg-config xft ; then +- CPPFLAGS="$CPPFLAGS `pkg-config --cflags xft`" +- XFT2_LD_FLAGS="`pkg-config --libs xft`" ++elif test "x$PKG_CONFIG" != "x" ; then ++ if $PKG_CONFIG xft ; then ++ CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags xft`" ++ XFT2_LD_FLAGS="`$PKG_CONFIG --libs xft`" + fi + fi + LIBS="$LIBS $XFT2_LD_FLAGS" +@@ -273,10 +272,10 @@ + save_CPPFLAGS="$CPPFLAGS" + save_LIBS="$LIBS" + FONTCONFIG_LD_FLAGS=-lfontconfig +- if test "x$HAVE_PKG_CONFIG" = "xyes"; then +- if pkg-config --exists fontconfig; then +- CPPFLAGS="$CPPFLAGS `pkg-config --cflags fontconfig`" +- FONTCONFIG_LD_FLAGS="`pkg-config --libs fontconfig`" ++ if test "x$PKG_CONFIG" != "x"; then ++ if $PKG_CONFIG --exists fontconfig; then ++ CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags fontconfig`" ++ FONTCONFIG_LD_FLAGS="`$PKG_CONFIG --libs fontconfig`" + LIBS="$LIBS $FONTCONFIG_LD_FLAGS" + fi + fi diff --minimal -Nru m17n-lib-1.7.0/debian/patches/series m17n-lib-1.7.0/debian/patches/series --- m17n-lib-1.7.0/debian/patches/series +++ m17n-lib-1.7.0/debian/patches/series @@ -1,2 +1,3 @@ 0001-m17n-config-remove-libtool-user-switches.patch 0002-m17n-config-modify-to-support-multi-arch.patch +0003-cross.patch