From 9aa4ec6ee0491b9e009492c62e56fdbdd40dcc6e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 22 Sep 2013 15:36:56 -0400 Subject: [PATCH 1/7] fix broken EvilSplicer change --- Build/EvilSplicer.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Build/EvilSplicer.hs b/Build/EvilSplicer.hs index 7476e1a0a6..11ab7612b7 100644 --- a/Build/EvilSplicer.hs +++ b/Build/EvilSplicer.hs @@ -332,12 +332,12 @@ mangleCode = flip_colon preindent <- many1 $ oneOf " \n" string "\\ " lambdaparams <- restofline - continuedlambdaparams <- many $ do + continuedlambdaparams <- many $ try $ do indent <- many1 $ char ' ' p <- satisfy isLetter aram <- many $ satisfy isAlphaNum <|> oneOf "_" newline - return $ indent ++ p:aram + return $ indent ++ p:aram ++ "\n" indent <- many1 $ char ' ' string "-> " firstline <- restofline @@ -348,7 +348,8 @@ mangleCode = flip_colon return $ indent ++ " " ++ l return $ concat [ prefix:preindent - , "(\\ " ++ lambdaparams ++ "\n" ++ intercalate "\n" continuedlambdaparams + , "(\\ " ++ lambdaparams ++ "\n" + , concat continuedlambdaparams , indent ++ "-> " , lambdaparens $ intercalate "\n" (firstline:lambdalines) , ")\n" From 920e1a8923e7ddef5f87e7891532f7e2d6e57779 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 22 Sep 2013 15:58:13 -0400 Subject: [PATCH 2/7] cd to work dir --- standalone/android/install-haskell-packages | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages index bd56120a67..45ac861e35 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 () { From 30a121b805f963fd6297d81990b39ba3d9ac0521 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 22 Sep 2013 16:32:19 -0400 Subject: [PATCH 3/7] set git config stuff so it can commit (hate hate hate that) --- standalone/android/install-haskell-packages | 2 ++ 1 file changed, 2 insertions(+) diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages index 45ac861e35..80d467931e 100755 --- a/standalone/android/install-haskell-packages +++ b/standalone/android/install-haskell-packages @@ -28,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 From 140c69899a925fa69d3194d82728e7eda632086a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 22 Sep 2013 17:25:30 -0400 Subject: [PATCH 4/7] hamlet requires shapespeare also, disable forced reinstalls, which hide such problems --- standalone/android/install-haskell-packages | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages index 80d467931e..a5125d5521 100755 --- a/standalone/android/install-haskell-packages +++ b/standalone/android/install-haskell-packages @@ -40,7 +40,7 @@ patched () { $SHELL fi done - cabalinstall --force-reinstalls "$@" + cabalinstall "$@" rm -rf $pkg* cd .. } @@ -80,8 +80,8 @@ install_pkgs () { 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 From 66631b40928035b5001992a1bae8119ebc695ab7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 22 Sep 2013 17:30:04 -0400 Subject: [PATCH 5/7] add --- standalone/android/clean-haskell-packages | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 standalone/android/clean-haskell-packages diff --git a/standalone/android/clean-haskell-packages b/standalone/android/clean-haskell-packages new file mode 100755 index 0000000000..bffdf00bba --- /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 From e86cbcd631e7f4606123e5bb56bcdafb580d720f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 22 Sep 2013 18:17:46 -0400 Subject: [PATCH 6/7] reorder --- standalone/android/install-haskell-packages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages index a5125d5521..8bf7981dcf 100755 --- a/standalone/android/install-haskell-packages +++ b/standalone/android/install-haskell-packages @@ -76,7 +76,6 @@ install_pkgs () { patched profunctors patched skein patched lens - patched DAV patched persistent-template patched file-embed patched wai-app-static @@ -92,6 +91,7 @@ install_pkgs () { patched yesod patched async patched gnuidn + patched DAV installgitannexdeps -fAndroid -f-Pairing From 31b5ef64634ff85543e5b88f3741fb474b3a3af0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 23 Sep 2013 00:14:48 +0000 Subject: [PATCH 7/7] fix unix-time --- .../unix-time_hack-for-Bionic.patch | 25 +++++++++++++++++++ standalone/android/install-haskell-packages | 1 + 2 files changed, 26 insertions(+) create mode 100644 standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch 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 0000000000..80b509f5f3 --- /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 +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 8bf7981dcf..2262d273b5 100755 --- a/standalone/android/install-haskell-packages +++ b/standalone/android/install-haskell-packages @@ -56,6 +56,7 @@ install_pkgs () { cd tmp patched network + patched unix-time patched lifted-base patched zlib patched process