From 289ff8956bef29255f848b44c90e850052102fa9 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sat, 3 Feb 2024 10:45:53 +0100 Subject: [PATCH] FTCBFS: hard codes the build architecture pkg-config 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. This change 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. Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1062792 --- configure.ac | 3 +++ libmatekbd/Makefile.am | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index e3d7b73..31e3544 100644 --- a/configure.ac +++ b/configure.ac @@ -76,6 +76,9 @@ AC_SUBST(GLIB_CFLAGS) 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) diff --git a/libmatekbd/Makefile.am b/libmatekbd/Makefile.am index 9adb122..65ec736 100644 --- a/libmatekbd/Makefile.am +++ b/libmatekbd/Makefile.am @@ -103,8 +103,6 @@ EXTRA_DIST = \ 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 > $@