Source: efibootguard
Version: 0.21-2
Tags: ftbfs upstream
User: [email protected]
Usertags: ftcbfs
Control: affects -1 + src:fwupd-efi

fwupd-efi fails to cross build from source, because it fails locating
gnu-efi using pkg-config. gnu-efi still installs to /usr/lib and that's
not a location pkg-config searches during cross compilation. The
solution here is to move its files to multiarch. Once doing that,
efibootguard fails to build from source, because it hard codes the
assumption that gnu-efi is installed to /usr/lib. I'm attaching a patch
that makes it detect gnu-efi's location from pkg-config. Doing so works
both before and after the move. Please consider applying it. It should
be safe for forwarding upstream as it falls back to the prior logic when
pkg-config does not work.

Helmut
--- efibootguard-0.21.orig/configure.ac
+++ efibootguard-0.21/configure.ac
@@ -72,7 +72,11 @@
 AC_SUBST(GNUEFI_INC_DIR)
 AC_DEFINE_UNQUOTED(GNUEFI_INC_DIR, ["$GNUEFI_INC_DIR"], [The include directory for gnuefi])
 
-efiroot=$(echo $(cd $GNUEFI_SYS_DIR/usr/lib/$($CC -print-multi-os-directory); pwd))
+PKG_PROG_PKG_CONFIG
+efiroot=$($PKG_CONFIG --variable=libdir gnu-efi)
+if test "x$efiroot" = x; then
+	efiroot=$(echo $(cd $GNUEFI_SYS_DIR/usr/lib/$($CC -print-multi-os-directory); pwd))
+fi
 
 AC_ARG_WITH([gnuefi-lib-dir],
 	    AS_HELP_STRING([--with-gnuefi-lib-dir=DIRECTORY],

Reply via email to