Update to osmand 3.0.4

This also include a fix to Persian fonts, with a patched srclib for icu.
Fixes #1254.

Also adjusted build to ensure OsmAnd binary snapshots not downloaded.

Added sha256sum checks to external source tarball downloads in
core-legacy.  Moved external skia github fetch to osmand-external-skia
srclib.
master
Matthew Hague 2018-06-30 15:21:10 +01:00 committed by Marcus Hoffmann
parent 3b05adc5e4
commit ed519c6856
No known key found for this signature in database
GPG Key ID: ACDF63BC43D5E530
3 changed files with 88 additions and 5 deletions

View File

@ -476,6 +476,66 @@ Build:3.0.3,303
popd
ndk=r11c
Build:3.0.4,304
commit=a7d4e54d09e6e366686beac50a40f06b92443a40
subdir=android/OsmAnd
submodules=yes
sudo=apt-get update && \
apt-get install --yes -t jessie-backports swig
gradle=full,legacy,fat
srclibs=icu50-2-1-patched@0d825a9779eeb8ee35977ddf8bb4bea4119bf638,osmand-external-skia@chromium-41.0.2272.118
rm=android/OsmAnd-java/libs/*.jar,android/OsmAnd-java/test/libs/*.jar,android/OsmAnd/ant-lib/*.jar,android/OsmAnd/libs/*.jar,android/OsmAndCore-sample
prebuild=sed -i -e "/.*OsmAndCore.*SNAPSHOT.*/d" ../OsmAnd/build.gradle && \
sed -i -e "/ivy {/,+6d" ../OsmAnd/build.gradle && \
sed -i -e '/qt.*Compile/d' -e '/com.google.firebase/d' build.gradle ../plugins/Osmand-ParkingPlugin/build.gradle ../plugins/Osmand-SRTMPlugin/build.gradle ../plugins/Osmand-Skimaps/build.gradle ../plugins/Osmand-Nautical/build.gradle && \
sed -i -e "s/System.getenv(\"APK_VERSION\")/\"$$VERSION$$\"/g" build.gradle && \
sed -i -e "s/System.getenv(\"APK_NUMBER_VERSION\")/\"$$VERCODE$$\"/g" build.gradle && \
sed -i -e "s/System.getenv(\"APP_FEATURES\")/\"+play_market +gps_status -parking_plugin -blackberry -amazon -route_nav\"/g" build.gradle && \
sed -i -e "s/System.getenv(\"APP_NAME\")/\"OsmAnd~\"/g" build.gradle && \
sed -i -e "s/System.getenv(\"TARGET_APP_NAME\")/\"OsmAnd~\"/g" build.gradle && \
sed -i -e '/com.android.vending.BILLING/d' AndroidManifest.xml && \
sed -i -e '/javaMaxHeapSize/s/4g/1536m/g' build.gradle && \
sed -i -e "s/compile fileTree.*/ compile fileTree(include: ['icu4j.jar'], dir: 'libs')\n compile 'commons-logging:commons-logging:1.1.1'\n compile group: 'net.sf.trove4j', name: 'trove4j', version: '3.0.3'\n compile 'org.json:json:20090211'\n compile 'it.unibo.alice.tuprolog:tuprolog:3.2.1'\n compile 'net.sf.kxml:kxml2:2.3.0'\n compile 'org.beanshell:bsh-core:2.0b4'\n compile 'fr.univ-valenciennes:bzip2:1.0'\n compile 'com.moparisthebest:junidecode:0.1.1'\n compile 'com.vividsolutions:jts-core:1.14.0'/" ../OsmAnd-java/build.gradle && \
sed -i -e "s/implementation fileTree.*/implementation fileTree(include: ['classes.jar','icu4j.jar'], dir: 'libs')\n implementation group: 'net.sf.trove4j', name: 'trove4j', version: '3.0.3'\n/" build.gradle && \
sed -i -e "s/, ':OsmAndCore-sample'//" ../settings.gradle && \
pushd ../../core-legacy/externals && \
sed -i "s/# Extract/sha256sum \$SRCLOC\/upstream.tar.gz | grep 823705472f816df21c8f6aa026dd162b280806838bb55b3432b0fb1fcca7eb86 || { echo 'Failed checksum' 1>\&2; exit; }/" expat/configure.sh && \
sed -i "s/# Extract/sha256sum \$SRCLOC\/upstream.tar.bz2 | grep 0c8e242c33c45928de560d7d595db06feb41d1b22167e37260ceabe72f9e992f || { echo 'Failed checksum' 1>\&2; exit; }/" freetype/configure.sh && \
sed -i "s/# Extract/sha256sum \$SRCLOC\/upstream.tar.bz2 | grep f6c9dea12e41d00e253f7465d714d09248a8bcbed3415c25fd9ce50a1cdded6 || { echo 'Failed checksum' 1>\&2; exit; }/" giflib/configure.sh && \
sed -i "s/# Extract/sha256sum \$SRCLOC\/upstream.tar.gz | grep 00029b1473f0f0ea72fbca3230e8cb25797fbb27e58ae2e46bb8bf5a806fe0b3 || { echo 'Failed checksum' 1>\&2; exit; }/" jpeg/configure.sh && \
sed -i "s/# Extract/sha256sum \$SRCLOC\/upstream.tar.bz2 | grep 6e761e584e5d72d72fc80923e7851a468bf86538456e304aea401b99038ca92 || { echo 'Failed checksum' 1>\&2; exit; }/" libpng/configure.sh && \
sed -i "s/# Extract/sha256sum \$SRCLOC\/upstream.tar.bz2 | grep 13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 || { echo 'Failed checksum' 1>\&2; exit; }/" protobuf/configure.sh && \
sed -i "s/# Extract/sha256sum \$SRCLOC\/upstream.tar.bz2 | grep 9e2e9658dfb036900da6ea0267a737fa3c4eee6666776d378c79d52e9334934 || { echo 'Failed checksum' 1>\&2; exit; }/" zlib/configure.sh && \
sed -i "/# Download/,+8d" skia/configure.sh && \
sed -i "s/# Patch/cp -r $(echo $$osmand-external-skia$$ | sed 's/\//\\\//g') \$SRCLOC\/upstream.original/" skia/configure.sh && \
popd
scanignore=help/website/help/map-legend_nautical.png,help/website/help/map-legend_default.png,help/website/images/dvr/4p-en.png,help/website/images/blog/ios-2-0/con-scrn-1.png,help/website/images/blog/ios-2-0/con-scrn-2.png,help/website/images/blog/ios-2-0/interf-2.png,help/website/images/blog/ios-2-0/navigat-6.png,android/OsmAnd/assets/fonts/RobotoSlab-Regular.ttf
build=pushd ../../OsmAnd-core/wrappers/android/ && \
sed -i -e "/Native/d" settings.gradle && \
sed -i -e "/Native/d" build.gradle && \
sed -i -e "/compileTask.*copyNdkSharedLibs/d" build.gradle && \
sed -i -e "/compileTask.*copyQtSharedLibs/d" build.gradle && \
sed -i -e "/compileTask.*copyQtJarLibs/d" build.gradle && \
gradle210 assembleRelease && \
cd build/outputs/aar && \
unzip OsmAndCore_android-release.aar && \
cp classes.jar ../../../../../../android/OsmAnd/libs/ && \
popd && \
pushd $$icu50-2-1-patched$$/icu4j && \
ant jar && \
zip -d icu4j.jar "com/ibm/icu/impl/data/icudt50b/brkitr/*" && \
zip -d icu4j.jar "com/ibm/icu/impl/data/icudt50b/coll/*" && \
zip -d icu4j.jar "com/ibm/icu/impl/data/icudt50b/curr/*" && \
zip -d icu4j.jar "com/ibm/icu/impl/data/icudt50b/lang/*" && \
zip -d icu4j.jar "com/ibm/icu/impl/data/icudt50b/rbnf/*" && \
zip -d icu4j.jar "com/ibm/icu/impl/data/icudt50b/region/*" && \
zip -d icu4j.jar "com/ibm/icu/impl/data/icudt50b/translit/*" && \
zip -d icu4j.jar "com/ibm/icu/impl/data/icudt50b/zone/*" && \
popd && \
cp $$icu50-2-1-patched$$/icu4j/icu4j.jar libs/ && \
cp $$icu50-2-1-patched$$/icu4j/icu4j.jar ../OsmAnd-java/libs/
ndk=r11c
Maintainer Notes:
Update CV only after sucessfully built and tested.
@ -496,7 +556,8 @@ android/OsmAnd submodule as libs/classes.jar.
A couple of rogue pngs are scan-ignored.
In the prebuild, the very first sed command prevents gradle downloading
OsmAndCore_android.*SNAPSHOT.jar, which contains the files built above.
OsmAndCore*SNAPSHOT.(j|a)ar, which contains the files built above. To
be extra sure the next command removes the osmand ivy repository.
Many other jar files are distributed, prebuilt, with the OsmAnd submodules.
The rm= command removes all of these, and replacements are sought through
@ -507,17 +568,35 @@ Replacement of jar files in OsmAnd-java where versions did not match:
commons-logging-1.1.1.jar replaced with commons-logging:commons-logging:1.1.1
gnu-trove-osmand.jar replaced with net.sf.trove4j:trove4j:3.0.3
tuprolog.jar replaced with it.unibo.alice.tuprolog:tuprolog:3.2.1
icu4j-49_1_patched.jar replaced with compile 'com.ibm.icu:icu4j:50.1' in the hope that whatever patch was applied appears also in 50.1.
bzip2-20090327.jar replaced with compile 'fr.univ-valenciennes:bzip2:1.0'
junidecode-0.1.jar replaced with compile 'com.moparisthebest:junidecode:0.1.1'
simple-logging.jar not replaced (subset of commons-logging-1.1.1.jar)
The final sed command removes OsmAndCore-sample from the settings to prevent
icu4j-49_1_patched.jar was replaced with the icu50-2-1 srclib which is a
mirror of the nearest icu version i could find with the patch applied
(http://bugs.icu-project.org/trac/ticket/12021). The end of the build
process compiles this library and removes a bunch of unwanted data
files.
The prebuild finishes in the core-legacy/externals directory. Just before this
there is a sed command removes OsmAndCore-sample from the settings to prevent
its build (which also downloads prebuilt binaries). OsmAndCore-sample is demo
code that is not needed.
In core-legacy/externals the build fetches in source tarballs from external
sources. Checksums for these need to be verified but are not. Hence the lines
that fallow add sha256sum checks to the build scripts where tarballs are
downloaded. As part of this, the skia library, which was fetched from a git
repo, has been made a srclib. Note, we have to adjust the build script here
because if we link to the srclib before building, it will be deleted (see
skia/configure.sh). (Note, have to be careful with paths, because the scripts
are run from the android/OsmAnd directory, with $SRCLOC being the location of
the configure script.)
For all externals, check that the added checksums cover all, and that the skia version hasn't changed (it can be found in skia/configure.sh before the sed commands are applied).
.
Auto Update Mode:None
Update Check Mode:None
Current Version:3.0.3
Current Version Code:303
Current Version:3.0.4
Current Version Code:304

View File

@ -0,0 +1,2 @@
Repo Type:git
Repo:https://gitlab.com/Hague/icu-release-50-2-1-patched-mirror.git

View File

@ -0,0 +1,2 @@
Repo Type:git
Repo:https://github.com/osmandapp/OsmAnd-external-skia.git