[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1062792: libmatekbd FTCBFS: hard codes the build architecture pkg-config



Source: libmatekbd
Version: 1.26.1-1
User: debian-cross@lists.debian.org
Usertags: ftcbfs
Tags: patch upstream

libmatekbd fails to cross build from source, because it hard codes the
build architecture pkg-config in libmatekbd/Makefile.am. As a
consequence it silently fails looking up the glib_genmarshal variable in
glib-2.0.pc and fails running it. Running pkg-config beyond the
configure phase is not recommended precisely, because one ends up with
such silent failures that only turn into real failures later. I'm
attaching a patch that moves this invocation into configure.ac where the
right pkg-config is known via the PKG_CONFIG variable and where the
lookup succeeds in native builds as in cross builds. After applying this
patch, libmatekbd cross builds correctly.

Helmut
--- libmatekbd-1.26.1.orig/configure.ac
+++ libmatekbd-1.26.1/configure.ac
@@ -76,6 +76,9 @@
 AC_SUBST(GLIB_LIBS)
 AC_SUBST(GMODULE_LIBS)
 
+GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
+AC_SUBST([GLIB_GENMARSHAL])
+
 PKG_CHECK_MODULES(GIO, gio-2.0 >= $GIO_REQUIRED)
 
 AC_SUBST(GIO_CFLAGS)
--- libmatekbd-1.26.1.orig/libmatekbd/Makefile.am
+++ libmatekbd-1.26.1/libmatekbd/Makefile.am
@@ -103,8 +103,6 @@
 
 DISTCLEANFILES = $(gsettings_SCHEMAS)
 
-GLIB_GENMARSHAL = $(shell pkg-config --variable=glib_genmarshal glib-2.0)
-
 matekbd-indicator-marshal.h: matekbd-indicator-marshal.list
 	$(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=matekbd_indicator $(srcdir)/matekbd-indicator-marshal.list --header > $@
 

Reply to: