From 152da945cf04c4bf0cafabdd52c3084f891e5329 Mon Sep 17 00:00:00 2001 From: Matthew Hague Date: Tue, 29 Aug 2017 23:36:06 +0100 Subject: [PATCH] Update FBReader to 2.5.9 This includes removing non-free OpenDictionary and Lingvo. A patch can be avoided now since most code has been moved to files that can simply be deleted. A few sed commands can remove references to these dictionaries in the remaining code. --- .../org.geometerplus.zlibrary.ui.android.txt | 50 +++++++++++++++---- srclibs/JsonSimple.txt | 4 +- 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/metadata/org.geometerplus.zlibrary.ui.android.txt b/metadata/org.geometerplus.zlibrary.ui.android.txt index 39a923c31b..aa5e6463e3 100644 --- a/metadata/org.geometerplus.zlibrary.ui.android.txt +++ b/metadata/org.geometerplus.zlibrary.ui.android.txt @@ -327,28 +327,60 @@ Build:2.1-ics,2010020 target=android-14 buildjni=yes +Build:2.5.9-ics,2050920 + commit=43e14feedf10ad53ec68bf42b1644f488889381c + srclibs=FBReaderJ@2.5.9,PDFParseLib@36d7479ce85638eb4f0ff9c875ec77680177da5d,ApacheHttpClient@4.2.5,NanoHttpd@Release-2.0.5,JsonSimple@tag_release_1_1_1 + forceversion=yes + rm=libs/*jar,obsolete/lib/*.jar,src/org/geometerplus/android/fbreader/dict/OpenDictionary.java,src/org/geometerplus/android/fbreader/dict/Lingvo.java + extlibs=android/android-support-v4.jar + prebuild=echo -e "sdk.dir=$$SDK$$\nndk.dir=$$NDK$$\n" >> local.properties && \ + cp local.properties third-party/AmbilWarna/ && \ + cp local.properties third-party/android-filechooser/code/ && \ + cp local.properties third-party/drag-sort-listview/library/ && \ + pushd $$ApacheHttpClient$$/httpmime/ && \ + $$MVN3$$ package -Dmaven.javadoc.skip=true && \ + popd && \ + cp $$ApacheHttpClient$$/httpmime/target/httpmime-4.2.5.jar libs/ && \ + pushd $$NanoHttpd$$ && \ + $$MVN3$$ package && \ + popd && \ + cp $$NanoHttpd$$/core/target/nanohttpd-2.0.5.jar libs/ && \ + cp -fR $$JsonSimple$$/src/main/java/org src/ && \ + cp -fR $$PDFParseLib$$/pdfparse-lib/src/main/java/org src/ && \ + rm -fR src/com/paragon && \ + sed -i -e '/com.google.android.gms.version/d' -e '/google_play_services/d' AndroidManifest.xml && \ + sed -i -e '/google.services.lib.dir/d' project.properties && \ + mkdir third-party/drag-sort-listview/library/libs && \ + cp libs/android-support-v4.jar third-party/drag-sort-listview/library/libs/&& sed -i -e '/Lingvo/d' src/org/geometerplus/android/fbreader/dict/DictionaryUtil.java && \ + rm -fR src/org/geometerplus/android/fbreader/network/auth && \ + cp -fR $$FBReaderJ$$/src/org/geometerplus/android/fbreader/network/auth src/org/geometerplus/android/fbreader/network/ && \ + sed -i -e '/^\s*OpenDictionary.collect/d' src/org/geometerplus/android/fbreader/dict/DictionaryUtil.java + update=third-party/AmbilWarna,third-party/android-filechooser/code,third-party/drag-sort-listview/library,. + target=android-21 + buildjni=yes + Maintainer Notes: * LingvoIntegration and OpenDictionary APIs are non-free. Remove jars and patch - depending code. + depending code. Currently done with rm and sed in prebuilds. * %v tags are currently targeting gingerbread, but have ressource conflicts with target=android-9; they build with target=android-14 * %v-ics tags are actually based on the yotaphone branch, so we have to - use raw commits for the ice-cream-sandwich branch -* ics branch uses google play, so we have to sed AM.xml and ant files, as well - as we need src/org/geometerplus/android/fbreader/network/auth from the master - (= gingerbread) branch, which doesn't use play services. + use raw commits for the ice-cream-sandwich branch (look for "Merge + branch 'master' into ice-cream-sandwich" after a commit with "version + => ...") +* ics branch uses google play, so we have to sed AM.xml and ant files. + /fbreader/network/ depends on Google Play Services, so these are + removed and replaced with the master branch which does not depend on + these. * UCM is set to master branch, we don't care for target or device specific releases. TODO: * make gingerbread/master available for android-9! -* can we remove the patch with sed scripts? - -sed -i -e '/MinicardContract/d' src/org/geometerplus/android/fbreader/DictionaryUtil.java . Archive Policy:6 versions Auto Update Mode:None Update Check Mode:Tags ^[0-9.]*$ Current Version:2.5.9 -Current Version Code:2050910 +Current Version Code:2050920 diff --git a/srclibs/JsonSimple.txt b/srclibs/JsonSimple.txt index a5d3076e3b..a7dab19f9a 100644 --- a/srclibs/JsonSimple.txt +++ b/srclibs/JsonSimple.txt @@ -1,2 +1,2 @@ -Repo Type:git-svn -Repo:https://json-simple.googlecode.com/svn;trunk=trunk;tags=tags +Repo Type:git +Repo:https://github.com/fangyidong/json-simple.git