Bug#960291: dhcpcd-dbus FTCBFS: uses the build architecture pkg-config
Source: dhcpcd-dbus
Version: 0.6.0-3
Tags: patch upstream
User: debian-cross@lists.debian.org
Usertags: ftcbfs
dhcpcd-dbus fails to cross build from source, because the upstream
configure script hard codes the build architecture pkg-config. The
attached patch implements a detection method similar to the detection
method for the C compiler and makes dhcpcd-dbus cross buildable. Please
consider applying the patch.
Helmut
--- dhcpcd-dbus-0.6.0.orig/configure
+++ dhcpcd-dbus-0.6.0/configure
@@ -166,6 +166,24 @@
fi
echo "CC= $CC" >>$CONFIG_MK
+if [ -z "$PKG_CONFIG" ]; then
+ printf "Looking for pkg-config ... "
+ for b in "$TARGET-" ""; do
+ if type "${b}pkg-config" >/dev/null 2>&1; then
+ PKG_CONFIG="${b}pkg-config"
+ echo "$PKG_CONFIG"
+ break
+ fi
+ done
+ if [ -z "$PKG_CONFIG" ]; then
+ echo
+ echo "no suitable pkg-config found - aborting" >&2
+ exit 1
+ fi
+else
+ echo "Using pkg-config $PKG_CONFIG"
+fi
+
if [ -n "$CFLAGS" ]; then
echo "CFLAGS= $CFLAGS" >>$CONFIG_MK
fi
@@ -228,8 +246,8 @@
fi
# Get DBus CFLAGS
-DBUS_CFLAGS=$(pkg-config --cflags dbus-1) || exit 1
-DBUS_LIBS=$(pkg-config --libs dbus-1) || exit 1
+DBUS_CFLAGS=$($PKG_CONFIG --cflags dbus-1) || exit 1
+DBUS_LIBS=$($PKG_CONFIG --libs dbus-1) || exit 1
echo "DBus CFLAGS=$DBUS_CFLAGS"
echo "DBus LIBS=$DBUS_LIBS"
echo "CPPFLAGS+= $DBUS_CFLAGS" >>config.mk
Reply to: