summaryrefslogtreecommitdiff
path: root/standalone/android
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-11-11 00:03:24 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-11-11 00:04:04 -0400
commit70fdf046ba09aac4fac40e1e93cfaa88926fb5d4 (patch)
tree905765353780a1c151674e570029085300637671 /standalone/android
parentdee00883115e74951bb57ae2ed439ea7bdcaaa51 (diff)
update to arm-linux-androideabi-4.8 and current cabal
Diffstat (limited to 'standalone/android')
-rw-r--r--standalone/android/Makefile2
-rwxr-xr-xstandalone/android/buildchroot-inchroot-asuser2
-rwxr-xr-xstandalone/android/clean-haskell-packages4
-rw-r--r--standalone/android/haskell-patches/crypto-numbers_build-fix.patch235
-rw-r--r--standalone/android/haskell-patches/language-javascript_fix-build-with-new-ghc.patch25
-rw-r--r--standalone/android/haskell-patches/socks_0.4.2_0001-remove-IPv6-stuff.patch22
-rw-r--r--standalone/android/haskell-patches/uuid_build-without-v1-uuid-which-needs-network-info.patch79
-rw-r--r--standalone/android/haskell-patches/yesod-form_spliced-TH.patch51
-rwxr-xr-xstandalone/android/install-haskell-packages7
9 files changed, 383 insertions, 44 deletions
diff --git a/standalone/android/Makefile b/standalone/android/Makefile
index 1a2ef0f1a..2b326abc7 100644
--- a/standalone/android/Makefile
+++ b/standalone/android/Makefile
@@ -2,7 +2,7 @@
# and builds the Android app.
# Add Android cross-compiler to PATH (as installed by ghc-android)
-ANDROID_CROSS_COMPILER?=$(HOME)/.ghc/android-14/arm-linux-androideabi-4.7/bin
+ANDROID_CROSS_COMPILER?=$(HOME)/.ghc/android-14/arm-linux-androideabi-4.8/bin
PATH:=$(ANDROID_CROSS_COMPILER):$(PATH)
# Paths to the Android SDK and NDK.
diff --git a/standalone/android/buildchroot-inchroot-asuser b/standalone/android/buildchroot-inchroot-asuser
index 2cd77b6b7..c3d7bdf76 100755
--- a/standalone/android/buildchroot-inchroot-asuser
+++ b/standalone/android/buildchroot-inchroot-asuser
@@ -30,7 +30,7 @@ rm -rf adt-bundle-linux-x86/eclipse
# The git-annex android Makefile needs this cc symlink.
ln -s arm-linux-androideabi-gcc \
- $HOME/.ghc/android-14/arm-linux-androideabi-4.7/bin/cc
+ $HOME/.ghc/android-14/arm-linux-androideabi-4.8/bin/cc
cd
git clone git://git-annex.branchable.com/ git-annex
diff --git a/standalone/android/clean-haskell-packages b/standalone/android/clean-haskell-packages
index bffdf00bb..49a2ad713 100755
--- a/standalone/android/clean-haskell-packages
+++ b/standalone/android/clean-haskell-packages
@@ -2,5 +2,5 @@
# 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
+rm -f $(grep -l $HOME/.ghc/android-14/arm-linux-androideabi-4.8/.cabal/lib/ $HOME/.ghc/android-14/arm-linux-androideabi-4.8/lib/*-ghc-*/package.conf.d/*.conf)
+$HOME/.ghc/android-14/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ghc-pkg recache
diff --git a/standalone/android/haskell-patches/crypto-numbers_build-fix.patch b/standalone/android/haskell-patches/crypto-numbers_build-fix.patch
new file mode 100644
index 000000000..f8bdd1c39
--- /dev/null
+++ b/standalone/android/haskell-patches/crypto-numbers_build-fix.patch
@@ -0,0 +1,235 @@
+From f6ed5c3093111ffe0276f5b5bb6241783611ab1c Mon Sep 17 00:00:00 2001
+From: androidbuilder <androidbuilder@example.com>
+Date: Mon, 11 Nov 2013 01:54:25 +0000
+Subject: [PATCH] hack to build
+
+---
+ Crypto/Number/Basic.hs | 17 -----------------
+ Crypto/Number/ModArithmetic.hs | 29 -----------------------------
+ Crypto/Number/Prime.hs | 18 ------------------
+ crypto-numbers.cabal | 2 +-
+ 4 files changed, 1 insertion(+), 65 deletions(-)
+
+diff --git a/Crypto/Number/Basic.hs b/Crypto/Number/Basic.hs
+index af03052..5de8518 100644
+--- a/Crypto/Number/Basic.hs
++++ b/Crypto/Number/Basic.hs
+@@ -1,8 +1,5 @@
+ {-# LANGUAGE BangPatterns #-}
+ {-# LANGUAGE CPP #-}
+-#if MIN_VERSION_integer_gmp(0,5,1)
+-{-# LANGUAGE UnboxedTuples #-}
+-#endif
+ -- |
+ -- Module : Crypto.Number.Basic
+ -- License : BSD-style
+@@ -17,11 +14,7 @@ module Crypto.Number.Basic
+ , areEven
+ ) where
+
+-#if MIN_VERSION_integer_gmp(0,5,1)
+-import GHC.Integer.GMP.Internals
+-#else
+ import Data.Bits
+-#endif
+
+ -- | sqrti returns two integer (l,b) so that l <= sqrt i <= b
+ -- the implementation is quite naive, use an approximation for the first number
+@@ -60,25 +53,16 @@ sqrti i
+ -- gcde 'a' 'b' find (x,y,gcd(a,b)) where ax + by = d
+ --
+ gcde :: Integer -> Integer -> (Integer, Integer, Integer)
+-#if MIN_VERSION_integer_gmp(0,5,1)
+-gcde a b = (s, t, g)
+- where (# g, s #) = gcdExtInteger a b
+- t = (g - s * a) `div` b
+-#else
+ gcde a b = if d < 0 then (-x,-y,-d) else (x,y,d) where
+ (d, x, y) = f (a,1,0) (b,0,1)
+ f t (0, _, _) = t
+ f (a', sa, ta) t@(b', sb, tb) =
+ let (q, r) = a' `divMod` b' in
+ f t (r, sa - (q * sb), ta - (q * tb))
+-#endif
+
+ -- | get the extended GCD of two integer using the extended binary algorithm (HAC 14.61)
+ -- get (x,y,d) where d = gcd(a,b) and x,y satisfying ax + by = d
+ gcde_binary :: Integer -> Integer -> (Integer, Integer, Integer)
+-#if MIN_VERSION_integer_gmp(0,5,1)
+-gcde_binary = gcde
+-#else
+ gcde_binary a' b'
+ | b' == 0 = (1,0,a')
+ | a' >= b' = compute a' b'
+@@ -102,7 +86,6 @@ gcde_binary a' b'
+ in if u2 >= v2
+ then loop g x y (u2 - v2) v2 (a2 - c2) (b2 - d2) c2 d2
+ else loop g x y u2 (v2 - u2) a2 b2 (c2 - a2) (d2 - b2)
+-#endif
+
+ -- | check if a list of integer are all even
+ areEven :: [Integer] -> Bool
+diff --git a/Crypto/Number/ModArithmetic.hs b/Crypto/Number/ModArithmetic.hs
+index 031f477..38b22b7 100644
+--- a/Crypto/Number/ModArithmetic.hs
++++ b/Crypto/Number/ModArithmetic.hs
+@@ -26,12 +26,8 @@ module Crypto.Number.ModArithmetic
+ import Control.Exception (throw, Exception)
+ import Data.Typeable
+
+-#if MIN_VERSION_integer_gmp(0,5,1)
+-import GHC.Integer.GMP.Internals
+-#else
+ import Crypto.Number.Basic (gcde_binary)
+ import Data.Bits
+-#endif
+
+ -- | Raised when two numbers are supposed to be coprimes but are not.
+ data CoprimesAssertionError = CoprimesAssertionError
+@@ -52,13 +48,7 @@ expSafe :: Integer -- ^ base
+ -> Integer -- ^ exponant
+ -> Integer -- ^ modulo
+ -> Integer -- ^ result
+-#if MIN_VERSION_integer_gmp(0,5,1)
+-expSafe b e m
+- | odd m = powModSecInteger b e m
+- | otherwise = powModInteger b e m
+-#else
+ expSafe = exponentiation
+-#endif
+
+ -- | Compute the modular exponentiation of base^exponant using
+ -- the fastest algorithm without any consideration for
+@@ -71,11 +61,7 @@ expFast :: Integer -- ^ base
+ -> Integer -- ^ modulo
+ -> Integer -- ^ result
+ expFast =
+-#if MIN_VERSION_integer_gmp(0,5,1)
+- powModInteger
+-#else
+ exponentiation
+-#endif
+
+ -- note on exponentiation: 0^0 is treated as 1 for mimicking the standard library;
+ -- the mathematic debate is still open on whether or not this is true, but pratically
+@@ -84,22 +70,15 @@ expFast =
+ -- | exponentiation_rtl_binary computes modular exponentiation as b^e mod m
+ -- using the right-to-left binary exponentiation algorithm (HAC 14.79)
+ exponentiation_rtl_binary :: Integer -> Integer -> Integer -> Integer
+-#if MIN_VERSION_integer_gmp(0,5,1)
+-exponentiation_rtl_binary = expSafe
+-#else
+ exponentiation_rtl_binary 0 0 m = 1 `mod` m
+ exponentiation_rtl_binary b e m = loop e b 1
+ where sq x = (x * x) `mod` m
+ loop !0 _ !a = a `mod` m
+ loop !i !s !a = loop (i `shiftR` 1) (sq s) (if odd i then a * s else a)
+-#endif
+
+ -- | exponentiation computes modular exponentiation as b^e mod m
+ -- using repetitive squaring.
+ exponentiation :: Integer -> Integer -> Integer -> Integer
+-#if MIN_VERSION_integer_gmp(0,5,1)
+-exponentiation = expSafe
+-#else
+ exponentiation b e m
+ | b == 1 = b
+ | e == 0 = 1
+@@ -107,7 +86,6 @@ exponentiation b e m
+ | even e = let p = (exponentiation b (e `div` 2) m) `mod` m
+ in (p^(2::Integer)) `mod` m
+ | otherwise = (b * exponentiation b (e-1) m) `mod` m
+-#endif
+
+ --{-# DEPRECATED exponantiation_rtl_binary "typo in API name it's called exponentiation_rtl_binary #-}
+ exponantiation_rtl_binary :: Integer -> Integer -> Integer -> Integer
+@@ -119,17 +97,10 @@ exponantiation = exponentiation
+
+ -- | inverse computes the modular inverse as in g^(-1) mod m
+ inverse :: Integer -> Integer -> Maybe Integer
+-#if MIN_VERSION_integer_gmp(0,5,1)
+-inverse g m
+- | r == 0 = Nothing
+- | otherwise = Just r
+- where r = recipModInteger g m
+-#else
+ inverse g m
+ | d > 1 = Nothing
+ | otherwise = Just (x `mod` m)
+ where (x,_,d) = gcde_binary g m
+-#endif
+
+ -- | Compute the modular inverse of 2 coprime numbers.
+ -- This is equivalent to inverse except that the result
+diff --git a/Crypto/Number/Prime.hs b/Crypto/Number/Prime.hs
+index 2060f4d..61d37c0 100644
+--- a/Crypto/Number/Prime.hs
++++ b/Crypto/Number/Prime.hs
+@@ -1,8 +1,6 @@
+ {-# LANGUAGE CPP #-}
+ {-# LANGUAGE BangPatterns #-}
+-#if MIN_VERSION_integer_gmp(0,5,1)
+ {-# LANGUAGE MagicHash #-}
+-#endif
+ -- |
+ -- Module : Crypto.Number.Prime
+ -- License : BSD-style
+@@ -27,12 +25,7 @@ import Crypto.Number.Generate
+ import Crypto.Number.Basic (sqrti, gcde_binary)
+ import Crypto.Number.ModArithmetic (exponantiation)
+
+-#if MIN_VERSION_integer_gmp(0,5,1)
+-import GHC.Integer.GMP.Internals
+-import GHC.Base
+-#else
+ import Data.Bits
+-#endif
+
+ -- | returns if the number is probably prime.
+ -- first a list of small primes are implicitely tested for divisibility,
+@@ -75,21 +68,11 @@ findPrimeFromWith rng prop !n
+ -- | find a prime from a starting point with no specific property.
+ findPrimeFrom :: CPRG g => g -> Integer -> (Integer, g)
+ findPrimeFrom rng n =
+-#if MIN_VERSION_integer_gmp(0,5,1)
+- (nextPrimeInteger n, rng)
+-#else
+ findPrimeFromWith rng (\g _ -> (True, g)) n
+-#endif
+
+ -- | Miller Rabin algorithm return if the number is probably prime or composite.
+ -- the tries parameter is the number of recursion, that determines the accuracy of the test.
+ primalityTestMillerRabin :: CPRG g => g -> Int -> Integer -> (Bool, g)
+-#if MIN_VERSION_integer_gmp(0,5,1)
+-primalityTestMillerRabin rng (I# tries) !n =
+- case testPrimeInteger n tries of
+- 0# -> (False, rng)
+- _ -> (True, rng)
+-#else
+ primalityTestMillerRabin rng tries !n
+ | n <= 3 = error "Miller-Rabin requires tested value to be > 3"
+ | even n = (False, rng)
+@@ -126,7 +109,6 @@ primalityTestMillerRabin rng tries !n
+ | x2 == 1 = False
+ | x2 /= nm1 = loop' ws ((x2*x2) `mod` n) (r+1)
+ | otherwise = loop ws
+-#endif
+
+ {-
+ n < z -> witness to test
+diff --git a/crypto-numbers.cabal b/crypto-numbers.cabal
+index 05c00c1..8da5e2a 100644
+--- a/crypto-numbers.cabal
++++ b/crypto-numbers.cabal
+@@ -15,7 +15,7 @@ Extra-Source-Files: Tests/*.hs
+
+ Flag integer-gmp
+ Description: Are we using integer-gmp?
+- Default: True
++ Default: False
+
+ Library
+ Build-Depends: base >= 4 && < 5
+--
+1.7.10.4
+
diff --git a/standalone/android/haskell-patches/language-javascript_fix-build-with-new-ghc.patch b/standalone/android/haskell-patches/language-javascript_fix-build-with-new-ghc.patch
new file mode 100644
index 000000000..6182cba44
--- /dev/null
+++ b/standalone/android/haskell-patches/language-javascript_fix-build-with-new-ghc.patch
@@ -0,0 +1,25 @@
+From cb5252db1a0d515da69d9167a8b2facd839940b2 Mon Sep 17 00:00:00 2001
+From: androidbuilder <androidbuilder@example.com>
+Date: Mon, 11 Nov 2013 02:29:06 +0000
+Subject: [PATCH] fix build with new ghc
+
+---
+ src/Language/JavaScript/Parser/Lexer.hs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Language/JavaScript/Parser/Lexer.hs b/src/Language/JavaScript/Parser/Lexer.hs
+index 79fa9c5..fa96e29 100644
+--- a/src/Language/JavaScript/Parser/Lexer.hs
++++ b/src/Language/JavaScript/Parser/Lexer.hs
+@@ -712,7 +712,7 @@ alex_scan_tkn user orig_input len input s last_acc =
+ (offset) = (base +# ord_c)
+ (check) = alexIndexInt16OffAddr alex_check offset
+
+- (new_s) = if (offset >=# 0#) && (check ==# ord_c)
++ (new_s) = if (tagToEnum# (offset >=# 0#)) && (tagToEnum# (check ==# ord_c))
+ then alexIndexInt16OffAddr alex_table offset
+ else alexIndexInt16OffAddr alex_deflt s
+ in
+--
+1.7.10.4
+
diff --git a/standalone/android/haskell-patches/socks_0.4.2_0001-remove-IPv6-stuff.patch b/standalone/android/haskell-patches/socks_0.4.2_0001-remove-IPv6-stuff.patch
index fc9569573..c9723f3f7 100644
--- a/standalone/android/haskell-patches/socks_0.4.2_0001-remove-IPv6-stuff.patch
+++ b/standalone/android/haskell-patches/socks_0.4.2_0001-remove-IPv6-stuff.patch
@@ -1,7 +1,7 @@
-From 28e6a6599ee91e15aa7b2f9d25433490f192f22e Mon Sep 17 00:00:00 2001
-From: foo <foo@bar>
-Date: Sat, 21 Sep 2013 23:17:29 +0000
-Subject: [PATCH] remove IPv6 stuff
+From e1a2f80f6bec25921ab645a0aaf1c6422a8917ab Mon Sep 17 00:00:00 2001
+From: dummy <dummy@example.com>
+Date: Mon, 11 Nov 2013 01:06:58 +0000
+Subject: [PATCH] fix
---
Network/Socks5/Command.hs | 8 +-------
@@ -12,10 +12,10 @@ Subject: [PATCH] remove IPv6 stuff
5 files changed, 2 insertions(+), 28 deletions(-)
diff --git a/Network/Socks5/Command.hs b/Network/Socks5/Command.hs
-index 8ce06ec..222d954 100644
+index db95fbd..fdba5ec 100644
--- a/Network/Socks5/Command.hs
+++ b/Network/Socks5/Command.hs
-@@ -12,7 +12,6 @@ module Network.Socks5.Command
+@@ -13,7 +13,6 @@ module Network.Socks5.Command
, Connect(..)
, Command(..)
, connectIPV4
@@ -23,7 +23,7 @@ index 8ce06ec..222d954 100644
, connectDomainName
-- * lowlevel interface
, rpc
-@@ -28,7 +27,7 @@ import qualified Data.ByteString as B
+@@ -29,7 +28,7 @@ import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BC
import Data.Serialize
@@ -32,7 +32,7 @@ index 8ce06ec..222d954 100644
import Network.Socket.ByteString
import Network.Socks5.Types
-@@ -64,11 +63,6 @@ connectIPV4 socket hostaddr port = onReply <$> rpc_ socket (Connect $ SocksAddre
+@@ -65,11 +64,6 @@ connectIPV4 socket hostaddr port = onReply <$> rpc_ socket (Connect $ SocksAddre
where onReply (SocksAddrIPV4 h, p) = (h, p)
onReply _ = error "ipv4 requested, got something different"
@@ -114,14 +114,14 @@ index 7fbec25..17c7c83 100644
data SocksAddress = SocksAddress !SocksHostAddress !PortNumber
deriving (Show,Eq,Ord)
diff --git a/Network/Socks5/Wire.hs b/Network/Socks5/Wire.hs
-index 3ab95a8..2881988 100644
+index 10bd262..a30f32e 100644
--- a/Network/Socks5/Wire.hs
+++ b/Network/Socks5/Wire.hs
@@ -46,12 +46,10 @@ data SocksResponse = SocksResponse
- getAddr 1 = SocksAddrIPV4 <$> getWord32be
+ getAddr 1 = SocksAddrIPV4 <$> getWord32host
getAddr 3 = SocksAddrDomainName <$> (getWord8 >>= getByteString . fromIntegral)
--getAddr 4 = SocksAddrIPV6 <$> (liftM4 (,,,) getWord32le getWord32le getWord32le getWord32le)
+-getAddr 4 = SocksAddrIPV6 <$> (liftM4 (,,,) getWord32host getWord32host getWord32host getWord32host)
getAddr n = error ("cannot get unknown socket address type: " ++ show n)
putAddr (SocksAddrIPV4 h) = putWord8 1 >> putWord32host h
diff --git a/standalone/android/haskell-patches/uuid_build-without-v1-uuid-which-needs-network-info.patch b/standalone/android/haskell-patches/uuid_build-without-v1-uuid-which-needs-network-info.patch
new file mode 100644
index 000000000..12cb2a922
--- /dev/null
+++ b/standalone/android/haskell-patches/uuid_build-without-v1-uuid-which-needs-network-info.patch
@@ -0,0 +1,79 @@
+From 87283f9b6f992a7f0e36c7b1bafc288bf2bf106a Mon Sep 17 00:00:00 2001
+From: androidbuilder <androidbuilder@example.com>
+Date: Mon, 11 Nov 2013 02:46:27 +0000
+Subject: [PATCH] build without v1 uuid which needs network-ino
+
+---
+ Data/UUID/Util.hs | 11 -----------
+ Data/UUID/V1.hs | 2 --
+ uuid.cabal | 2 --
+ 3 files changed, 15 deletions(-)
+
+diff --git a/Data/UUID/Util.hs b/Data/UUID/Util.hs
+index 581391a..399e508 100644
+--- a/Data/UUID/Util.hs
++++ b/Data/UUID/Util.hs
+@@ -3,7 +3,6 @@ module Data.UUID.Util (
+ UnpackedUUID(..)
+ , unpack, pack
+ , version
+- , extractMac
+ , extractTime
+ , setTime
+ ) where
+@@ -13,7 +12,6 @@ import Data.Word
+ import Data.Word.Util
+ import Data.Bits
+ import Data.UUID.Internal
+-import Network.Info
+ import Data.Int (Int64)
+
+ version :: UUID -> Int
+@@ -43,12 +41,3 @@ extractTime uuid =
+ timeAndVersionToTime :: Word16 -> Word16
+ timeAndVersionToTime tv = tv .&. 0x0FFF
+
+-extractMac :: UUID -> Maybe MAC
+-extractMac uuid =
+- if version uuid == 1
+- then Just $
+- MAC (node_0 unpacked) (node_1 unpacked) (node_2 unpacked) (node_3 unpacked) (node_4 unpacked) (node_5 unpacked)
+- else Nothing
+- where
+- unpacked = unpack uuid
+-
+diff --git a/Data/UUID/V1.hs b/Data/UUID/V1.hs
+index 067e729..ca4c235 100644
+--- a/Data/UUID/V1.hs
++++ b/Data/UUID/V1.hs
+@@ -37,8 +37,6 @@ import System.IO.Unsafe
+
+ import qualified System.Random as R
+
+-import Network.Info
+-
+ import Data.UUID.Builder
+ import Data.UUID.Internal
+
+diff --git a/uuid.cabal b/uuid.cabal
+index 0a53059..57b1b86 100644
+--- a/uuid.cabal
++++ b/uuid.cabal
+@@ -32,14 +32,12 @@ Library
+ cryptohash >= 0.7 && < 0.12,
+ deepseq == 1.3.*,
+ hashable (>= 1.1.1.0 && < 1.2.0) || (>= 1.2.1 && < 1.3),
+- network-info == 0.2.*,
+ random >= 1.0.1 && < 1.1,
+ time >= 1.1 && < 1.5
+
+ Exposed-Modules:
+ Data.UUID
+ Data.UUID.Util
+- Data.UUID.V1
+ Data.UUID.V3
+ Data.UUID.V4
+ Data.UUID.V5
+--
+1.7.10.4
+
diff --git a/standalone/android/haskell-patches/yesod-form_spliced-TH.patch b/standalone/android/haskell-patches/yesod-form_spliced-TH.patch
index d3c0a3570..486d2aaee 100644
--- a/standalone/android/haskell-patches/yesod-form_spliced-TH.patch
+++ b/standalone/android/haskell-patches/yesod-form_spliced-TH.patch
@@ -1,11 +1,8 @@
-From c5b0db193fd6e9fd6be22891ae988babbfac3ff0 Mon Sep 17 00:00:00 2001
+From f645acc0efbfcba7715cd2b6734f0e9df98f7020 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
-Date: Sat, 19 Oct 2013 02:14:38 +0000
-Subject: [PATCH] spliced TH
+Date: Mon, 11 Nov 2013 01:26:56 +0000
+Subject: [PATCH] update
-Used EvilSplicer. Needed a few syntax fixes, and a lot of added imports.
-
-Removed some things I don't need, rather than re-splicing to handle a new version.
---
Yesod/Form/Fields.hs | 771 +++++++++++++++++++++++++++++++++++------------
Yesod/Form/Functions.hs | 237 ++++++++++++---
@@ -13,10 +10,10 @@ Removed some things I don't need, rather than re-splicing to handle a new versio
Yesod/Form/MassInput.hs | 233 +++++++++++---
Yesod/Form/Nic.hs | 61 +++-
yesod-form.cabal | 1 +
- 6 files changed, 1123 insertions(+), 305 deletions(-)
+ 6 files changed, 1122 insertions(+), 306 deletions(-)
diff --git a/Yesod/Form/Fields.hs b/Yesod/Form/Fields.hs
-index b8109df..9bde340 100644
+index 0689859..1e9d49b 100644
--- a/Yesod/Form/Fields.hs
+++ b/Yesod/Form/Fields.hs
@@ -1,4 +1,3 @@
@@ -209,16 +206,16 @@ index b8109df..9bde340 100644
, fieldEnctype = UrlEncoded
}
where showVal = either id (pack . renderHtml)
-@@ -168,7 +233,7 @@ $newline never
- -- | A newtype wrapper around a 'Text' that converts newlines to HTML
+@@ -169,8 +234,6 @@ $newline never
-- br-tags.
newtype Textarea = Textarea { unTextarea :: Text }
-- deriving (Show, Read, Eq, PersistField, PersistFieldSql, Ord)
-+ deriving (Show, Read, Eq, PersistField, Ord)
+ deriving (Show, Read, Eq, PersistField, Ord)
+-instance PersistFieldSql Textarea where
+- sqlType _ = SqlString
instance ToHtml Textarea where
toHtml =
unsafeByteString
-@@ -186,10 +251,18 @@ instance ToHtml Textarea where
+@@ -188,10 +251,18 @@ instance ToHtml Textarea where
textareaField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Textarea
textareaField = Field
{ fieldParse = parseHelper $ Right . Textarea
@@ -241,7 +238,7 @@ index b8109df..9bde340 100644
, fieldEnctype = UrlEncoded
}
-@@ -197,10 +270,19 @@ hiddenField :: (Monad m, PathPiece p, RenderMessage (HandlerSite m) FormMessage)
+@@ -199,10 +270,19 @@ hiddenField :: (Monad m, PathPiece p, RenderMessage (HandlerSite m) FormMessage)
=> Field m p
hiddenField = Field
{ fieldParse = parseHelper $ maybe (Left MsgValueRequired) Right . fromPathPiece
@@ -265,7 +262,7 @@ index b8109df..9bde340 100644
, fieldEnctype = UrlEncoded
}
-@@ -208,20 +290,55 @@ textField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Tex
+@@ -210,20 +290,55 @@ textField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Tex
textField = Field
{ fieldParse = parseHelper $ Right
, fieldView = \theId name attrs val isReq ->
@@ -329,7 +326,7 @@ index b8109df..9bde340 100644
, fieldEnctype = UrlEncoded
}
-@@ -293,10 +410,24 @@ emailField = Field
+@@ -295,10 +410,24 @@ emailField = Field
case Email.canonicalizeEmail $ encodeUtf8 s of
Just e -> Right $ decodeUtf8With lenientDecode e
Nothing -> Left $ MsgInvalidEmail s
@@ -358,7 +355,7 @@ index b8109df..9bde340 100644
, fieldEnctype = UrlEncoded
}
-@@ -305,20 +436,78 @@ searchField :: Monad m => RenderMessage (HandlerSite m) FormMessage => AutoFocus
+@@ -307,20 +436,78 @@ searchField :: Monad m => RenderMessage (HandlerSite m) FormMessage => AutoFocus
searchField autoFocus = Field
{ fieldParse = parseHelper Right
, fieldView = \theId name attrs val isReq -> do
@@ -449,7 +446,7 @@ index b8109df..9bde340 100644
, fieldEnctype = UrlEncoded
}
-@@ -329,7 +518,30 @@ urlField = Field
+@@ -331,7 +518,30 @@ urlField = Field
Nothing -> Left $ MsgInvalidUrl s
Just _ -> Right s
, fieldView = \theId name attrs val isReq ->
@@ -481,7 +478,7 @@ index b8109df..9bde340 100644
, fieldEnctype = UrlEncoded
}
-@@ -342,18 +554,56 @@ selectField :: (Eq a, RenderMessage site FormMessage)
+@@ -344,18 +554,56 @@ selectField :: (Eq a, RenderMessage site FormMessage)
=> HandlerT site IO (OptionList a)
-> Field (HandlerT site IO) a
selectField = selectFieldHelper
@@ -550,7 +547,7 @@ index b8109df..9bde340 100644
multiSelectFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg)
=> [(msg, a)]
-@@ -376,11 +626,48 @@ multiSelectField ioptlist =
+@@ -378,11 +626,48 @@ multiSelectField ioptlist =
view theId name attrs val isReq = do
opts <- fmap olOptions $ handlerToWidget ioptlist
let selOpts = map (id &&& (optselected val)) opts
@@ -604,7 +601,7 @@ index b8109df..9bde340 100644
where
optselected (Left _) _ = False
optselected (Right vals) opt = (optionInternalValue opt) `elem` vals
-@@ -390,67 +677,172 @@ radioFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg)
+@@ -392,67 +677,172 @@ radioFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg)
-> Field (HandlerT site IO) a
radioFieldList = radioField . optionsPairs
@@ -828,7 +825,7 @@ index b8109df..9bde340 100644
, fieldEnctype = UrlEncoded
}
where
-@@ -476,10 +868,25 @@ $newline never
+@@ -478,10 +868,25 @@ $newline never
checkBoxField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Bool
checkBoxField = Field
{ fieldParse = \e _ -> return $ checkBoxParser e
@@ -858,7 +855,7 @@ index b8109df..9bde340 100644
, fieldEnctype = UrlEncoded
}
-@@ -523,49 +930,7 @@ optionsPairs opts = do
+@@ -525,49 +930,7 @@ optionsPairs opts = do
optionsEnum :: (MonadHandler m, Show a, Enum a, Bounded a) => m (OptionList a)
optionsEnum = optionsPairs $ map (\x -> (pack $ show x, x)) [minBound..maxBound]
@@ -909,7 +906,7 @@ index b8109df..9bde340 100644
selectFieldHelper
:: (Eq a, RenderMessage site FormMessage)
-@@ -609,9 +974,21 @@ fileField = Field
+@@ -611,9 +974,21 @@ fileField = Field
case files of
[] -> Right Nothing
file:_ -> Right $ Just file
@@ -934,7 +931,7 @@ index b8109df..9bde340 100644
, fieldEnctype = Multipart
}
-@@ -638,10 +1015,20 @@ fileAFormReq fs = AForm $ \(site, langs) menvs ints -> do
+@@ -640,10 +1015,20 @@ fileAFormReq fs = AForm $ \(site, langs) menvs ints -> do
{ fvLabel = toHtml $ renderMessage site langs $ fsLabel fs
, fvTooltip = fmap (toHtml . renderMessage site langs) $ fsTooltip fs
, fvId = id'
@@ -959,7 +956,7 @@ index b8109df..9bde340 100644
, fvErrors = errs
, fvRequired = True
}
-@@ -670,10 +1057,20 @@ fileAFormOpt fs = AForm $ \(master, langs) menvs ints -> do
+@@ -672,10 +1057,20 @@ fileAFormOpt fs = AForm $ \(master, langs) menvs ints -> do
{ fvLabel = toHtml $ renderMessage master langs $ fsLabel fs
, fvTooltip = fmap (toHtml . renderMessage master langs) $ fsTooltip fs
, fvId = id'
@@ -1770,7 +1767,7 @@ index 2862678..7b49b1a 100644
}
where
diff --git a/yesod-form.cabal b/yesod-form.cabal
-index afd2de5..49fd684 100644
+index 39fa680..88ed066 100644
--- a/yesod-form.cabal
+++ b/yesod-form.cabal
@@ -19,6 +19,7 @@ library
diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages
index 318b850ba..10272919d 100755
--- a/standalone/android/install-haskell-packages
+++ b/standalone/android/install-haskell-packages
@@ -50,7 +50,7 @@ patched () {
installgitannexdeps () {
pushd ../..
- echo cabal install --only-dependencies
+ echo cabal install --only-dependencies "$@"
cabal install --only-dependencies "$@"
popd
}
@@ -90,11 +90,14 @@ install_pkgs () {
patched yesod-core
patched yesod-persistent
patched yesod-form
+ patched crypto-numbers
patched yesod-auth
patched yesod
patched async
patched gnuidn
patched DAV
+ patched language-javascript
+ patched uuid
cd ..
@@ -112,6 +115,6 @@ echo
echo
echo cross build
echo
-PATH=$HOME/.ghc/android-14/arm-linux-androideabi-4.7/bin:$HOME/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/bin:$PATH
+PATH=$HOME/.ghc/android-14/arm-linux-androideabi-4.8/bin:$HOME/.ghc/android-14/arm-linux-androideabi-4.8/arm-linux-androideabi/bin:$PATH
cabal update
install_pkgs