]> code.ossystems Code Review - openembedded-core.git/commitdiff
qemu.inc: Allow optional use of pkg-config from the HOST
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 Jul 2014 13:42:34 +0000 (14:42 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 2 Aug 2014 08:25:33 +0000 (09:25 +0100)
Currently, if pkg-config isn't installed on the build system, this code
can cause an error. We don't need to require this, only use it if its
present so allow the test to fail gracefully.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-devtools/qemu/qemu.inc

index 3cb85363ca035019b240baa119816bc0772b97e0..84330aecb00209cc04668622b6479bdf481172d7 100644 (file)
@@ -35,8 +35,10 @@ export LIBTOOL="${HOST_SYS}-libtool"
 
 do_configure_prepend_class-native() {
        # Append build host pkg-config paths for native target since the host may provide sdl
-       BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config)
-       export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
+       BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "")
+       if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
+               export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
+       fi
 
        # Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed
        sed -i 's/-lX11//g' Makefile.target