aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xstandalone/android/buildchroot-inchroot3
-rw-r--r--standalone/android/haskell-patches/libxml-sax_text-dep.patch25
-rw-r--r--standalone/android/haskell-patches/network-protocol-xmpp_text-dapendency.patch25
-rwxr-xr-xstandalone/android/install-haskell-packages24
4 files changed, 22 insertions, 55 deletions
diff --git a/standalone/android/buildchroot-inchroot b/standalone/android/buildchroot-inchroot
index 533f5b75f..b5bf59ef5 100755
--- a/standalone/android/buildchroot-inchroot
+++ b/standalone/android/buildchroot-inchroot
@@ -19,6 +19,9 @@ apt-get -y install ca-certificates curl file m4 autoconf zlib1g-dev
apt-get -y install libgnutls-dev libxml2-dev libgsasl7-dev pkg-config c2hs
apt-get -y install ant default-jdk rsync wget gnupg lsof
apt-get -y install gettext unzip python
+apt-get -y install locales
+echo en_US.UTF-8 UTF-8 >> /etc/locale.gen
+locale-gen
apt-get clean
wget http://snapshot.debian.org/archive/debian/20130903T155330Z/pool/main/a/automake-1.14/automake_1.14-1_all.deb
dpkg -i automake*.deb
diff --git a/standalone/android/haskell-patches/libxml-sax_text-dep.patch b/standalone/android/haskell-patches/libxml-sax_text-dep.patch
deleted file mode 100644
index c9b4fdb78..000000000
--- a/standalone/android/haskell-patches/libxml-sax_text-dep.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From d4c861dbdee34cb2434085b9ece62c416d4cad79 Mon Sep 17 00:00:00 2001
-From: androidbuilder <androidbuilder@example.com>
-Date: Sat, 8 Feb 2014 17:19:37 +0000
-Subject: [PATCH] text dependency
-
----
- libxml-sax.cabal | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libxml-sax.cabal b/libxml-sax.cabal
-index 60dba81..d6883bd 100644
---- a/libxml-sax.cabal
-+++ b/libxml-sax.cabal
-@@ -35,7 +35,7 @@ library
- build-depends:
- base >= 4.1 && < 5.0
- , bytestring >= 0.9
-- , text >= 0.7 && < 0.12
-+ , text
- , xml-types >= 0.3 && < 0.4
-
- exposed-modules:
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/network-protocol-xmpp_text-dapendency.patch b/standalone/android/haskell-patches/network-protocol-xmpp_text-dapendency.patch
deleted file mode 100644
index 798781837..000000000
--- a/standalone/android/haskell-patches/network-protocol-xmpp_text-dapendency.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 8f124aad6d04abba5729af21ba3b50944f165d4b Mon Sep 17 00:00:00 2001
-From: androidbuilder <androidbuilder@example.com>
-Date: Sat, 8 Feb 2014 17:20:41 +0000
-Subject: [PATCH] text dependency
-
----
- network-protocol-xmpp.cabal | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/network-protocol-xmpp.cabal b/network-protocol-xmpp.cabal
-index 2500075..d709a15 100644
---- a/network-protocol-xmpp.cabal
-+++ b/network-protocol-xmpp.cabal
-@@ -36,7 +36,7 @@ library
- , libxml-sax >= 0.7 && < 0.8
- , monads-tf >= 0.1 && < 0.2
- , network >= 2.2
-- , text >= 0.10 && < 0.12
-+ , text
- , transformers >= 0.2
- , xml-types >= 0.3 && < 0.4
-
---
-1.7.10.4
-
diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages
index 8f2702ab4..f278cd337 100755
--- a/standalone/android/install-haskell-packages
+++ b/standalone/android/install-haskell-packages
@@ -20,6 +20,19 @@ fi
cabalopts="$@"
+setupcabal () {
+ cabal update
+
+ # Workaround for http://www.reddit.com/r/haskell/comments/26045a/if_youre_finding_cabal_cant_build_your_project/
+ # should be able to remove this eventually.
+ cabal install transformers-compat -fthree
+ cabal install mtl-2.1.3.1
+
+ # Some packages fail to install in a non unicode locale.
+ LANG=en_US.UTF-8
+ export LANG
+}
+
cabalinstall () {
echo cabal install "$@" "$cabalopts"
eval cabal install "$@" "$cabalopts"
@@ -106,8 +119,6 @@ install_pkgs () {
patched uuid
patched dns
patched gnutls
- patched libxml-sax
- patched network-protocol-xmpp
patched unbounded-delays
cd ..
@@ -119,13 +130,16 @@ echo
echo
echo native build
echo
-cabal update
-installgitannexdeps
+setupcabal
+# --reorder-goals seems to be necessary to work around
+# http://www.reddit.com/r/haskell/comments/26045a/if_youre_finding_cabal_cant_build_your_project/
+# should be able to remove it eventually
+installgitannexdeps --reorder-goals
echo
echo
echo cross build
echo
PATH=$HOME/.ghc/$(cat abiversion)/bin:$HOME/.ghc/$(cat abiversion)/arm-linux-androideabi/bin:$PATH
-cabal update
+setupcabal
install_pkgs