From e7a70e9dc04b94b47fb7786aab4edfd25132c70f Mon Sep 17 00:00:00 2001 From: lains Date: Tue, 20 Aug 2019 17:06:27 +0200 Subject: Fix: Fix pkgconfig detection, and multiple subsequent build for Android (#833) * Fixing lib detection based on build host for Android builds * Fixing workaround according to jandegr's proposal * Fixing subsequent Android builds (where rename fails because of pre-existing renamed files) --- scripts/build_android.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/build_android.sh b/scripts/build_android.sh index 3f2738451..f30c7d76c 100755 --- a/scripts/build_android.sh +++ b/scripts/build_android.sh @@ -28,25 +28,29 @@ export GRADLE_OPTS='-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryEr sudo apt-get install -y ant echo Run CMake +test -z "$PKG_CONFIG_LIBDIR" && export PKG_CONFIG_LIBDIR="" # Force cmake below to run ignore build host libraries when using pkgconfig. +# Note: If you want to compile against specific target libraries that are searched using pkgconfig, please run this script with variable PKG_CONFIG_LIBDIR set to the appropriate path cmake ./ -Dvehicle/gpsd_dbus:BOOL=FALSE -Dsvg2png_scaling:STRING=-1,24,32,48,64,96,128,192,256 -Dsvg2png_scaling_nav:STRING=-1,24,32,48,64,96,128,192,256 -Dsvg2png_scaling_flag:STRING=-1,24,32,64,96 -DXSL_PROCESSING=y -DXSLTS=android -DANDROID=y || exit 1 echo Process icons pushd navit/icons make || exit 32 +rm -rf ../android/res/drawable-nodpi mkdir ../android/res/drawable-nodpi cp ./*.png ../android/res/drawable-nodpi pushd ../android/res/drawable-nodpi -rename 'y/A-Z/a-z/' ./*.png +rename -f 'y/A-Z/a-z/' ./*.png popd popd echo Process translations pushd po make || exit 64 +rm -rf ../navit/android/res/raw mkdir ../navit/android/res/raw cp ./*.mo ../navit/android/res/raw pushd ../navit/android/res/raw -rename 'y/A-Z/a-z/' ./*.mo +rename -f 'y/A-Z/a-z/' ./*.mo popd popd @@ -55,6 +59,7 @@ popd echo Process xml config files make navit_config_xml || exit 96 pushd navit +rm -rf ./android/assets mkdir -p ./android/assets cp -R config ./android/assets/ popd -- cgit v1.2.1