From f23a7583e1c6d53554f50ca4223ebec39038a15d Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 16 Mar 2011 12:27:22 +0000 Subject: [PATCH] mingw-fetch-dependencies.sh: Add a wrapper for pkg-config On a Fedora system (and maybe others) there is a wrapper script called i686-pc-mingw32-pkg-config. This script unsets the PKG_CONFIG_PATH variable and then sets the PKG_CONFIG_LIBDIR variable so that it won't pick up the native system .pc files. This breaks cross compiling in mingw-fetch-dependencies.sh because it ends up removing its attempts to set a local search path. To fix this, the mingw-fetch-dependencies script now generates its own wrapper script which instead sets PKG_CONFIG_LIBDIR to the local clutter-cross prefix and then runs the original pkg-config program from the search path. This should have the same benefit of preventing it from finding native system .pc files on systems that don't provide a cross pkg-config. The cross compiling for json-glib and the recommend args to pass to configure when building clutter are updated to set the PKG_CONFIG varible to point to this wrapper script. --- build/mingw/mingw-fetch-dependencies.sh | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/build/mingw/mingw-fetch-dependencies.sh b/build/mingw/mingw-fetch-dependencies.sh index 276f97a..66d2f03 100755 --- a/build/mingw/mingw-fetch-dependencies.sh +++ b/build/mingw/mingw-fetch-dependencies.sh @@ -184,7 +184,7 @@ function do_cross_compile () local builddir="$BUILD_DIR/$dep"; cd "$builddir" - ./configure --prefix="$ROOT_DIR" --host="$TARGET" --target="$TARGET" --build="`./config.guess`" CFLAGS="-mms-bitfields" PKG_CONFIG_PATH="$ROOT_DIR/lib/pkgconfig" + ./configure --prefix="$ROOT_DIR" --host="$TARGET" --target="$TARGET" --build="`./config.guess`" CFLAGS="-mms-bitfields" PKG_CONFIG="$RUN_PKG_CONFIG"; if [ "$?" -ne 0 ]; then echo "Failed to configure $dep"; @@ -312,6 +312,26 @@ for header in "${GL_HEADERS[@]}"; do fi; done; +RUN_PKG_CONFIG="$BUILD_DIR/run-pkg-config.sh"; + +echo "Generating $BUILD_DIR/run-pkg-config.sh"; + +cat > "$RUN_PKG_CONFIG" <