diff --git a/Build_android/boost-for-android-x86.patch b/Build_android/boost-for-android-x86.patch index 663c7befc1..d095d7b188 100644 --- a/Build_android/boost-for-android-x86.patch +++ b/Build_android/boost-for-android-x86.patch @@ -20,21 +20,19 @@ index 40453f7..7ffc050 100755 ;; *) echo "Undefined or not supported Android NDK version!" -@@ -392,6 +397,7 @@ echo "Building boost for android" +@@ -392,6 +397,6 @@ echo "Building boost for android" export PATH=$AndroidBinariesPath:$PATH export AndroidNDKRoot export NO_BZIP2=1 -+ export ICONV_PATH="`pwd`/../../libiconv/x86" cxxflags="" for flag in $CXXFLAGS; do cxxflags="$cxxflags cxxflags=$flag"; done -@@ -404,8 +410,12 @@ echo "Building boost for android" +@@ -404,8 +409,11 @@ echo "Building boost for android" threading=multi \ --layout=versioned \ --prefix="./../$BUILD_DIR/" \ + boost.locale.posix=off \ + boost.locale.std=on \ -+ boost.locale.iconv=on \ + boost.locale.icu=off \ $LIBRARIES \ - install 2>&1 \ @@ -98,7 +96,7 @@ index 666d4c8..762753e 100644 +--sysroot=$(AndroidNDKRoot)/platforms/android-9/arch-x86 # @Moss - Above are the 'oficial' android flags -arm -+#i686 ++i686 -fvisibility=hidden -fvisibility-inlines-hidden -fdata-sections diff --git a/Build_android/boost-for-android.patch b/Build_android/boost-for-android.patch index 4ed156f551..4f19d4a0c6 100644 --- a/Build_android/boost-for-android.patch +++ b/Build_android/boost-for-android.patch @@ -20,21 +20,19 @@ index 40453f7..ad78ddf 100755 ;; *) echo "Undefined or not supported Android NDK version!" -@@ -392,6 +397,7 @@ echo "Building boost for android" +@@ -392,6 +397,6 @@ echo "Building boost for android" export PATH=$AndroidBinariesPath:$PATH export AndroidNDKRoot export NO_BZIP2=1 -+ export ICONV_PATH="`pwd`/../../libiconv/armeabi-v7a" cxxflags="" for flag in $CXXFLAGS; do cxxflags="$cxxflags cxxflags=$flag"; done -@@ -404,8 +410,12 @@ echo "Building boost for android" +@@ -404,8 +409,11 @@ echo "Building boost for android" threading=multi \ --layout=versioned \ --prefix="./../$BUILD_DIR/" \ + boost.locale.posix=off \ + boost.locale.std=on \ -+ boost.locale.iconv=on \ + boost.locale.icu=off \ $LIBRARIES \ - install 2>&1 \ diff --git a/Build_android/configure.sh b/Build_android/configure.sh index 47e7d65897..530e981268 100755 --- a/Build_android/configure.sh +++ b/Build_android/configure.sh @@ -34,17 +34,15 @@ set -e # Parse args # ----------------- -DO_LIBICONV=1 DO_BOOST=1 DO_OPENSSL=1 DO_CPPRESTSDK=1 function usage { - echo "Usage: $0 [--skip-boost] [--skip-openssl] [--skip-libiconv] [--skip-cpprestsdk] [-h] [--ndk ]" + echo "Usage: $0 [--skip-boost] [--skip-openssl] [--skip-cpprestsdk] [-h] [--ndk ]" echo "" echo " --skip-boost Skip fetching and compiling boost" echo " --skip-openssl Skip fetching and compiling openssl" - echo " --skip-libiconv Skip fetching and compiling libiconv" echo " --skip-cpprestsdk Skip compiling cpprestsdk" echo " -h,--help,-? Display this information" echo " --ndk If specified, overrides the ANDROID_NDK environment variable" @@ -59,9 +57,6 @@ do "--skip-openssl") DO_OPENSSL=0 ;; - "--skip-libiconv") - DO_LIBICONV=0 - ;; "--skip-cpprestsdk") DO_CPPRESTSDK=0 ;; @@ -131,40 +126,6 @@ then ) fi -# -------- -# libiconv -# -------- - -# This steps are based on the blog post -# http://danilogiulianelli.blogspot.com/2012/12/how-to-cross-compile-libiconv-for.html -if [ "${DO_LIBICONV}" == "1" ] -then -( - if [ ! -e "libiconv-1.13.1.tar.gz" ] - then - wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz - fi - rm -rf libiconv - mkdir libiconv - cd libiconv - tar xzf ../libiconv-1.13.1.tar.gz - patch -b -p0 < "$DIR/libiconv/libiconv.patch" - cd libiconv-1.13.1 - ./configure - cp -r "$DIR/libiconv/jni" .. - cd ../jni - "${NDK_DIR}/ndk-build" || exit 1 - cd .. - mkdir -p armeabi-v7a/include - mkdir -p armeabi-v7a/lib - mkdir -p x86/include - mkdir -p x86/lib - cp libiconv-1.13.1/include/iconv.h armeabi-v7a/include/ - cp libiconv-1.13.1/include/iconv.h x86/include/ - cp obj/local/x86/libiconv.a x86/lib/ - cp obj/local/armeabi-v7a/libiconv.a armeabi-v7a/lib/ -) -fi # ----- # Boost @@ -187,7 +148,7 @@ then git apply "$DIR/boost-for-android.patch" touch cpprestsdk.patched.stamp fi - PATH="$PATH:$NDK_DIR" ./build-android.sh --boost=1.55.0 --with-libraries=locale,random,date_time,filesystem,system,thread,chrono "${NDK_DIR}" || exit 1 + PATH="$PATH:$NDK_DIR" ./build-android.sh --boost=1.55.0 --with-libraries=atomic,locale,random,date_time,filesystem,system,thread,chrono "${NDK_DIR}" || exit 1 ) ( @@ -204,7 +165,7 @@ then ln -s ../Boost-for-Android/boost_1_55_0.tar.bz2 . touch cpprestsdk.patched.stamp fi - PATH="$PATH:$NDK_DIR" ./build-android.sh --boost=1.55.0 --with-libraries=locale,random,date_time,filesystem,system,thread,chrono "${NDK_DIR}" || exit 1 + PATH="$PATH:$NDK_DIR" ./build-android.sh --boost=1.55.0 --with-libraries=atomic,locale,random,date_time,filesystem,system,thread,chrono "${NDK_DIR}" || exit 1 ) ) fi