From: Marcus Comstedt Date: Wed, 28 Aug 2013 12:19:44 +0000 (+0200) Subject: sigrok-cross-android: Set PKG_CONFIG_LIBDIR globally X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=226830e4d852609d0a219acadef34efd9f070de1;p=sigrok-util.git sigrok-cross-android: Set PKG_CONFIG_LIBDIR globally PKG_CONFIG_LIBDIR overrides the global directory for .pc files. This way, no globally installed package files for the build system will be picked up. Also, PKG_CONFIG_PATH is unset to prevent any local build system packages from being found. Only the packages built by the script itself should be found. --- diff --git a/cross-compile/android/sigrok-cross-android b/cross-compile/android/sigrok-cross-android index 72da7c8..9622475 100755 --- a/cross-compile/android/sigrok-cross-android +++ b/cross-compile/android/sigrok-cross-android @@ -51,9 +51,12 @@ SF_MIRROR=switch.dl.sourceforge.net # We need to find tools in the toolchain and in the install directory. export PATH=$PREFIX/bin:$TOOLCHAIN/bin:$PATH +# Tell pkg-config to only look for our cross-built stuff +export PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" +export -n PKG_CONFIG_PATH + # Define some helper variables. C="--host=arm-linux-androideabi --prefix=$PREFIX" -P="$PREFIX/lib/pkgconfig" # Remove build directory contents (if any) and create a new build dir. rm -rf $BUILDDIR @@ -130,7 +133,7 @@ unzip -q android.zip cd glib-android ./autogen.sh # Note: Manual LDFLAGS/CPPFLAGS needed for libiconv, rest uses pkg-config. -PKG_CONFIG_PATH=$P LDFLAGS=-L$PREFIX/lib CPPFLAGS=-I$PREFIX/include glib_cv_stack_grows=no glib_cv_uscore=no ac_cv_func_posix_getpwuid_r=no ac_cv_func_posix_getgrgid_r=no ./configure $C --disable-modular-tests +LDFLAGS=-L$PREFIX/lib CPPFLAGS=-I$PREFIX/include glib_cv_stack_grows=no glib_cv_uscore=no ac_cv_func_posix_getpwuid_r=no ac_cv_func_posix_getgrgid_r=no ./configure $C --disable-modular-tests make make install cd .. @@ -173,7 +176,7 @@ cd .. git clone git://sigrok.org/libsigrok cd libsigrok ./autogen.sh -LDFLAGS=-L$PREFIX/lib CPPFLAGS="-I$PREFIX/include -I$PREFIX/lib/libzip/include" PKG_CONFIG_LIBDIR=$PREFIX/lib/pkgconfig ./configure $C --disable-alsa --disable-link-mso19 --disable-kecheng-kc-330b +LDFLAGS=-L$PREFIX/lib CPPFLAGS="-I$PREFIX/include -I$PREFIX/lib/libzip/include" ./configure $C --disable-alsa --disable-link-mso19 --disable-kecheng-kc-330b make make install cd ..