diff --git a/metadata/org.documentfoundation.libreoffice.txt b/metadata/org.documentfoundation.libreoffice.txt index 70cb03875b..7d500a9500 100644 --- a/metadata/org.documentfoundation.libreoffice.txt +++ b/metadata/org.documentfoundation.libreoffice.txt @@ -157,10 +157,114 @@ Build:5.2.3.1/01ec8f3,11 popd ndk=r10e +Build:6.1.0.0.alpha0+/484d0ea842da,14 + commit=484d0ea842da586a4cf51b6d11683b04f234474c + subdir=android/source + gradle=StrippedUI + srclibs=LOTarballs@e356fc5381dd7aee3ffd47077c7527aa6a6fc0f8 + rm=setup_native/source/packinfo/DS_Store*,oox/qa/unit/data,writerperfect/qa/unit/data/writer/libmwaw/pass/WriterPlus,xmlsecurity/qa/unit/signing/data/random_seed,writerperfect/qa/unit/data/impress/libmwaw/pass/PowerPoint_Mac_2,sw/qa/extras/uiwriter/data/*,sw/qa/extras/ooxmlexport/data/*,sw/qa/extras/rtfexport/data/*,sw/qa/extras/odfimport/data/*,sw/qa/extras/ooxmlimport/data/*,sw/qa/extras/ww8export/data/*,sc/qa/unit/data/*,testtools/source/cliversioning/version_libs/*,qadevOOo/testdocs/qadevlibs/*.jar,chart2/qa/extras/chart2dump/data/*,chart2/qa/extras/data/*,sd/qa/unit/data/*,sw/qa/extras/odfexport/data/* + prebuild=pushd ../../ && \ + sed -i -e 's/\/$(OOO_VENDOR)//g' android/Bootstrap/Makefile.shared && \ + sed -i -e 's/test_fontconfig=yes/test_fontconfig=no/g' configure.ac && \ + sed -i -e 's/test_freetype=yes/test_freetype=no/g' configure.ac && \ + sed -i -e '/debug/d' android/CustomTarget_lo_android.mk && \ + sed -i -e 's/rm /true /g' android/source/Makefile && \ + sed -i -e 's/\.\/gradlew/true/g' android/source/Makefile && \ + sed -i -e '/opencl.openclwrapper.hxx/d' -i -e 's/bOpenCL = .*;$/bOpenCL = false;/' cui/source/dialogs/about.cxx && \ + sed -i -e '/desktop\/source\/app\/opencl/d' desktop/Library_sofficeapp.mk && \ + rm desktop/source/app/opencl.cxx && \ + sed -i '/"horst"/d' javaunohelper/test/com/sun/star/lib/uno/helper/UnoUrlTest.java && \ + sed -i -e 's/^\(\s*\).*debug.*$/\1 true/' android/CustomTarget_lo_android.mk && \ + echo "Typo" && \ + sed -i -e 's/share\/share/share/g' android/source/build.gradle && \ + ./autogen.sh --enable-release-build --with-vendor=F-Droid --with-android-package-name="org.documentfoundation.libreoffice" --enable-fetch-external=no --with-android-ndk=$$NDK$$ --with-android-sdk=$$SDK$$ --with-distro=LibreOfficeAndroidX86 --disable-dconf --with-build-platform-configure-options="--with-system-jpeg=no --with-system-libxml=no --disable-dbus --disable-gconf --disable-python --disable-gui --disable-gtk --disable-gstreamer-1.0" && \ + popd && \ + mkdir -p ../../workdir/UnpackedTarball/owncloud_android_lib/build/outputs/aar && \ + cd $_ && \ + touch owncloud_android_lib-debug.aar owncloud_android_lib-release.aar && \ + cd - && \ + mkdir -p ../../instdir/program/classes/ && \ + cd $_ && \ + touch java_uno.jar juh.jar jurt.jar ridl.jar unoloader.jar unoil.jar && \ + cd - && \ + make liboSettings.gradle versionCode=14 + scanignore=workdir/UnpackedTarball/owncloud_android_lib/build/outputs/aar/owncloud_android_lib-release.aar,workdir/UnpackedTarball/owncloud_android_lib/build/outputs/aar/owncloud_android_lib-debug.aar,icon-themes/tango/res/*.png,icon-themes/galaxy/res/*.png,instdir/program/classes/unoloader.jar,instdir/program/classes/ridl.jar,instdir/program/classes/unoil.jar,instdir/program/classes/jurt.jar,instdir/program/classes/juh.jar,instdir/program/classes/java_uno.jar + build=ln -s $(which gradle) gradlew && \ + pushd ../../ && \ + rm -r workdir && \ + rm -r instdir && \ + ln -s ../android/source/$$LOTarballs$$ external/tarballs && \ + make && \ + popd + ndk=r16 + +Build:6.1.0.0.alpha0+/484d0ea842da,15 + commit=484d0ea842da586a4cf51b6d11683b04f234474c + subdir=android/source + gradle=StrippedUI + srclibs=LOTarballs@e356fc5381dd7aee3ffd47077c7527aa6a6fc0f8 + rm=setup_native/source/packinfo/DS_Store*,oox/qa/unit/data,writerperfect/qa/unit/data/writer/libmwaw/pass/WriterPlus,xmlsecurity/qa/unit/signing/data/random_seed,writerperfect/qa/unit/data/impress/libmwaw/pass/PowerPoint_Mac_2,sw/qa/extras/uiwriter/data/*,sw/qa/extras/ooxmlexport/data/*,sw/qa/extras/rtfexport/data/*,sw/qa/extras/odfimport/data/*,sw/qa/extras/ooxmlimport/data/*,sw/qa/extras/ww8export/data/*,sc/qa/unit/data/*,testtools/source/cliversioning/version_libs/*,qadevOOo/testdocs/qadevlibs/*.jar,chart2/qa/extras/chart2dump/data/*,chart2/qa/extras/data/*,sd/qa/unit/data/*,sw/qa/extras/odfexport/data/* + prebuild=pushd ../../ && \ + sed -i -e 's/\/$(OOO_VENDOR)//g' android/Bootstrap/Makefile.shared && \ + sed -i -e 's/test_fontconfig=yes/test_fontconfig=no/g' configure.ac && \ + sed -i -e 's/test_freetype=yes/test_freetype=no/g' configure.ac && \ + sed -i -e '/debug/d' android/CustomTarget_lo_android.mk && \ + sed -i -e 's/rm /true /g' android/source/Makefile && \ + sed -i -e 's/\.\/gradlew/true/g' android/source/Makefile && \ + sed -i -e '/opencl.openclwrapper.hxx/d' -i -e 's/bOpenCL = .*;$/bOpenCL = false;/' cui/source/dialogs/about.cxx && \ + sed -i -e '/desktop\/source\/app\/opencl/d' desktop/Library_sofficeapp.mk && \ + rm desktop/source/app/opencl.cxx && \ + sed -i '/"horst"/d' javaunohelper/test/com/sun/star/lib/uno/helper/UnoUrlTest.java && \ + sed -i -e 's/^\(\s*\).*debug.*$/\1 true/' android/CustomTarget_lo_android.mk && \ + echo "Typo" && \ + sed -i -e 's/share\/share/share/g' android/source/build.gradle && \ + ./autogen.sh --enable-release-build --with-vendor=F-Droid --with-android-package-name="org.documentfoundation.libreoffice" --enable-fetch-external=no --with-android-ndk=$$NDK$$ --with-android-sdk=$$SDK$$ --with-distro=LibreOfficeAndroid --disable-dconf --with-build-platform-configure-options="--with-system-jpeg=no --with-system-libxml=no --disable-dbus --disable-gconf --disable-python --disable-gui --disable-gtk --disable-gstreamer-1.0" && \ + popd && \ + mkdir -p ../../workdir/UnpackedTarball/owncloud_android_lib/build/outputs/aar && \ + cd $_ && \ + touch owncloud_android_lib-debug.aar owncloud_android_lib-release.aar && \ + cd - && \ + mkdir -p ../../instdir/program/classes/ && \ + cd $_ && \ + touch java_uno.jar juh.jar jurt.jar ridl.jar unoloader.jar unoil.jar && \ + cd - && \ + make liboSettings.gradle versionCode=15 + scanignore=workdir/UnpackedTarball/owncloud_android_lib/build/outputs/aar/owncloud_android_lib-release.aar,workdir/UnpackedTarball/owncloud_android_lib/build/outputs/aar/owncloud_android_lib-debug.aar,icon-themes/tango/res/*.png,icon-themes/galaxy/res/*.png,instdir/program/classes/unoloader.jar,instdir/program/classes/ridl.jar,instdir/program/classes/unoil.jar,instdir/program/classes/jurt.jar,instdir/program/classes/juh.jar,instdir/program/classes/java_uno.jar + build=ln -s $(which gradle) gradlew && \ + pushd ../../ && \ + rm -r workdir && \ + rm -r instdir && \ + ln -s ../android/source/$$LOTarballs$$ external/tarballs && \ + make && \ + popd + ndk=r16 + Maintainer Notes: -To fix crashes on Tegra2 device, we might need to `sed -i -e 's/mfpu=neon/mfpu=vfpv3-d16/g' configure.ac`, -but this might have consequences for other devices. Since we use our own versioncodes, maybe have a third -flavor? +To fix crashes on Tegra2 device, we might need to `sed -i -e 's/mfpu=neon/mfpu=vfpv3-d16/g' configure.ac`, but this might have consequences for other devices. Since we use our own versioncodes, maybe have a third flavor? + +Two flavours of each version: X86 and not X86, hence two builds with different version codes for each underlying libreoffice version. The builds only differ in a command line flag to autogen.sh. + +Compilation success is quite sensitive to the commit used in my experience. It's probably best to check Google Play and note the commit hash used in the version number. Other tagged versions may fail. + +The cd/mkdir/touch commands near the end of the prebuild are to enable fdroid to run the project clean command, which expects these dependencies. + +The last line sets the version code. Make sure this is correct (i.e. matches what Google Play says). The version needs to be in the format a.b.c.d/. Crucially, without the right portion of the commit hash, it will fail at the end of the build with "unexpected version/version code". + +In the build section, the first thing done is creating a gradlew symlink for the android/source directory. This is because makefiles generated elsewhere during the build for the owncloud external use the android/source/gradlew as the build tool for owncloud. Then the touch-ed files from the prebuild are removed before making the libreoffice core. + +Some build scripts use python2 -- make sure your system does as default. + +The libreoffice build scripts spit out warning about the NDK version, so keep an eye out to make sure you have the right one. It's usually pretty recent. + +LOTarballs: first compile with --enable-fetch-external=yes and remove the line from the build commands that links workdir/external to LOTarballs. After the build succeeds look in external/tarballs and see which archives have a new version or commit hash. For any that have changed, first check they do not contain precompiled code (if so remove it), then copy them to a clone of the LOTarballs respository. The following find command may be useful for spotting binaries: + +find -type f -not -empty -exec sh -c "file -i '{}' | grep -q 'charset=binary'" \; -print + +Though you may want to filter png, jpg, gif, &c. and ignore empty files. + +Files in external/tarballs but not already in LOTarballs may not be needed. Try without them first. + +Once the right contents of LOTarballs has been figured out, don't forget to set --enable-fetch-external=no and add back the symlink command to LOTarballs (and update the LOTarballs commit hash to the new one). . Archive Policy:4 versions diff --git a/srclibs/LOTarballs.txt b/srclibs/LOTarballs.txt index 09dbf68d32..0187344e66 100644 --- a/srclibs/LOTarballs.txt +++ b/srclibs/LOTarballs.txt @@ -1,2 +1,2 @@ Repo Type:git -Repo:https://gitlab.com/est/LOTarballs.git +Repo:https://gitlab.com/Hague/LOTarballs.git