summaryrefslogtreecommitdiff
path: root/standalone/android
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-07-02 23:04:35 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-07-02 23:04:35 -0400
commitba77c902bc7c83eefe73058cbcd82435562ef34f (patch)
treed39553b361edd253ac811fba00d4730f3017d83b /standalone/android
parent0bf027f0a2abe492b12cd12d94379e92ced24c59 (diff)
parentd6afecc10c1d647daebac46f2cba26d646a9e308 (diff)
Merge orca:/tmp/android
Diffstat (limited to 'standalone/android')
-rw-r--r--standalone/android/haskell-patches/dns_use-android-net.dns1-command-instead-of-resolv.conf.patch38
-rw-r--r--standalone/android/haskell-patches/iproute_1.2.11_0001-build-without-IPv6-stuff.patch24
-rw-r--r--standalone/android/haskell-patches/network_2.4.1.0_0002-remove-Network.BSD-symbols-not-available-in-bionic.patch50
-rw-r--r--standalone/android/haskell-patches/network_2.4.1.0_0003-configure-misdetects-accept4.patch16
-rw-r--r--standalone/android/haskell-patches/network_2.4.1.0_0006-build-fixes.patch24
-rw-r--r--standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch24
-rw-r--r--standalone/android/haskell-patches/uuid_build-without-v1-uuid-which-needs-network-info.patch59
-rw-r--r--standalone/android/haskell-patches/warp_avoid-ipv6-for-android.patch39
8 files changed, 163 insertions, 111 deletions
diff --git a/standalone/android/haskell-patches/dns_use-android-net.dns1-command-instead-of-resolv.conf.patch b/standalone/android/haskell-patches/dns_use-android-net.dns1-command-instead-of-resolv.conf.patch
index 962a64207..2b23c6d24 100644
--- a/standalone/android/haskell-patches/dns_use-android-net.dns1-command-instead-of-resolv.conf.patch
+++ b/standalone/android/haskell-patches/dns_use-android-net.dns1-command-instead-of-resolv.conf.patch
@@ -1,6 +1,6 @@
-From 087f1ae5e17f0e6d7c9f6b4092a5bb5bb6f5bf60 Mon Sep 17 00:00:00 2001
+From e5072d9b721cc25fa1017df97d71bf926a78d4e5 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
-Date: Thu, 16 Oct 2014 02:59:11 +0000
+Date: Fri, 3 Jul 2015 02:24:19 +0000
Subject: [PATCH] port
---
@@ -9,48 +9,48 @@ Subject: [PATCH] port
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/Network/DNS/Resolver.hs b/Network/DNS/Resolver.hs
-index 5721e03..c4400d1 100644
+index 31f6373..6487c7b 100644
--- a/Network/DNS/Resolver.hs
+++ b/Network/DNS/Resolver.hs
-@@ -19,7 +19,7 @@ module Network.DNS.Resolver (
+@@ -18,7 +18,7 @@ module Network.DNS.Resolver (
+ , fromDNSFormat
) where
- import Control.Applicative ((<$>), (<*>), pure)
-import Control.Exception (bracket)
+import Control.Exception (bracket, catch, IOException)
- import qualified Data.ByteString.Char8 as BS
import Data.Char (isSpace)
import Data.List (isPrefixOf)
-@@ -32,6 +32,7 @@ import Network.Socket (AddrInfoFlag(..), AddrInfo(..), defaultHints, getAddrInfo
+ import Data.Maybe (fromMaybe)
+@@ -32,6 +32,7 @@ import Network.Socket (AddrInfoFlag(..), AddrInfo(..), SockAddr(..), PortNumber(
import Prelude hiding (lookup)
import System.Random (getStdRandom, randomR)
import System.Timeout (timeout)
+import System.Process
- #if mingw32_HOST_OS == 1
- import Network.Socket (send)
-@@ -130,10 +131,12 @@ makeResolvSeed conf = ResolvSeed <$> addr
- where
+ #if __GLASGOW_HASKELL__ < 709
+ import Control.Applicative ((<$>), (<*>), pure)
+@@ -136,10 +137,12 @@ makeResolvSeed conf = ResolvSeed <$> addr
addr = case resolvInfo conf of
- RCHostName numhost -> makeAddrInfo numhost
-- RCFilePath file -> toAddr <$> readFile file >>= makeAddrInfo
+ RCHostName numhost -> makeAddrInfo numhost Nothing
+ RCHostPort numhost mport -> makeAddrInfo numhost $ Just mport
+- RCFilePath file -> toAddr <$> readFile file >>= \i -> makeAddrInfo i Nothing
- toAddr cs = let l:_ = filter ("nameserver" `isPrefixOf`) $ lines cs
- in extract l
- extract = reverse . dropWhile isSpace . reverse . dropWhile isSpace . drop 11
+ RCFilePath file -> do
+ -- Android has no /etc/resolv.conf; use getprop command.
+ ls <- catch (lines <$> readProcess "getprop" ["net.dns1"] []) (const (return []) :: IOException -> IO [String])
-+ makeAddrInfo $ case ls of
++ flip makeAddrInfo Nothing $ case ls of
+ [] -> "8.8.8.8" -- google public dns as a fallback only
+ (l:_) -> l
- makeAddrInfo :: HostName -> IO AddrInfo
- makeAddrInfo addr = do
+ makeAddrInfo :: HostName -> Maybe PortNumber -> IO AddrInfo
+ makeAddrInfo addr mport = do
diff --git a/dns.cabal b/dns.cabal
-index ceaf5f4..cd15e61 100644
+index 0745754..8cf4b67 100644
--- a/dns.cabal
+++ b/dns.cabal
-@@ -37,6 +37,7 @@ Library
+@@ -39,6 +39,7 @@ Library
, network >= 2.3
, random
, resourcet
@@ -59,5 +59,5 @@ index ceaf5f4..cd15e61 100644
Build-Depends: base >= 4 && < 5
, attoparsec
--
-2.1.1
+2.1.4
diff --git a/standalone/android/haskell-patches/iproute_1.2.11_0001-build-without-IPv6-stuff.patch b/standalone/android/haskell-patches/iproute_1.2.11_0001-build-without-IPv6-stuff.patch
index bb9caec77..13cfbd232 100644
--- a/standalone/android/haskell-patches/iproute_1.2.11_0001-build-without-IPv6-stuff.patch
+++ b/standalone/android/haskell-patches/iproute_1.2.11_0001-build-without-IPv6-stuff.patch
@@ -1,31 +1,31 @@
-From 7beec2e707d59f9573aa2dc7c57bd2a62f16b480 Mon Sep 17 00:00:00 2001
-From: Joey Hess <joey@kitenet.net>
-Date: Wed, 15 May 2013 19:06:03 -0400
+From b2b88224426fe6c7c72ebdec2946fd1ddbacbfaf Mon Sep 17 00:00:00 2001
+From: dummy <dummy@example.com>
+Date: Thu, 2 Jul 2015 20:42:50 +0000
Subject: [PATCH] build without IPv6 stuff
---
- Data/IP.hs | 2 +-
- Data/IP/Addr.hs | 3 +++
+ Data/IP.hs | 2 +-
+ Data/IP/Addr.hs | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/Data/IP.hs b/Data/IP.hs
-index cffef93..ea486c9 100644
+index 306a488..e3f252e 100644
--- a/Data/IP.hs
+++ b/Data/IP.hs
@@ -6,7 +6,7 @@ module Data.IP (
-- ** IP data
IP (..)
, IPv4, toIPv4, fromIPv4, fromHostAddress, toHostAddress
-- , IPv6, toIPv6, fromIPv6, fromHostAddress6, toHostAddress6
-+ , IPv6, toIPv6, fromIPv6 -- , fromHostAddress6, toHostAddress6
+- , IPv6, toIPv6, toIPv6b, fromIPv6, fromIPv6b, fromHostAddress6, toHostAddress6
++ , IPv6, toIPv6, toIPv6b, fromIPv6, fromIPv6b -- , fromHostAddress6, toHostAddress6
-- ** IP range data
, IPRange (..)
, AddrRange (addr, mask, mlen)
diff --git a/Data/IP/Addr.hs b/Data/IP/Addr.hs
-index faaf0c7..5b556fb 100644
+index 8d4131e..868a572 100644
--- a/Data/IP/Addr.hs
+++ b/Data/IP/Addr.hs
-@@ -312,6 +312,7 @@ toHostAddress (IP4 addr4)
+@@ -376,6 +376,7 @@ toHostAddress (IP4 addr4)
| byteOrder == LittleEndian = fixByteOrder addr4
| otherwise = addr4
@@ -33,7 +33,7 @@ index faaf0c7..5b556fb 100644
-- | The 'fromHostAddress6' function converts 'HostAddress6' to 'IPv6'.
fromHostAddress6 :: HostAddress6 -> IPv6
fromHostAddress6 = IP6
-@@ -320,6 +321,8 @@ fromHostAddress6 = IP6
+@@ -384,6 +385,8 @@ fromHostAddress6 = IP6
toHostAddress6 :: IPv6 -> HostAddress6
toHostAddress6 (IP6 addr6) = addr6
@@ -43,5 +43,5 @@ index faaf0c7..5b556fb 100644
fixByteOrder s = d1 .|. d2 .|. d3 .|. d4
where
--
-1.7.10.4
+2.1.4
diff --git a/standalone/android/haskell-patches/network_2.4.1.0_0002-remove-Network.BSD-symbols-not-available-in-bionic.patch b/standalone/android/haskell-patches/network_2.4.1.0_0002-remove-Network.BSD-symbols-not-available-in-bionic.patch
index 5b07f233b..e4ebc3ef4 100644
--- a/standalone/android/haskell-patches/network_2.4.1.0_0002-remove-Network.BSD-symbols-not-available-in-bionic.patch
+++ b/standalone/android/haskell-patches/network_2.4.1.0_0002-remove-Network.BSD-symbols-not-available-in-bionic.patch
@@ -1,17 +1,17 @@
-From 7861b133bb269b50fcf709291449cb0473818902 Mon Sep 17 00:00:00 2001
-From: Joey Hess <joey@kitenet.net>
-Date: Sun, 29 Dec 2013 21:29:23 +0000
+From 508b4701c1610d9772564b97a74b5fa01dab48e2 Mon Sep 17 00:00:00 2001
+From: dummy <dummy@example.com>
+Date: Thu, 2 Jul 2015 20:12:59 +0000
Subject: [PATCH] remove Network.BSD symbols not available in bionic
---
- Network/BSD.hsc | 98 -------------------------------------------------------
- 1 file changed, 98 deletions(-)
+ Network/BSD.hsc | 100 --------------------------------------------------------
+ 1 file changed, 100 deletions(-)
diff --git a/Network/BSD.hsc b/Network/BSD.hsc
-index d6dae85..27910f4 100644
+index b5e9a26..f085f2a 100644
--- a/Network/BSD.hsc
+++ b/Network/BSD.hsc
-@@ -30,15 +30,6 @@ module Network.BSD
+@@ -27,15 +27,6 @@ module Network.BSD
, getHostByAddr
, hostAddress
@@ -27,7 +27,7 @@ index d6dae85..27910f4 100644
-- * Service names
, ServiceEntry(..)
, ServiceName
-@@ -64,14 +55,6 @@ module Network.BSD
+@@ -61,14 +52,6 @@ module Network.BSD
, getProtocolNumber
, defaultProtocol
@@ -42,7 +42,7 @@ index d6dae85..27910f4 100644
-- * Port numbers
, PortNumber
-@@ -83,11 +66,7 @@ module Network.BSD
+@@ -80,11 +63,7 @@ module Network.BSD
#if !defined(cygwin32_HOST_OS) && !defined(mingw32_HOST_OS) && !defined(_WIN32)
, getNetworkByName
, getNetworkByAddr
@@ -52,9 +52,9 @@ index d6dae85..27910f4 100644
- , getNetworkEntry
- , endNetworkEntry
#endif
- ) where
-@@ -303,31 +282,6 @@ getProtocolNumber proto = do
+ #if defined(HAVE_IF_NAMETOINDEX)
+@@ -298,31 +277,6 @@ getProtocolNumber proto = do
(ProtocolEntry _ _ num) <- getProtocolByName proto
return num
@@ -62,18 +62,18 @@ index d6dae85..27910f4 100644
-getProtocolEntry :: IO ProtocolEntry -- Next Protocol Entry from DB
-getProtocolEntry = withLock $ do
- ent <- throwNoSuchThingIfNull "getProtocolEntry" "no such protocol entry"
-- $ trySysCall c_getprotoent
+- $ c_getprotoent
- peek ent
-
-foreign import ccall unsafe "getprotoent" c_getprotoent :: IO (Ptr ProtocolEntry)
-
-setProtocolEntry :: Bool -> IO () -- Keep DB Open ?
--setProtocolEntry flg = withLock $ trySysCall $ c_setprotoent (fromBool flg)
+-setProtocolEntry flg = withLock $ c_setprotoent (fromBool flg)
-
-foreign import ccall unsafe "setprotoent" c_setprotoent :: CInt -> IO ()
-
-endProtocolEntry :: IO ()
--endProtocolEntry = withLock $ trySysCall $ c_endprotoent
+-endProtocolEntry = withLock $ c_endprotoent
-
-foreign import ccall unsafe "endprotoent" c_endprotoent :: IO ()
-
@@ -86,7 +86,7 @@ index d6dae85..27910f4 100644
-- ---------------------------------------------------------------------------
-- Host lookups
-@@ -402,31 +356,6 @@ getHostByAddr family addr = do
+@@ -397,31 +351,6 @@ getHostByAddr family addr = do
foreign import CALLCONV safe "gethostbyaddr"
c_gethostbyaddr :: Ptr HostAddress -> CInt -> CInt -> IO (Ptr HostEntry)
@@ -94,13 +94,13 @@ index d6dae85..27910f4 100644
-getHostEntry :: IO HostEntry
-getHostEntry = withLock $ do
- throwNoSuchThingIfNull "getHostEntry" "unable to retrieve host entry"
-- $ trySysCall $ c_gethostent
+- $ c_gethostent
- >>= peek
-
-foreign import ccall unsafe "gethostent" c_gethostent :: IO (Ptr HostEntry)
-
-setHostEntry :: Bool -> IO ()
--setHostEntry flg = withLock $ trySysCall $ c_sethostent (fromBool flg)
+-setHostEntry flg = withLock $ c_sethostent (fromBool flg)
-
-foreign import ccall unsafe "sethostent" c_sethostent :: CInt -> IO ()
-
@@ -118,14 +118,14 @@ index d6dae85..27910f4 100644
-- ---------------------------------------------------------------------------
-- Accessing network information
-@@ -488,33 +417,6 @@ getNetworkByAddr addr family = withLock $ do
+@@ -483,35 +412,6 @@ getNetworkByAddr addr family = withLock $ do
foreign import ccall unsafe "getnetbyaddr"
c_getnetbyaddr :: NetworkAddr -> CInt -> IO (Ptr NetworkEntry)
-getNetworkEntry :: IO NetworkEntry
-getNetworkEntry = withLock $ do
- throwNoSuchThingIfNull "getNetworkEntry" "no more network entries"
-- $ trySysCall $ c_getnetent
+- $ c_getnetent
- >>= peek
-
-foreign import ccall unsafe "getnetent" c_getnetent :: IO (Ptr NetworkEntry)
@@ -134,13 +134,13 @@ index d6dae85..27910f4 100644
--- whether a connection is maintained open between various
--- networkEntry calls
-setNetworkEntry :: Bool -> IO ()
--setNetworkEntry flg = withLock $ trySysCall $ c_setnetent (fromBool flg)
+-setNetworkEntry flg = withLock $ c_setnetent (fromBool flg)
-
-foreign import ccall unsafe "setnetent" c_setnetent :: CInt -> IO ()
-
--- | Close the connection to the network name database.
-endNetworkEntry :: IO ()
--endNetworkEntry = withLock $ trySysCall $ c_endnetent
+-endNetworkEntry = withLock $ c_endnetent
-
-foreign import ccall unsafe "endnetent" c_endnetent :: IO ()
-
@@ -149,9 +149,11 @@ index d6dae85..27910f4 100644
-getNetworkEntries stayOpen = do
- setNetworkEntry stayOpen
- getEntries (getNetworkEntry) (endNetworkEntry)
- #endif
+-#endif
+-
+ -- ---------------------------------------------------------------------------
+ -- Interface names
- -- Mutex for name service lockdown
--
-1.7.10.4
+2.1.4
diff --git a/standalone/android/haskell-patches/network_2.4.1.0_0003-configure-misdetects-accept4.patch b/standalone/android/haskell-patches/network_2.4.1.0_0003-configure-misdetects-accept4.patch
index 084d355ba..932bfe3da 100644
--- a/standalone/android/haskell-patches/network_2.4.1.0_0003-configure-misdetects-accept4.patch
+++ b/standalone/android/haskell-patches/network_2.4.1.0_0003-configure-misdetects-accept4.patch
@@ -1,6 +1,6 @@
-From 478fc7ae42030c1345e75727e54e1f8f895d3e22 Mon Sep 17 00:00:00 2001
+From 21af25e922b00171c07f951a235ff7d7edbbd2be Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
-Date: Wed, 15 Oct 2014 15:16:21 +0000
+Date: Thu, 2 Jul 2015 20:14:40 +0000
Subject: [PATCH] avoid accept4
---
@@ -8,19 +8,19 @@ Subject: [PATCH] avoid accept4
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Network/Socket.hsc b/Network/Socket.hsc
-index 2fe62ee..94db7a4 100644
+index 6553bfc..802a7e9 100644
--- a/Network/Socket.hsc
+++ b/Network/Socket.hsc
-@@ -511,7 +511,7 @@ accept sock@(MkSocket s family stype protocol status) = do
+@@ -489,7 +489,7 @@ accept sock@(MkSocket s family stype protocol status) = do
+ return new_sock
#else
with (fromIntegral sz) $ \ ptr_len -> do
- new_sock <-
-# ifdef HAVE_ACCEPT4
+#if 0
- throwSocketErrorIfMinus1RetryMayBlock "accept"
+ new_sock <- throwSocketErrorIfMinus1RetryMayBlock "accept"
(threadWaitRead (fromIntegral s))
(c_accept4 s sockaddr ptr_len (#const SOCK_NONBLOCK))
-@@ -1602,7 +1602,7 @@ foreign import CALLCONV SAFE_ON_WIN "connect"
+@@ -1565,7 +1565,7 @@ foreign import CALLCONV SAFE_ON_WIN "connect"
c_connect :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt
foreign import CALLCONV unsafe "accept"
c_accept :: CInt -> Ptr SockAddr -> Ptr CInt{-CSockLen???-} -> IO CInt
@@ -30,5 +30,5 @@ index 2fe62ee..94db7a4 100644
c_accept4 :: CInt -> Ptr SockAddr -> Ptr CInt{-CSockLen???-} -> CInt -> IO CInt
#endif
--
-2.1.1
+2.1.4
diff --git a/standalone/android/haskell-patches/network_2.4.1.0_0006-build-fixes.patch b/standalone/android/haskell-patches/network_2.4.1.0_0006-build-fixes.patch
new file mode 100644
index 000000000..f7cf7c747
--- /dev/null
+++ b/standalone/android/haskell-patches/network_2.4.1.0_0006-build-fixes.patch
@@ -0,0 +1,24 @@
+From cf110acc7f5863bb80ba835a009a7f59d3453239 Mon Sep 17 00:00:00 2001
+From: dummy <dummy@example.com>
+Date: Thu, 2 Jul 2015 20:19:14 +0000
+Subject: [PATCH] fix build
+
+---
+ Network/BSD.hsc | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Network/BSD.hsc b/Network/BSD.hsc
+index e11ac71..039d0f1 100644
+--- a/Network/BSD.hsc
++++ b/Network/BSD.hsc
+@@ -396,7 +396,6 @@ instance Storable NetworkEntry where
+ poke _p = error "Storable.poke(BSD.NetEntry) not implemented"
+
+
+-#if !defined(cygwin32_HOST_OS) && !defined(mingw32_HOST_OS) && !defined(_WIN32)
+ getNetworkByName :: NetworkName -> IO NetworkEntry
+ getNetworkByName name = withLock $ do
+ withCString name $ \ name_cstr -> do
+--
+2.1.4
+
diff --git a/standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch b/standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch
index 16c4f92a2..3f7d2aae7 100644
--- a/standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch
+++ b/standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch
@@ -1,6 +1,6 @@
-From db9eb179885874af342bb2c3adef7185496ba1f1 Mon Sep 17 00:00:00 2001
+From da127aa3b2c6cbf679950eb593eb8c88384cc26b Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
-Date: Wed, 15 Oct 2014 16:37:32 +0000
+Date: Thu, 2 Jul 2015 20:34:05 +0000
Subject: [PATCH] hack for bionic
---
@@ -9,10 +9,10 @@ Subject: [PATCH] hack for bionic
2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/Data/UnixTime/Types.hsc b/Data/UnixTime/Types.hsc
-index d30f39b..ec7ca4c 100644
+index 6253b27..fb5b3fa 100644
--- a/Data/UnixTime/Types.hsc
+++ b/Data/UnixTime/Types.hsc
-@@ -9,8 +9,6 @@ import Foreign.Storable
+@@ -12,8 +12,6 @@ import Data.Binary
#include <sys/time.h>
@@ -20,8 +20,8 @@ index d30f39b..ec7ca4c 100644
-
-- |
-- Data structure for Unix time.
- data UnixTime = UnixTime {
-@@ -20,16 +18,6 @@ data UnixTime = UnixTime {
+ --
+@@ -33,16 +31,6 @@ data UnixTime = UnixTime {
, utMicroSeconds :: {-# UNPACK #-} !Int32
} deriving (Eq,Ord,Show)
@@ -35,14 +35,14 @@ index d30f39b..ec7ca4c 100644
- (#poke struct timeval, tv_sec) ptr (utSeconds ut)
- (#poke struct timeval, tv_usec) ptr (utMicroSeconds ut)
-
- -- |
- -- Format of the strptime()/strftime() style.
- type Format = ByteString
+ #if __GLASGOW_HASKELL__ >= 704
+ instance Binary UnixTime where
+ put (UnixTime (CTime sec) msec) = do
diff --git a/cbits/conv.c b/cbits/conv.c
-index ec31fef..b7bc0f9 100644
+index 669cfda..8fa5f9a 100644
--- a/cbits/conv.c
+++ b/cbits/conv.c
-@@ -96,7 +96,7 @@ time_t c_parse_unix_time_gmt(char *fmt, char *src) {
+@@ -98,7 +98,7 @@ time_t c_parse_unix_time_gmt(char *fmt, char *src) {
#else
strptime(src, fmt, &dst);
#endif
@@ -52,5 +52,5 @@ index ec31fef..b7bc0f9 100644
size_t c_format_unix_time(char *fmt, time_t src, char* dst, int siz) {
--
-2.1.1
+2.1.4
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
index 12cb2a922..048a87fab 100644
--- 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
@@ -1,16 +1,15 @@
-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
+From 04a1230cf4d740d37ab427165eef4b4db2a3898f Mon Sep 17 00:00:00 2001
+From: dummy <dummy@example.com>
+Date: Fri, 3 Jul 2015 02:20:42 +0000
+Subject: [PATCH] build without v1 uuid which needs network-info
---
- Data/UUID/Util.hs | 11 -----------
- Data/UUID/V1.hs | 2 --
- uuid.cabal | 2 --
- 3 files changed, 15 deletions(-)
+ Data/UUID/Util.hs | 11 -----------
+ uuid.cabal | 2 --
+ 2 files changed, 13 deletions(-)
diff --git a/Data/UUID/Util.hs b/Data/UUID/Util.hs
-index 581391a..399e508 100644
+index 8817f51..0d43b01 100644
--- a/Data/UUID/Util.hs
+++ b/Data/UUID/Util.hs
@@ -3,7 +3,6 @@ module Data.UUID.Util (
@@ -24,49 +23,37 @@ index 581391a..399e508 100644
@@ -13,7 +12,6 @@ import Data.Word
import Data.Word.Util
import Data.Bits
- import Data.UUID.Internal
+ import Data.UUID.Types.Internal
-import Network.Info
import Data.Int (Int64)
version :: UUID -> Int
-@@ -43,12 +41,3 @@ extractTime uuid =
+@@ -42,12 +40,3 @@ extractTime uuid =
+
timeAndVersionToTime :: Word16 -> Word16
timeAndVersionToTime tv = tv .&. 0x0FFF
-
+-
-extractMac :: UUID -> Maybe MAC
--extractMac uuid =
+-extractMac uuid =
- if version uuid == 1
-- then Just $
+- 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
+index 2fa548b..9d86fd2 100644
--- a/uuid.cabal
+++ b/uuid.cabal
-@@ -32,14 +32,12 @@ Library
+@@ -30,7 +30,6 @@ Library
+ binary >= 0.4 && < 0.8,
+ bytestring >= 0.9 && < 0.11,
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
-
+ random >= 1.0.1 && < 1.2,
+ time >= 1.1 && < 1.6,
+ uuid-types >= 1.0 && < 2
+@@ -38,7 +37,6 @@ Library
Exposed-Modules:
Data.UUID
Data.UUID.Util
@@ -75,5 +62,5 @@ index 0a53059..57b1b86 100644
Data.UUID.V4
Data.UUID.V5
--
-1.7.10.4
+2.1.4
diff --git a/standalone/android/haskell-patches/warp_avoid-ipv6-for-android.patch b/standalone/android/haskell-patches/warp_avoid-ipv6-for-android.patch
new file mode 100644
index 000000000..6144aa0fa
--- /dev/null
+++ b/standalone/android/haskell-patches/warp_avoid-ipv6-for-android.patch
@@ -0,0 +1,39 @@
+From a33437e3150fb33d2fd22d29ff196be28a81c747 Mon Sep 17 00:00:00 2001
+From: androidbuilder <androidbuilder@example.com>
+Date: Thu, 2 Jul 2015 21:48:18 +0000
+Subject: [PATCH] avoid ipv6 for android
+
+---
+ Network/Wai/Handler/Warp/Run.hs | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/Network/Wai/Handler/Warp/Run.hs b/Network/Wai/Handler/Warp/Run.hs
+index 34ae455..ea7475c 100644
+--- a/Network/Wai/Handler/Warp/Run.hs
++++ b/Network/Wai/Handler/Warp/Run.hs
+@@ -14,7 +14,7 @@ import Control.Monad (when, unless, void)
+ import Data.ByteString (ByteString)
+ import qualified Data.ByteString as S
+ import Data.Char (chr)
+-import Data.IP (toHostAddress, toHostAddress6)
++import Data.IP (toHostAddress)
+ import Data.IORef (IORef, newIORef, readIORef, writeIORef)
+ import Data.Streaming.Network (bindPortTCP)
+ import Network (sClose, Socket)
+@@ -323,13 +323,6 @@ serveConnection conn ii origAddr transport settings app = do
+ [a] -> Just (SockAddrInet (readInt clientPort)
+ (toHostAddress a))
+ _ -> Nothing
+- ["PROXY","TCP6",clientAddr,_,clientPort,_] ->
+- case [x | (x, t) <- reads (decodeAscii clientAddr), null t] of
+- [a] -> Just (SockAddrInet6 (readInt clientPort)
+- 0
+- (toHostAddress6 a)
+- 0)
+- _ -> Nothing
+ ("PROXY":"UNKNOWN":_) ->
+ Just origAddr
+ _ ->
+--
+2.1.4
+