[Libreoffice-commits] .: 5 commits - android/qa config_host.mk.in configure.in README.cross

Tor Lillqvist tml at kemper.freedesktop.org
Fri Jan 20 03:26:37 PST 2012


 README.cross                      |    2 -
 android/qa/sc/Makefile            |   21 ++++++++++++-
 android/qa/sc/local.properties.in |    2 +
 config_host.mk.in                 |    1 
 configure.in                      |   59 ++++++++++++++++++++++++++++----------
 5 files changed, 67 insertions(+), 18 deletions(-)

New commits:
commit dd013e7a6f68ab144ce2330ca139cd5d5e80e479
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Fri Jan 20 13:20:13 2012 +0200

    Improve Android configury
    
    Add a --with-android-sdk switch, and make that and the
    --with-android-ndk mandatory when building for Android. Automatically
    create a proper android/sc/qa/local.properties file (which points to
    the SDK) for Ant.
    
    Restore the Android ARM code generation related flags that I think we
    want to use (that used to be mentioned in README.cross but were
    accidentally dropped) to the automated setting of CC and CXX.

diff --git a/android/qa/sc/local.properties.in b/android/qa/sc/local.properties.in
new file mode 100644
index 0000000..27c8eb5
--- /dev/null
+++ b/android/qa/sc/local.properties.in
@@ -0,0 +1,2 @@
+# Location of the SDK. This is only used by Ant.
+sdk.dir=@ANDROID_SDK_HOME@
diff --git a/config_host.mk.in b/config_host.mk.in
index 9bd874d..7087cb4 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -12,6 +12,7 @@ export ALIGNOF_SHORT="@ALIGNOF_SHORT@"
 export ALLOC="@ALLOC@"
 export ANCIENT_BISON="@ANCIENT_BISON@"
 export ANDROID_NDK_HOME="@ANDROID_NDK_HOME@"
+export ANDROID_SDK_HOME="@ANDROID_SDK_HOME@"
 export AR="@AR@"
 export AWTLIB='@AWTLIB@'
 export BARCODE_EXTENSION_PACK="@BARCODE_EXTENSION_PACK@"
diff --git a/configure.in b/configure.in
index f9a889e..d3c4864 100644
--- a/configure.in
+++ b/configure.in
@@ -90,25 +90,40 @@ if test -z "$SED"; then
 fi
 
 dnl ===================================================================
-dnl Building with an android-ndk implies a lot of pre-canned defaults
+dnl When building for Android the --with-android-ndk is mandatory
 dnl ===================================================================
 ANDROID_NDK_HOME=
-if test "z$with_android_ndk" != "z"; then
+if test -n "$with_android_ndk"; then
    ANDROID_NDK_HOME=$with_android_ndk
