android/README                             |   16 ++++++++
 android/lib/src/main/cpp/CMakeLists.txt.in |    4 ++
 configure.ac                               |   53 ++++++++++++++++++++++++-----
 3 files changed, 64 insertions(+), 9 deletions(-)

New commits:
commit 37b3acbdf12364620e42bf41d0f1f4db2bebf967
Author:     Jan Holesovsky <ke...@collabora.com>
AuthorDate: Wed Jul 1 11:10:01 2020 +0200
Commit:     Jan Holesovsky <ke...@collabora.com>
CommitDate: Wed Jul 1 17:10:28 2020 +0200

    android: Add support for x86 ABI too.
    
    Turns out that the ChromeOS uses the x86 Android runtime, not x86-64.
    
    Change-Id: Ic3b6f7a65d35d2298daa731f46e57068eaf2583d
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97607
    Tested-by: Jenkins
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>

diff --git a/android/README b/android/README
index 7223e121e..5cffa4b4f 100644
--- a/android/README
+++ b/android/README
@@ -68,6 +68,22 @@ build the native parts on Windows.
   # install
   
PATH="$PATH":~/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin 
make -j8 ANDROID_ABI=arm64-v8a CC=aarch64-linux-android21-clang 
CXX=aarch64-linux-android21-clang++ SYSLIBS=-static-libstdc++ install 
INSTALLDIR=/opt/poco-android-64bit
 
+* Poco for x86 (if you want to add the support for that into the APK too):
+
+  # checkout the 1.10.1 in yet another location
+  git clone https://github.com/pocoproject/poco poco-android-x86
+  cd poco-android-x86
+  git checkout -b poco-1.10.1 origin/poco-1.10.1
+
+  # configure
+  ./configure --config=Android --no-samples --no-tests 
--omit=Crypto,NetSSL_OpenSSL,Zip,Data,Data/SQLite,Data/ODBC,Data/MySQL,MongoDB,PDF,CppParser,PageCompiler,JWT
+
+  # build
+  
PATH="$PATH":~/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin 
make -j8 ANDROID_ABI=x86 CC=i686-linux-android21-clang 
CXX=i686-linux-android21-clang++ SYSLIBS=-static-libstdc++
+
+  # install
+  
PATH="$PATH":~/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin 
make -j8 ANDROID_ABI=x86 CC=i686-linux-android21-clang 
CXX=i686-linux-android21-clang++ SYSLIBS=-static-libstdc++ install 
INSTALLDIR=/opt/poco-android-x86
+
 * Poco for x86_64 (if you want to add the support for that into the APK too):
 
   # checkout the 1.10.1 in yet another location
diff --git a/android/lib/src/main/cpp/CMakeLists.txt.in 
b/android/lib/src/main/cpp/CMakeLists.txt.in
index 53a3fafd7..2e1a5fdb8 100644
--- a/android/lib/src/main/cpp/CMakeLists.txt.in
+++ b/android/lib/src/main/cpp/CMakeLists.txt.in
@@ -37,6 +37,10 @@ elseif(${ANDROID_ABI} STREQUAL "arm64-v8a")
     set(LOBUILDDIR_ABI @LOBUILDDIR_ARM64_V8A@)
     set(POCOINCLUDE_ABI @POCOINCLUDE_ARM64_V8A@)
     set(POCOLIB_ABI @POCOLIB_ARM64_V8A@)
+elseif(${ANDROID_ABI} STREQUAL "x86")
+    set(LOBUILDDIR_ABI @LOBUILDDIR_X86@)
+    set(POCOINCLUDE_ABI @POCOINCLUDE_X86@)
+    set(POCOLIB_ABI @POCOLIB_X86@)
 elseif(${ANDROID_ABI} STREQUAL "x86_64")
     set(LOBUILDDIR_ABI @LOBUILDDIR_X86_64@)
     set(POCOINCLUDE_ABI @POCOINCLUDE_X86_64@)
diff --git a/configure.ac b/configure.ac
index 7a8177e91..ff78941ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -168,12 +168,14 @@ AC_ARG_WITH(android-package-versioncode,
 
 AC_ARG_WITH(android-abi,
             AS_HELP_STRING([--with-android-abi=x86_64],
-                           [Allows specification of a concrete ABI that is to 
be built for.  By default, builds for all the 3
-                            supported ABIs at the same time: armeabi-v7a, 
arm64-v8a and x86_64.
+                           [Allows specification of a concrete ABI that is to 
be built for, defaults to armeabi-v7a
+                            (when only one build dir is provided in 
--with-lo-builddir) or to all 4 supported ABIs at
+                            the same time (when there are more builddirs 
provided in --with-lo-builddir, separated
+                            by colons).  The supported ABIs are: armeabi-v7a, 
arm64-v8a, x86 and x86_64.
                             Please note that you need to specify the 
parameters for --with-lo-builddir,
-                            --with-poco-includes and --with-poco-libs in the 
order of armeabi-v7a:arm64-v8a:x86_64.  For
-                            example, when you use --with-android-abi=x86_64,
-                            you have to specify 
--with-lo-builddir=::/path/to/x86-64/builddir]),
+                            --with-poco-includes and --with-poco-libs in the 
order of armeabi-v7a:arm64-v8a:x86:x86_64.
+                            For example, when you use 
--with-android-abi=x86_64,
+                            you have to specify 
--with-lo-builddir=:::/path/to/x86-64/builddir]),
 ,)
 
 AC_ARG_WITH([app-name],
@@ -368,12 +370,15 @@ fi
 LOBUILDDIR=
 ANDROID_ABI=
 LOBUILDDIR_ARM64_V8A=
+LOBUILDDIR_X86=
 LOBUILDDIR_X86_64=
 POCOINCLUDE=
 POCOINCLUDE_ARM64_V8A=
+POCOINCLUDE_X86=
 POCOINCLUDE_X86_64=
 POCOLIB=
 POCOLIB_ARM64_V8A=
+POCOLIB_X86=
 POCOLIB_X86_64=
 POCODEBUG=
 CORE_VERSION_HASH=""
@@ -381,7 +386,7 @@ if test \( "$enable_iosapp" = "yes" -a `uname -s` = 
"Darwin" \) -o \( "$enable_a
    if test "$enable_androidapp" = "yes" ; then
       AC_MSG_CHECKING([for Android ABI to build for])
       if test -z "$with_android_abi" ; then
-         ANDROID_ABI="armeabi-v7a arm64-v8a x86_64"
+         ANDROID_ABI="armeabi-v7a arm64-v8a x86 x86_64"
       else
          ANDROID_ABI=`echo $with_android_abi | sed 's/:/ /g'`
       fi
@@ -398,7 +403,8 @@ if test \( "$enable_iosapp" = "yes" -a `uname -s` = 
"Darwin" \) -o \( "$enable_a
       if echo "$LOBUILDDIR" | grep -qs ':' ; then
          LOBUILDDIR=`echo $with_lo_builddir | cut -d: -f1`
          LOBUILDDIR_ARM64_V8A=`echo $with_lo_builddir | cut -d: -f2`
-         LOBUILDDIR_X86_64=`echo $with_lo_builddir | cut -d: -f3`
+         LOBUILDDIR_X86=`echo $with_lo_builddir | cut -d: -f3`
+         LOBUILDDIR_X86_64=`echo $with_lo_builddir | cut -d: -f4`
       fi
    fi
 
@@ -420,6 +426,14 @@ if test \( "$enable_iosapp" = "yes" -a `uname -s` = 
"Darwin" \) -o \( "$enable_a
       fi
    fi
 
+   if test -n "$LOBUILDDIR_X86" ; then
+      if test -f 
"$LOBUILDDIR_X86/workdir/LinkTarget/StaticLibrary/liblibpng.a" ; then
+         AC_MSG_RESULT([$LOBUILDDIR_X86])
+      else
+         AC_MSG_ERROR([This is not a LibreOffice x86 core build directory: 
$LOBUILDDIR_X86])
+      fi
+   fi
+
    if test -n "$LOBUILDDIR_X86_64" ; then
       if test -f 
"$LOBUILDDIR_X86_64/workdir/LinkTarget/StaticLibrary/liblibpng.a" ; then
          AC_MSG_RESULT([$LOBUILDDIR_X86_64])
@@ -438,7 +452,8 @@ if test \( "$enable_iosapp" = "yes" -a `uname -s` = 
"Darwin" \) -o \( "$enable_a
       if echo "$POCOINCLUDE" | grep -qs ':' ; then
          POCOINCLUDE=`echo $with_poco_includes | cut -d: -f1`
          POCOINCLUDE_ARM64_V8A=`echo $with_poco_includes | cut -d: -f2`
-         POCOINCLUDE_X86_64=`echo $with_poco_includes | cut -d: -f3`
+         POCOINCLUDE_X86=`echo $with_poco_includes | cut -d: -f3`
+         POCOINCLUDE_X86_64=`echo $with_poco_includes | cut -d: -f4`
       fi
    fi
 
@@ -457,6 +472,14 @@ if test \( "$enable_iosapp" = "yes" -a `uname -s` = 
"Darwin" \) -o \( "$enable_a
       fi
    fi
 
+   if test -n "$POCOINCLUDE_X86" ; then
+      if test -f "$POCOINCLUDE_X86/Poco/Poco.h"; then
+         AC_MSG_RESULT([$POCOINCLUDE_X86])
+      else
+         AC_MSG_ERROR([This is not a Poco x86 include directory: 
$POCOINCLUDE_X86])
+      fi
+   fi
+
    if test -n "$POCOINCLUDE_X86_64" ; then
       if test -f "$POCOINCLUDE_X86_64/Poco/Poco.h"; then
          AC_MSG_RESULT([$POCOINCLUDE_X86_64])
@@ -475,7 +498,8 @@ if test \( "$enable_iosapp" = "yes" -a `uname -s` = 
"Darwin" \) -o \( "$enable_a
       if echo "$POCOLIB" | grep -qs ':' ; then
          POCOLIB=`echo $with_poco_libs | cut -d: -f1`
          POCOLIB_ARM64_V8A=`echo $with_poco_libs | cut -d: -f2`
-         POCOLIB_X86_64=`echo $with_poco_libs | cut -d: -f3`
+         POCOLIB_X86=`echo $with_poco_libs | cut -d: -f3`
+         POCOLIB_X86_64=`echo $with_poco_libs | cut -d: -f4`
       fi
    fi
 
@@ -494,6 +518,14 @@ if test \( "$enable_iosapp" = "yes" -a `uname -s` = 
"Darwin" \) -o \( "$enable_a
       fi
    fi
 
+   if test -n "$POCOLIB_X86" ; then
+      if test -f "$POCOLIB_X86/libPocoFoundation.a"; then
+         AC_MSG_RESULT([$POCOLIB_X86])
+      else
+         AC_MSG_ERROR([This is not a Poco x86 lib directory: $POCOLIB_X86])
+      fi
+   fi
+
    if test -n "$POCOLIB_X86_64" ; then
       if test -f "$POCOLIB_X86_64/libPocoFoundation.a"; then
          AC_MSG_RESULT([$POCOLIB_X86_64])
@@ -509,12 +541,15 @@ fi
 AC_SUBST(LOBUILDDIR)
 AC_SUBST(ANDROID_ABI)
 AC_SUBST(LOBUILDDIR_ARM64_V8A)
+AC_SUBST(LOBUILDDIR_X86)
 AC_SUBST(LOBUILDDIR_X86_64)
 AC_SUBST(POCOINCLUDE)
 AC_SUBST(POCOINCLUDE_ARM64_V8A)
+AC_SUBST(POCOINCLUDE_X86)
 AC_SUBST(POCOINCLUDE_X86_64)
 AC_SUBST(POCOLIB)
 AC_SUBST(POCOLIB_ARM64_V8A)
+AC_SUBST(POCOLIB_X86)
 AC_SUBST(POCOLIB_X86_64)
 AC_SUBST(POCODEBUG)
 AC_SUBST([CORE_VERSION_HASH])
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to