removed the old Android app
Running git-annex linux builds in termux seems to work well enough that the only reason to keep the Android app would be to support Android 4-5, which the old Android app supported, and which I don't know if the termux method works on (although I see no reason why it would not). According to [1], Android 4-5 remains on around 29% of devices, down from 51% one year ago. [1] https://www.statista.com/statistics/271774/share-of-android-platforms-on-mobile-devices-with-android-os/ This is a rather large commit, but mostly very straightfoward removal of android ifdefs and patches and associated cruft. Also, removed support for building with very old ghc < 8.0.1, and with yesod < 1.4.3, and without concurrent-output, which were only being used by the cross build. Some documentation specific to the Android app (screenshots etc) needs to be updated still. This commit was sponsored by Brett Eisenberg on Patreon.
This commit is contained in:
parent
aaa841e60a
commit
38d691a10f
124 changed files with 81 additions and 12472 deletions
45
Makefile
45
Makefile
|
@ -109,7 +109,7 @@ clean:
|
|||
if [ "$(BUILDER)" != ./Setup ] && [ "$(BUILDER)" != cabal ]; then $(BUILDER) clean; fi
|
||||
rm -rf tmp dist git-annex $(mans) configure *.tix .hpc \
|
||||
doc/.ikiwiki html dist tags Build/SysConfig Build/Version \
|
||||
Setup Build/InstallDesktopFile Build/EvilSplicer \
|
||||
Setup Build/InstallDesktopFile \
|
||||
Build/Standalone Build/OSXMkLibs Build/LinuxMkLibs \
|
||||
Build/DistributionUpdate Build/BuildVersion Build/MakeMans \
|
||||
git-annex-shell git-union-merge .tasty-rerun-log
|
||||
|
@ -118,8 +118,6 @@ clean:
|
|||
|
||||
Build/InstallDesktopFile: Build/InstallDesktopFile.hs
|
||||
$(GHC) --make $@ -Wall -fno-warn-tabs
|
||||
Build/EvilSplicer: Build/EvilSplicer.hs
|
||||
$(GHC) --make $@ -Wall -fno-warn-tabs
|
||||
Build/Standalone: Build/Standalone.hs tmp/configure-stamp
|
||||
$(GHC) --make $@ -Wall -fno-warn-tabs
|
||||
Build/OSXMkLibs: Build/OSXMkLibs.hs
|
||||
|
@ -234,47 +232,6 @@ osxapp:
|
|||
hdiutil create -format UDBZ -size 640m -srcfolder tmp/build-dmg \
|
||||
-volname git-annex -o tmp/git-annex.dmg
|
||||
|
||||
ANDROID_FLAGS?=
|
||||
# Cross compile for Android.
|
||||
# Uses https://github.com/neurocyte/ghc-android
|
||||
android: Build/EvilSplicer
|
||||
echo "Running native build, to get TH splices.."
|
||||
if [ ! -e dist/setup/setup ]; then $(BUILDER) configure -O0 $(ANDROID_FLAGS) -fAndroidSplice; fi
|
||||
mkdir -p tmp
|
||||
if ! $(BUILDER) build --ghc-options=-ddump-splices 2> tmp/dump-splices; then tail tmp/dump-splices >&2; exit 1; fi
|
||||
echo "Setting up Android build tree.."
|
||||
./Build/EvilSplicer tmp/splices tmp/dump-splices standalone/no-th/evilsplicer-headers.hs
|
||||
rsync -az --exclude tmp --exclude dist . tmp/androidtree
|
||||
# Copy the files with expanded splices to the source tree, but
|
||||
# only if the existing source file is not newer. (So, if a file
|
||||
# used to have TH splices but they were removed, it will be newer,
|
||||
# and not overwritten.)
|
||||
cp -uR tmp/splices/* tmp/androidtree || true
|
||||
# Some additional dependencies needed by the expanded splices.
|
||||
sed -i 's/^ Build-Depends: */ Build-Depends: yesod-core, yesod-routes, shakespeare, blaze-markup, file-embed, wai-app-static, wai, unordered-containers, /' tmp/androidtree/git-annex.cabal
|
||||
# Avoid warnings due to sometimes unused imports added for the splices.
|
||||
sed -i 's/GHC-Options: \(.*\)-Wall/GHC-Options: \1-Wall -fno-warn-unused-imports /i' tmp/androidtree/git-annex.cabal
|
||||
sed -i 's/Extensions: /Extensions: MagicHash /i' tmp/androidtree/git-annex.cabal
|
||||
# Cabal cannot cross compile with custom build type, so workaround.
|
||||
sed -i 's/Build-type: Custom/Build-type: Simple/' tmp/androidtree/git-annex.cabal
|
||||
# Build just once, but link repeatedly, for different versions of Android.
|
||||
mkdir -p tmp/androidtree/dist/build/git-annex/4.0 tmp/androidtree/dist/build/git-annex/4.3 tmp/androidtree/dist/build/git-annex/5.0
|
||||
if [ ! -e tmp/androidtree/dist/setup-config ]; then \
|
||||
cd tmp/androidtree && CROSS_COMPILE=Android $$HOME/.ghc/$(shell cat standalone/android/abiversion)/arm-linux-androideabi/bin/cabal configure -fAndroid $(ANDROID_FLAGS); \
|
||||
fi
|
||||
PATH=$(shell standalone/android/toolchainpath 4) cd tmp/androidtree && $$HOME/.ghc/$(shell cat standalone/android/abiversion)/arm-linux-androideabi/bin/cabal build \
|
||||
&& mv dist/build/git-annex/git-annex dist/build/git-annex/4.0/git-annex
|
||||
PATH=$(shell standalone/android/toolchainpath 4) cd tmp/androidtree && $$HOME/.ghc/$(shell cat standalone/android/abiversion)/arm-linux-androideabi/bin/cabal build \
|
||||
--ghc-options=-optl-z --ghc-options=-optlnocopyreloc \
|
||||
&& mv dist/build/git-annex/git-annex dist/build/git-annex/4.3/git-annex
|
||||
PATH=$(shell standalone/android/toolchainpath 5) cd tmp/androidtree && $$HOME/.ghc/$(shell cat standalone/android/abiversion)/arm-linux-androideabi/bin/cabal build \
|
||||
--ghc-options=-optl-z --ghc-options=-optlnocopyreloc --ghc-options=-optl-fPIE --ghc-options=-optl-pie --ghc-options=-optc-fPIE --ghc-options=-optc-pie \
|
||||
&& mv dist/build/git-annex/git-annex dist/build/git-annex/5.0/git-annex
|
||||
|
||||
androidapp:
|
||||
$(MAKE) android
|
||||
$(MAKE) -C standalone/android
|
||||
|
||||
# Bypass cabal, and only run the main ghc --make command for a
|
||||
# faster development build.
|
||||
fast: dist/cabalbuild
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue