summaryrefslogtreecommitdiff
path: root/standalone
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-09-23 01:16:42 +0100
committerGravatar Joey Hess <joey@kitenet.net>2013-09-23 01:16:42 +0100
commit20efa1c5402220d6a527b65713c049b0bd385c43 (patch)
treec6116ffffaf1138244b256d5332585e3e6f122a9 /standalone
parent3fd02ebcb220aca135e395db30e73dd4a955034e (diff)
parent5ab2a943cc5006207cb02cbd1b5d77e335eb1267 (diff)
Merge remote-tracking branch 'in/android-rebuild' into android-rebuild
Diffstat (limited to 'standalone')
-rwxr-xr-xstandalone/android/clean-haskell-packages6
-rw-r--r--standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch25
-rwxr-xr-xstandalone/android/install-haskell-packages13
3 files changed, 41 insertions, 3 deletions
diff --git a/standalone/android/clean-haskell-packages b/standalone/android/clean-haskell-packages
new file mode 100755
index 000000000..bffdf00bb
--- /dev/null
+++ b/standalone/android/clean-haskell-packages
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Removes all currently installed cross-compiled haskell packages
+# except those part of ghc.
+# Useful if the build failed.
+rm -f $(grep -l $HOME/.ghc/android-14/arm-linux-androideabi-4.7/.cabal/lib/ $HOME/.ghc/android-14/arm-linux-androideabi-4.7/lib/*-ghc-*/package.conf.d/*.conf)
+$HOME/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/bin/ghc-pkg recache
diff --git a/standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch b/standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch
new file mode 100644
index 000000000..80b509f5f
--- /dev/null
+++ b/standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch
@@ -0,0 +1,25 @@
+From eff7034f0c9f80fd30c9d8952b3fd0a343adccc8 Mon Sep 17 00:00:00 2001
+From: foo <bar>
+Date: Mon, 23 Sep 2013 00:12:35 +0000
+Subject: [PATCH] hack for Bionic
+
+---
+ cbits/conv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cbits/conv.c b/cbits/conv.c
+index 7ff7b87..2e4c870 100644
+--- a/cbits/conv.c
++++ b/cbits/conv.c
+@@ -55,7 +55,7 @@ time_t c_parse_unix_time_gmt(char *fmt, char *src) {
+ #else
+ strptime(src, fmt, &dst);
+ #endif
+- return timegm(&dst);
++ return NULL; /* timegm(&dst); (not in Bionic) */
+ }
+
+ size_t c_format_unix_time(char *fmt, time_t src, char* dst, int siz) {
+--
+1.7.10.4
+
diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages
index bd56120a6..2262d273b 100755
--- a/standalone/android/install-haskell-packages
+++ b/standalone/android/install-haskell-packages
@@ -11,6 +11,10 @@
set -e
+if [ ! -d haskell-patches ]; then
+ cd standalone/android
+fi
+
cabalopts="$@"
cabalinstall () {
@@ -24,6 +28,8 @@ patched () {
cabal unpack $pkg
cd $pkg*
git init
+ git config user.name dummy
+ git config user.email dummy@example.com
git add .
git commit -m "pre-patched state of $pkg"
for patch in ../../haskell-patches/${pkg}_*; do
@@ -34,7 +40,7 @@ patched () {
$SHELL
fi
done
- cabalinstall --force-reinstalls "$@"
+ cabalinstall "$@"
rm -rf $pkg*
cd ..
}
@@ -50,6 +56,7 @@ install_pkgs () {
cd tmp
patched network
+ patched unix-time
patched lifted-base
patched zlib
patched process
@@ -70,12 +77,11 @@ install_pkgs () {
patched profunctors
patched skein
patched lens
- patched DAV
patched persistent-template
patched file-embed
patched wai-app-static
- patched hamlet
patched shakespeare
+ patched hamlet
patched shakespeare-css
patched shakespeare-js
patched yesod-routes
@@ -86,6 +92,7 @@ install_pkgs () {
patched yesod
patched async
patched gnuidn
+ patched DAV
installgitannexdeps -fAndroid -f-Pairing