+   # Set up a lot of pre-canned defaults
+   # What if the NDK at some point starts including several toolchains for different
+   # gcc versions (like some 3rd-party improved NDK builds already do)?
+   # Then the use of a wildcard below will break.
    ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/arm-linux*/prebuilt/*/bin`
+
    test -z "$SYSBASE" && SYSBASE=$ANDROID_NDK_HOME/platforms/android-9/arch-arm
    test -z "$AR" && AR=$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-ar
    test -z "$NM" && NM=$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-nm
    test -z "$OBJDUMP" && OBJDUMP=$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-objdump
    test -z "$RANLIB" && RANLIB=$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-ranlib
    test -z "$STRIP" && STRIP=$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-strip
-   test -z "$CC" && CC="$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-gcc --sysroot $ANDROID_NDK_HOME/platforms/android-9/arch-arm  -L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a"
-   test -z "$CXX" && CXX="$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-g++ --sysroot $ANDROID_NDK_HOME/platforms/android-9/arch-arm -I $ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/include -I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include -L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a -fexceptions -frtti"
-#   PATH="$ANDROID_NDK_HOME/:$PATH"
+
+   ANDROIDCFLAGS="-march=armv7-a -mfloat-abi=softfp -mthumb -mfpu=neon -Wl,--fix-cortex-a8 --sysroot $ANDROID_NDK_HOME/platforms/android-9/arch-arm -L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a"
+   test -z "$CC" && CC="$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-gcc $ANDROIDCFLAGS"
+   test -z "$CXX" && CXX="$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-g++ $ANDROIDCFLAGS -I $ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/include -I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include -fexceptions -frtti"
 fi
 AC_SUBST(ANDROID_NDK_HOME)
 
 dnl ===================================================================
+dnl Also --with-android-sdk is mandatory
+dnl ===================================================================
+ANDROID_SDK_HOME=
+if test -n "$with_android_sdk"; then
+   ANDROID_SDK_HOME=$with_android_sdk
+fi
+AC_SUBST(ANDROID_SDK_HOME)
+
+dnl ===================================================================
 dnl The following is a list of supported systems.
 dnl Sequential to keep the logic very simple
 dnl These values may be checked and reset later.
@@ -301,14 +316,22 @@ linux-androideabi*)
     test_unix_quickstarter=no
     _os=Android
 
-    # Make sure env vars pointing to where to find the cross-build
-    # toolchain are set. There aren't really any sensible
-    # guesstimates.
-    for var in CC CXX AR NM OBJDUMP RANLIB STRIP; do
-        if test -z "`eval echo '$'$var`"; then
-            AC_MSG_ERROR([You need to set the $var environment variable in a cross-compilation for Android. See README.cross for an example.])
-        fi
-    done
+    if test -z "$with_android_ndk"; then
+        AC_MSG_ERROR([the --with-android-ndk option is mandatory])
+    fi
+
+    if test -z "$with_android_sdk"; then
+        AC_MSG_ERROR([the --with-android-sdk option is mandatory])
+    fi
+
+    # Verify that the NDK and SDK options are proper
+    if test ! -f "$ANDROID_NDK_HOME/platforms/android-9/arch-arm/usr/lib/libc.a"; then
+        AC_MSG_ERROR([the --with-android-ndk option does not point to an Android NDK])
+    fi
+
+    if test ! -f "$ANDROID_SDK_HOME/platforms/android-14/android.jar"; then
+        AC_MSG_ERROR([the --with-android-sdk option does not point to an Android SDK])
+    fi
 
     BUILD_TYPE="$BUILD_TYPE FONTCONFIG FREETYPE"
     FREETYPE_TARBALL=dbf2caca1d3afd410a29217a9809d397-freetype-2.4.8.tar.bz2
@@ -854,7 +877,12 @@ dnl Optional Packages (--with/without-)
 dnl ===================================================================
 AC_ARG_WITH(android-ndk,
     AS_HELP_STRING([--with-android-ndk],
-        [Specify location of the Android Native Development Kit to use for buildin.]),
+        [Specify location of the Android Native Development Kit. Mandatory when building for Android.]),
+,)
+
+AC_ARG_WITH(android-sdk,
+    AS_HELP_STRING([--with-android-sdk],
+        [Specify location of the Android SDK. Mandatory when building for Android.]),
 ,)
 
 AC_ARG_WITH(gnu-patch,
@@ -2931,6 +2959,7 @@ if test "$cross_compiling" = "yes"; then
     tar cf - \
         bin/repo-list.in \
         build_env.in \
+        android/qa/sc/local.properties.in \
         config.guess \
         config_host.mk.in \
         configure \
@@ -10457,7 +10486,7 @@ else
     echo > set_soenv.last
 fi
 
-AC_CONFIG_FILES([config_host.mk ooo.lst set_soenv bin/repo-list build_env])
+AC_CONFIG_FILES([config_host.mk ooo.lst set_soenv bin/repo-list build_env android/qa/sc/local.properties])
 AC_OUTPUT
 
 # touch the config timestamp file set_soenv.stamp
commit a52146c8eaaea54ded167e20fcae9ad840c4a5cf
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Fri Jan 20 13:18:52 2012 +0200

    Add a stop-start-cycle target to do the adb shell stop & start dance

diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile
index 0e077d3..6c499f8 100644
--- a/android/qa/sc/Makefile
+++ b/android/qa/sc/Makefile
@@ -179,6 +179,12 @@ run_filters_test:
 
 run: run_ucalc run_filters_test
 
+# If you reinstall an app several times, even if you uninstall it
+# between, disk space seems to leak that won't get recycled until you
+# stop and start...
+stop-start-cycle:
+	adb shell stop && adb shell start && sleep 10
+
 clean:
 	ant clean
 	rm -rf assets $(SODEST) $(OBJLOCAL)
commit d0fce05606a80dca91a33526d0524f4a9cc65826
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Fri Jan 20 13:17:55 2012 +0200

    It's scfiltlo, not scfilt

diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile
index b673768..0e077d3 100644
--- a/android/qa/sc/Makefile
+++ b/android/qa/sc/Makefile
@@ -88,7 +88,7 @@ copy-stuff:
 		  saxlo \
 		  sblo \
 		  sclo \
-		  scfilt \
+		  scfiltlo \
 		  sfxlo \
 		  sotlo \
 		  stocservices.uno \
commit 60ad5cc317ca8764602269819ff0dea820f15ae8
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Fri Jan 20 12:26:26 2012 +0200

    Fix my email

diff --git a/README.cross b/README.cross
index 4a74799..31bcbf3 100644
--- a/README.cross
+++ b/README.cross
@@ -2,7 +2,7 @@ Cross-compiling LibreOffice
 ===========================
 
 Notes on cross-compiling LibreOffice, originally written by Tor
-Lillqvist <tlillqvist at novell.com> <tml at iki.fi> in May, 2011, for later
+Lillqvist <tlillqvist at suse.com> <tml at iki.fi> in May, 2011, for later
 history see git log.
 
 My cross-compilation experimentation is going on for four platforms:
commit 804ddf47f7303441155d3b0d48704b6aa9df7526
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Thu Jan 19 18:13:04 2012 +0200

    Add the sc_filters_test unit test

diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile
index 67fa567..b673768 100644
--- a/android/qa/sc/Makefile
+++ b/android/qa/sc/Makefile
@@ -46,7 +46,7 @@ copy-stuff:
 #
 # The tests we run here
 #
-	for F in sc_ucalc; do \
+	for F in sc_ucalc sc_filters_test; do \
 	    $(call COPY,$(WORKDIR)/LinkTarget/CppunitTest/libtest_$${F}.so); \
 	done
 #
@@ -58,6 +58,7 @@ copy-stuff:
 		  bootstrap.uno \
 		  comphelpgcc3 \
 		  configmgr.uno \
+		  fileacc \
 		  fontconfig \
 		  forlo \
 		  foruilo \
@@ -82,9 +83,12 @@ copy-stuff:
 		  localedata_others \
 		  mergedlo \
 		  msfilterlo \
+		  ooxlo \
 		  reg \
 		  saxlo \
 		  sblo \
+		  sclo \
+		  scfilt \
 		  sfxlo \
 		  sotlo \
 		  stocservices.uno \
@@ -163,11 +167,18 @@ install: copy-stuff
 uninstall:
 	adb uninstall $(APP_PACKAGE)
 
-run:
+run_ucalc:
 	echo "STAR_RESOURCEPATH=/assets/bin FONTCONFIG_FILE=$(APP_DATA_PATH)/etc/fonts/fonts.conf $(APP_DATA_PATH)/lib/libtest_sc_ucalc.so --headless --protector libunoexceptionprotector.so unoexceptionprotector '-env:CONFIGURATION_LAYERS=xcsxcu:file:///assets/xml/registry' '-env:UNO_TYPES=file:///assets/bin/udkapi.rdb file:///assets/bin/types.rdb'  '-env:UNO_SERVICES=file:///assets/xml/ure/services.rdb  file:///assets/ComponentTarget/framework/util/fwk.component file:///assets/ComponentTarget/i18npool/util/i18npool.component file:///assets/ComponentTarget/sfx2/util/sfx.component file:///assets/ComponentTarget/unoxml/source/service/unoxml.component file:///assets/ComponentTarget/configmgr/source/configmgr.component file:///assets/ComponentTarget/ucb/source/core/ucb1.component file:///assets/ComponentTarget/ucb/source/ucp/file/ucpfile1.component' -env:URE_INTERNAL_LIB_DIR=file://$(APP_DATA_PATH)/lib -env:LO_LIB_DIR=file://$(APP_DATA_PATH)/lib" >cmdline
 	adb push cmdline $(APP_DATA_PATH)/cmdline
 	adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libcppunittester -e lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline"
 
+run_filters_test:
+	echo "STAR_RESOURCEPATH=/assets/bin FONTCONFIG_FILE=$(APP_DATA_PATH)/etc/fonts/fonts.conf $(APP_DATA_PATH)/lib/libtest_sc_filters_test.so --headless --protector libunoexceptionprotector.so unoexceptionprotector '-env:CONFIGURATION_LAYERS=xcsxcu:file:///assets/xml/registry module:file:///assets/xml/registry/spool' '-env:UNO_TYPES=file:///assets/bin/udkapi.rdb file:///assets/bin/types.rdb'  '-env:UNO_SERVICES=file:///assets/xml/ure/services.rdb  file:///assets/ComponentTarget/framework/util/fwk.component file:///assets/ComponentTarget/i18npool/util/i18npool.component file:///assets/ComponentTarget/sfx2/util/sfx.component file:///assets/ComponentTarget/unoxml/source/service/unoxml.component file:///assets/ComponentTarget/configmgr/source/configmgr.component file:///assets/ComponentTarget/ucb/source/core/ucb1.component file:///assets/ComponentTarget/ucb/source/ucp/file/ucpfile1.component' -env:URE_INTERNAL_LIB_DIR=file://$(APP_DATA_PATH)/lib -env:LO_LIB_DIR=file://$(APP_DATA_PA
 TH)/lib" >cmdline
+	adb push cmdline $(APP_DATA_PATH)/cmdline
+	adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libcppunittester -e lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline"
+
+run: run_ucalc run_filters_test
+
 clean:
 	ant clean
 	rm -rf assets $(SODEST) $(OBJLOCAL)


More information about the Libreoffice-commits mailing list