summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-07-04 00:47:49 +0100
committerGravatar Joey Hess <joey@kitenet.net>2014-07-04 00:47:49 +0100
commita8da82baa84171bb40b98c7cd9d3c33613410ce2 (patch)
tree8f77fdb1b935ce3a2667e31c11e9dbbdd2ed40f1
parentf0dc6d75bfa70e0f7a0bb188e9d856143aafbe9e (diff)
update android haskell patches
-rw-r--r--standalone/android/haskell-patches/dns_use-android-net.dns1-command-instead-of-resolv.conf.patch36
-rw-r--r--standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch22
-rw-r--r--standalone/no-th/haskell-patches/shakespeare_remove-TH.patch58
3 files changed, 58 insertions, 58 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 f510b0d8d..a00338fab 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 3f72e299c50476c270c5187092d6e8b13ddfbf1e Mon Sep 17 00:00:00 2001
+From aaef1aadb21a198475a656132ef4488b85b8fd1b Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
-Date: Mon, 26 May 2014 01:53:13 +0000
+Date: Thu, 3 Jul 2014 23:22:47 +0000
Subject: [PATCH] use android net.dns1 command instead of resolv.conf file
Android has no /etc/resolv.conf. Some might have /system/etc/resolv.conf,
@@ -9,12 +9,12 @@ but even that does not seem likely.
This is likely a little slow, but is at least fine for git-annex's uses,
since it only uses this library for occasional SRV lookups.
---
- Network/DNS/Resolver.hs | 13 ++++++++-----
+ Network/DNS/Resolver.hs | 11 +++++++++--
dns.cabal | 1 +
- 2 files changed, 9 insertions(+), 5 deletions(-)
+ 2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Network/DNS/Resolver.hs b/Network/DNS/Resolver.hs
-index 5721e03..c4400d1 100644
+index e4124b8..7aca431 100644
--- a/Network/DNS/Resolver.hs
+++ b/Network/DNS/Resolver.hs
@@ -19,7 +19,7 @@ module Network.DNS.Resolver (
@@ -26,7 +26,7 @@ index 5721e03..c4400d1 100644
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
+@@ -32,6 +32,7 @@ import Network.Socket (AddrInfoFlag(..), AddrInfo(..), SockAddr(..), PortNumber(
import Prelude hiding (lookup)
import System.Random (getStdRandom, randomR)
import System.Timeout (timeout)
@@ -34,28 +34,26 @@ index 5721e03..c4400d1 100644
#if mingw32_HOST_OS == 1
import Network.Socket (send)
-@@ -130,10 +131,12 @@ makeResolvSeed conf = ResolvSeed <$> addr
- where
+@@ -132,7 +133,13 @@ makeResolvSeed conf = ResolvSeed <$> addr
addr = case resolvInfo conf of
- RCHostName numhost -> makeAddrInfo numhost
-- RCFilePath file -> toAddr <$> readFile file >>= makeAddrInfo
-- toAddr cs = let l:_ = filter ("nameserver" `isPrefixOf`) $ lines cs
-- in extract l
-- extract = reverse . dropWhile isSpace . reverse . dropWhile isSpace . drop 11
+ RCHostName numhost -> makeAddrInfo numhost Nothing
+ RCHostPort numhost mport -> makeAddrInfo numhost $ Just mport
+- RCFilePath file -> toAddr <$> readFile file >>= \i -> makeAddrInfo i Nothing
+ 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
++ let addr = case ls of
+ [] -> "8.8.8.8" -- google public dns as a fallback only
+ (l:_) -> l
-
- makeAddrInfo :: HostName -> IO AddrInfo
- makeAddrInfo addr = do
++ makeAddrInfo addr Nothing
+ toAddr cs = let l:_ = filter ("nameserver" `isPrefixOf`) $ lines cs
+ in extract l
+ extract = reverse . dropWhile isSpace . reverse . dropWhile isSpace . drop 11
diff --git a/dns.cabal b/dns.cabal
-index ceaf5f4..cd15e61 100644
+index 0a08a9e..724a3e0 100644
--- a/dns.cabal
+++ b/dns.cabal
-@@ -37,6 +37,7 @@ Library
+@@ -38,6 +38,7 @@ Library
, network >= 2.3
, random
, resourcet
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 be7956bea..da5fbf8ad 100644
--- a/standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch
+++ b/standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch
@@ -1,7 +1,7 @@
-From e6d5c141186dbdbe97c698294485ffc4dcd3a843 Mon Sep 17 00:00:00 2001
+From 5433c4f62b1818e09682a64dee229142f88f17d9 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
-Date: Fri, 18 Oct 2013 16:45:50 +0000
-Subject: [PATCH] hack for bionic + cross build
+Date: Thu, 3 Jul 2014 20:48:02 +0000
+Subject: [PATCH] ihack for bionic and cross build
---
Data/UnixTime/Types.hsc | 12 ------------
@@ -9,10 +9,10 @@ Subject: [PATCH] hack for bionic + cross build
2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/Data/UnixTime/Types.hsc b/Data/UnixTime/Types.hsc
-index d30f39b..ec7ca4c 100644
+index 403daa6..4e66880 100644
--- a/Data/UnixTime/Types.hsc
+++ b/Data/UnixTime/Types.hsc
-@@ -9,8 +9,6 @@ import Foreign.Storable
+@@ -10,8 +10,6 @@ import Data.Binary
#include <sys/time.h>
@@ -21,7 +21,7 @@ index d30f39b..ec7ca4c 100644
-- |
-- Data structure for Unix time.
data UnixTime = UnixTime {
-@@ -20,16 +18,6 @@ data UnixTime = UnixTime {
+@@ -21,16 +19,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
+ instance Binary UnixTime where
+ put (UnixTime (CTime sec) msec) = do
+ put sec
diff --git a/cbits/conv.c b/cbits/conv.c
-index 7ff7b87..2e4c870 100644
+index ec31fef..b7bc0f9 100644
--- a/cbits/conv.c
+++ b/cbits/conv.c
-@@ -55,7 +55,7 @@ time_t c_parse_unix_time_gmt(char *fmt, char *src) {
+@@ -96,7 +96,7 @@ time_t c_parse_unix_time_gmt(char *fmt, char *src) {
#else
strptime(src, fmt, &dst);
#endif
diff --git a/standalone/no-th/haskell-patches/shakespeare_remove-TH.patch b/standalone/no-th/haskell-patches/shakespeare_remove-TH.patch
index 6a499bc26..86022ec3d 100644
--- a/standalone/no-th/haskell-patches/shakespeare_remove-TH.patch
+++ b/standalone/no-th/haskell-patches/shakespeare_remove-TH.patch
@@ -1,24 +1,24 @@
-From a4b8a90dbb97392378a3c5980cbb9c033702dfb2 Mon Sep 17 00:00:00 2001
-From: Your Name <you@example.com>
-Date: Tue, 20 May 2014 21:17:27 +0000
-Subject: [PATCH] remove TN
+From 6de4e75bfbfccb8aedcbf3ee75e5d544f1eeeca5 Mon Sep 17 00:00:00 2001
+From: dummy <dummy@example.com>
+Date: Thu, 3 Jul 2014 21:48:14 +0000
+Subject: [PATCH] remove TH
---
- Text/Cassius.hs | 23 ------
- Text/Coffee.hs | 56 ++-------------
- Text/Css.hs | 151 ----------------------------------------
- Text/CssCommon.hs | 4 --
- Text/Hamlet.hs | 86 +++++++----------------
- Text/Hamlet/Parse.hs | 3 +-
- Text/Julius.hs | 67 +++---------------
- Text/Lucius.hs | 46 +-----------
- Text/Roy.hs | 51 ++------------
- Text/Shakespeare.hs | 70 +++----------------
- Text/Shakespeare/Base.hs | 28 --------
- Text/Shakespeare/I18N.hs | 178 ++---------------------------------------------
- Text/Shakespeare/Text.hs | 125 +++------------------------------
- shakespeare.cabal | 2 +-
- 14 files changed, 78 insertions(+), 812 deletions(-)
+ Text/Cassius.hs | 23 ------
+ Text/Coffee.hs | 56 ++-------------
+ Text/Css.hs | 151 ---------------------------------------
+ Text/CssCommon.hs | 4 --
+ Text/Hamlet.hs | 86 +++++++---------------
+ Text/Hamlet/Parse.hs | 3 +-
+ Text/Julius.hs | 67 +++--------------
+ Text/Lucius.hs | 46 +-----------
+ Text/Roy.hs | 51 ++-----------
+ Text/Shakespeare.hs | 70 +++---------------
+ Text/Shakespeare/Base.hs | 28 --------
+ Text/Shakespeare/I18N.hs | 178 ++--------------------------------------------
+ Text/Shakespeare/Text.hs | 125 +++-----------------------------
+ shakespeare.cabal | 3 +-
+ 14 files changed, 78 insertions(+), 813 deletions(-)
diff --git a/Text/Cassius.hs b/Text/Cassius.hs
index 91fc90f..c515807 100644
@@ -345,7 +345,7 @@ index 719e0a8..8c40e8c 100644
-mkSizeType "ExSize" "ex"
-mkSizeType "PixelSize" "px"
diff --git a/Text/Hamlet.hs b/Text/Hamlet.hs
-index 9500ecb..ec8471a 100644
+index 39c1528..6321cd3 100644
--- a/Text/Hamlet.hs
+++ b/Text/Hamlet.hs
@@ -11,36 +11,36 @@
@@ -497,7 +497,7 @@ index 9500ecb..ec8471a 100644
-- | Checks for truth in the left value in each pair in the first argument. If
-- a true exists, then the corresponding right action is performed. Only the
-@@ -452,7 +420,7 @@ hamletUsedIdentifiers settings =
+@@ -460,7 +428,7 @@ hamletUsedIdentifiers settings =
data HamletRuntimeRules = HamletRuntimeRules {
hrrI18n :: Bool
}
@@ -506,7 +506,7 @@ index 9500ecb..ec8471a 100644
hamletFileReloadWithSettings :: HamletRuntimeRules
-> HamletSettings -> FilePath -> Q Exp
hamletFileReloadWithSettings hrr settings fp = do
-@@ -479,7 +447,7 @@ hamletFileReloadWithSettings hrr settings fp = do
+@@ -487,7 +455,7 @@ hamletFileReloadWithSettings hrr settings fp = do
c VTUrlParam = [|EUrlParam|]
c VTMixin = [|\r -> EMixin $ \c -> r c|]
c VTMsg = [|EMsg|]
@@ -1294,19 +1294,21 @@ index 6865a5a..e25a8be 100644
- rendered <- shakespeareFile rs{ justVarInterpolation = True } fp
- return (render `AppE` rendered)
diff --git a/shakespeare.cabal b/shakespeare.cabal
-index a555c24..d73da26 100644
+index 05b985e..dd8762a 100644
--- a/shakespeare.cabal
+++ b/shakespeare.cabal
-@@ -62,8 +62,8 @@ library
+@@ -61,10 +61,9 @@ library
+ Text.Lucius
Text.Cassius
Text.Shakespeare.Base
++ Text.Css
Text.Shakespeare
-- other-modules: Text.Hamlet.Parse
- Text.Css
-+ other-modules: Text.Hamlet.Parse
+- Text.TypeScript
+ other-modules: Text.Hamlet.Parse
+- Text.Css
Text.MkSizeType
Text.IndentToBrace
Text.CssCommon
--
-2.0.0.rc2
+1.7.10.4