Bug#842441: m17n-lib FTCBFS: uses build architecture pkg-config
Control: tags -1 + pending
Hi Harshula,
On Sat, Nov 27, 2021 at 07:11:46PM +0100, Harshula wrote:
> Is this package still failing to cross-build? Boyuan (CC'd) updated the
> packaging with the 1.8.0 upstream release.
Yes, but it'll be fixed in 10 days when my deferred NMU arrives in
unstable. I've attached the final .debdiff.
Helmut
diff --minimal -Nru m17n-lib-1.8.0/debian/changelog m17n-lib-1.8.0/debian/changelog
--- m17n-lib-1.8.0/debian/changelog 2021-10-12 20:17:41.000000000 +0200
+++ m17n-lib-1.8.0/debian/changelog 2021-11-28 05:58:00.000000000 +0100
@@ -1,3 +1,10 @@
+m17n-lib (1.8.0-3.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: Use the host architecture pkg-config. (Closes: #842441)
+
+ -- Helmut Grohne <helmut@subdivi.de> Sun, 28 Nov 2021 05:58:00 +0100
+
m17n-lib (1.8.0-3) unstable; urgency=medium
* Team upload.
diff --minimal -Nru m17n-lib-1.8.0/debian/patches/0004-cross.patch m17n-lib-1.8.0/debian/patches/0004-cross.patch
--- m17n-lib-1.8.0/debian/patches/0004-cross.patch 1970-01-01 01:00:00.000000000 +0100
+++ m17n-lib-1.8.0/debian/patches/0004-cross.patch 2021-11-28 05:58:00.000000000 +0100
@@ -0,0 +1,74 @@
+From: Helmut Grohne <helmut@subdivi.de>
+Subject: use triplet-prefixed pkg-config
+
+Also prefer pkg-config over libotf-config, which is not cross-aware.
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -119,8 +119,8 @@
+
+ M17N_EXT_LIBS=
+
+-AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
+-AM_CONDITIONAL([HAVE_PKG_CONFIG], [test x$HAVE_PKG_CONFIG = xyes])
++PKG_PROG_PKG_CONFIG
++AM_CONDITIONAL([HAVE_PKG_CONFIG], [test "x$PKG_CONFIG" != x])
+
+ if test "x$no_x" != "xyes"; then
+ AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11.])
+@@ -169,16 +169,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
+@@ -233,10 +232,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"
+@@ -265,10 +264,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.8.0/debian/patches/series m17n-lib-1.8.0/debian/patches/series
--- m17n-lib-1.8.0/debian/patches/series 2021-10-12 20:12:04.000000000 +0200
+++ m17n-lib-1.8.0/debian/patches/series 2021-11-28 05:57:33.000000000 +0100
@@ -1,3 +1,4 @@
0001-m17n-config-remove-libtool-user-switches.patch
0002-m17n-config-modify-to-support-multi-arch.patch
0003-configure.ac-Use-pkg-config-to-detect-libfreetype2.patch
+0004-cross.patch
Reply to: