summaryrefslogtreecommitdiff
path: root/standalone/android/haskell-patches
diff options
context:
space:
mode:
Diffstat (limited to 'standalone/android/haskell-patches')
-rw-r--r--standalone/android/haskell-patches/basement_fix-build-on-android.patch41
-rw-r--r--standalone/android/haskell-patches/certificate_1.3.7-0001-support-Android-cert-store.patch37
-rw-r--r--standalone/android/haskell-patches/clock_hack-for-android.patch76
-rw-r--r--standalone/android/haskell-patches/comonad_cross-build.patch25
-rw-r--r--standalone/android/haskell-patches/crypto-numbers_build-fix.patch227
-rw-r--r--standalone/android/haskell-patches/distributive_0.4.4_0001-fixes-for-cross-build.patch25
-rw-r--r--standalone/android/haskell-patches/dns_use-android-net.dns1-command-instead-of-resolv.conf.patch63
-rw-r--r--standalone/android/haskell-patches/gsasl_0.3.5-0001-link-with-libgsasl.patch25
-rw-r--r--standalone/android/haskell-patches/iproute_1.2.11_0001-build-without-IPv6-stuff.patch47
-rw-r--r--standalone/android/haskell-patches/language-javascript_fix-build-with-new-ghc.patch25
-rw-r--r--standalone/android/haskell-patches/network_android-port-fixes.patch341
-rw-r--r--standalone/android/haskell-patches/primitive_0.5.3.0_0001-disable-i386-opt-stuff-to-allow-cross-compilation.patch25
-rw-r--r--standalone/android/haskell-patches/socks_0.4.2_0001-remove-IPv6-stuff.patch135
-rw-r--r--standalone/android/haskell-patches/stm-chans_cross-build.patch25
-rw-r--r--standalone/android/haskell-patches/system-filepath_cross-build.patch25
-rw-r--r--standalone/android/haskell-patches/unbounded-delays_crossbuild.patch25
-rw-r--r--standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch56
-rw-r--r--standalone/android/haskell-patches/uuid_build-without-v1-uuid-which-needs-network-info.patch79
-rw-r--r--standalone/android/haskell-patches/warp_remove-ipv6-stuff.patch39
-rw-r--r--standalone/android/haskell-patches/x509-store_support-Android-cert-store.patch28
-rw-r--r--standalone/android/haskell-patches/xss-sanitize_deps.patch24
-rw-r--r--standalone/android/haskell-patches/zlib_0.5.4.0_0001-hack-to-build-on-Android.patch35
22 files changed, 0 insertions, 1428 deletions
diff --git a/standalone/android/haskell-patches/basement_fix-build-on-android.patch b/standalone/android/haskell-patches/basement_fix-build-on-android.patch
deleted file mode 100644
index 948473bc2e..0000000000
--- a/standalone/android/haskell-patches/basement_fix-build-on-android.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From cc0c373b69f93057cbdcb634a461e10ec019d87a Mon Sep 17 00:00:00 2001
-From: androidbuilder <androidbuilder@example.com>
-Date: Wed, 20 Jun 2018 00:29:11 +0100
-Subject: [PATCH] fix build on android
-
----
- Basement/Terminal.hs | 2 --
- basement.cabal | 1 -
- 2 files changed, 3 deletions(-)
-
-diff --git a/Basement/Terminal.hs b/Basement/Terminal.hs
-index 8136e52..cca9606 100644
---- a/Basement/Terminal.hs
-+++ b/Basement/Terminal.hs
-@@ -1,11 +1,9 @@
- {-# LANGUAGE CPP #-}
- module Basement.Terminal
- ( initialize
-- , getDimensions
- ) where
-
- import Basement.Compat.Base
--import Basement.Terminal.Size (getDimensions)
- #ifdef mingw32_HOST_OS
- import System.IO (hSetEncoding, utf8, hPutStrLn, stderr, stdin, stdout)
- import System.Win32.Console (setConsoleCP, setConsoleOutputCP, getConsoleCP, getConsoleOutputCP)
-diff --git a/basement.cabal b/basement.cabal
-index af50291..0824c94 100644
---- a/basement.cabal
-+++ b/basement.cabal
-@@ -135,7 +135,6 @@ library
- Basement.String.Encoding.ASCII7
- Basement.String.Encoding.ISO_8859_1
-
-- Basement.Terminal.Size
-
-
- build-depends: base >= 4.7 && < 5
---
-2.1.4
-
diff --git a/standalone/android/haskell-patches/certificate_1.3.7-0001-support-Android-cert-store.patch b/standalone/android/haskell-patches/certificate_1.3.7-0001-support-Android-cert-store.patch
deleted file mode 100644
index 5f772bfdfe..0000000000
--- a/standalone/android/haskell-patches/certificate_1.3.7-0001-support-Android-cert-store.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 3779c75175e895f94b21341ebd6361e9d6af54fd Mon Sep 17 00:00:00 2001
-From: Joey Hess <joey@kitenet.net>
-Date: Thu, 9 May 2013 12:36:23 -0400
-Subject: [PATCH] support Android cert store
-
-Android puts it in a different place and has only hashed files.
-See https://github.com/vincenthz/hs-certificate/issues/19
----
- System/Certificate/X509/Unix.hs | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/System/Certificate/X509/Unix.hs b/System/Certificate/X509/Unix.hs
-index 8463465..74e9503 100644
---- a/System/Certificate/X509/Unix.hs
-+++ b/System/Certificate/X509/Unix.hs
-@@ -35,7 +35,8 @@ import qualified Control.Exception as E
- import Data.Char
-
- defaultSystemPath :: FilePath
--defaultSystemPath = "/etc/ssl/certs/"
-+defaultSystemPath = "/system/etc/security/cacerts/"
-+--defaultSystemPath = "/etc/ssl/certs/"
-
- envPathOverride :: String
- envPathOverride = "SYSTEM_CERTIFICATE_PATH"
-@@ -47,7 +48,7 @@ listDirectoryCerts path = (map (path </>) . filter isCert <$> getDirectoryConten
- && isDigit (s !! 9)
- && (s !! 8) == '.'
- && all isHexDigit (take 8 s)
-- isCert x = (not $ isPrefixOf "." x) && (not $ isHashedFile x)
-+ isCert x = (not $ isPrefixOf "." x)
-
- getSystemCertificateStore :: IO CertificateStore
- getSystemCertificateStore = makeCertificateStore . concat <$> (getSystemPath >>= listDirectoryCerts >>= mapM readCertificates)
---
-1.8.2.rc3
-
diff --git a/standalone/android/haskell-patches/clock_hack-for-android.patch b/standalone/android/haskell-patches/clock_hack-for-android.patch
deleted file mode 100644
index d2c39ff539..0000000000
--- a/standalone/android/haskell-patches/clock_hack-for-android.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 5be3bdfc5ec83eaa5defd42e99f73a685123bea0 Mon Sep 17 00:00:00 2001
-From: androidbuilder <androidbuilder@example.com>
-Date: Fri, 22 May 2015 18:35:43 +0000
-Subject: [PATCH] hack for android
-
----
- System/Clock.hsc | 32 ++------------------------------
- 1 file changed, 2 insertions(+), 30 deletions(-)
-
-diff --git a/System/Clock.hsc b/System/Clock.hsc
-index b6a4968..92bcf8b 100644
---- a/System/Clock.hsc
-+++ b/System/Clock.hsc
-@@ -35,8 +35,6 @@ import GHC.Generics (Generic)
- # endif
- #endif
-
--#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)
--
- -- | Clock types. A clock may be system-wide (that is, visible to all processes)
- -- or per-process (measuring time that is meaningful only within a process).
- -- All implementations shall support CLOCK_REALTIME.
-@@ -119,7 +117,7 @@ getTime ThreadCPUTime = allocaAndPeek hs_clock_win32_gettime_threadtime
- #elif defined(__MACH__)
- getTime clk = allocaAndPeek $ hs_clock_darwin_gettime $ clockToConst clk
- #else
--getTime clk = allocaAndPeek $ clock_gettime $ clockToConst clk
-+getTime clk = error "getTime clk not implemented"
- #endif
-
- #if defined(_WIN32)
-@@ -130,7 +128,7 @@ getRes ThreadCPUTime = allocaAndPeek hs_clock_win32_getres_threadtime
- #elif defined(__MACH__)
- getRes clk = allocaAndPeek $ hs_clock_darwin_getres $ clockToConst clk
- #else
--getRes clk = allocaAndPeek $ clock_getres $ clockToConst clk
-+getRes clk = error "getRes clk not implemented"
- #endif
-
- -- | TimeSpec structure
-@@ -139,32 +137,6 @@ data TimeSpec = TimeSpec
- , nsec :: {-# UNPACK #-} !Int64 -- ^ nanoseconds
- } deriving (Eq, Generic, Read, Show, Typeable)
-
--#if defined(_WIN32)
--instance Storable TimeSpec where
-- sizeOf _ = sizeOf (undefined :: Int64) * 2
-- alignment _ = alignment (undefined :: Int64)
-- poke ptr ts = do
-- pokeByteOff ptr 0 (sec ts)
-- pokeByteOff ptr (sizeOf (undefined :: Int64)) (nsec ts)
-- peek ptr = do
-- TimeSpec
-- <$> peekByteOff ptr 0
-- <*> peekByteOff ptr (sizeOf (undefined :: Int64))
--#else
--instance Storable TimeSpec where
-- sizeOf _ = #{size struct timespec}
-- alignment _ = #{alignment struct timespec}
-- poke ptr ts = do
-- let xs :: #{type time_t} = fromIntegral $ sec ts
-- xn :: #{type long} = fromIntegral $ nsec ts
-- #{poke struct timespec, tv_sec} ptr (xs)
-- #{poke struct timespec, tv_nsec} ptr (xn)
-- peek ptr = do
-- xs :: #{type time_t} <- #{peek struct timespec, tv_sec} ptr
-- xn :: #{type long} <- #{peek struct timespec, tv_nsec} ptr
-- return $ TimeSpec (fromIntegral xs) (fromIntegral xn)
--#endif
--
- normalize :: TimeSpec -> TimeSpec
- normalize (TimeSpec xs xn) =
- let (q, r) = xn `divMod` (10^9)
---
-2.1.4
-
diff --git a/standalone/android/haskell-patches/comonad_cross-build.patch b/standalone/android/haskell-patches/comonad_cross-build.patch
deleted file mode 100644
index ee8ae42681..0000000000
--- a/standalone/android/haskell-patches/comonad_cross-build.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 589c6a87ec62e35942c9a86ea8d91b443c80da99 Mon Sep 17 00:00:00 2001
-From: dummy <dummy@example.com>
-Date: Fri, 18 Oct 2013 23:07:02 +0000
-Subject: [PATCH] cross build
-
----
- comonad.cabal | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/comonad.cabal b/comonad.cabal
-index 5d34b13..756ed92 100644
---- a/comonad.cabal
-+++ b/comonad.cabal
-@@ -13,7 +13,7 @@ copyright: Copyright (C) 2008-2013 Edward A. Kmett,
- Copyright (C) 2004-2008 Dave Menendez
- synopsis: Comonads
- description: Comonads
--build-type: Custom
-+build-type: Simple
- extra-source-files:
- .ghci
- .gitignore
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/crypto-numbers_build-fix.patch b/standalone/android/haskell-patches/crypto-numbers_build-fix.patch
deleted file mode 100644
index 5c0693a312..0000000000
--- a/standalone/android/haskell-patches/crypto-numbers_build-fix.patch
+++ /dev/null
@@ -1,227 +0,0 @@
-From 0cfdb30120976290068f4bcbebbf236b960afbb6 Mon Sep 17 00:00:00 2001
-From: dummy <dummy@example.com>
-Date: Thu, 26 Dec 2013 20:01:30 -0400
-Subject: [PATCH] hack to build
-
----
- Crypto/Number/Basic.hs | 14 --------------
- Crypto/Number/ModArithmetic.hs | 29 -----------------------------
- Crypto/Number/Prime.hs | 18 ------------------
- crypto-numbers.cabal | 2 +-
- 4 files changed, 1 insertion(+), 62 deletions(-)
-
-diff --git a/Crypto/Number/Basic.hs b/Crypto/Number/Basic.hs
-index 65c14b3..eaee853 100644
---- a/Crypto/Number/Basic.hs
-+++ b/Crypto/Number/Basic.hs
-@@ -20,11 +20,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
-@@ -63,25 +59,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'
-@@ -105,7 +92,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 942c12f..f8cfc32 100644
---- a/Crypto/Number/ModArithmetic.hs
-+++ b/Crypto/Number/ModArithmetic.hs
-@@ -29,12 +29,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
-@@ -55,13 +51,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
-@@ -74,11 +64,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
-@@ -87,22 +73,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
-@@ -110,7 +89,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
-@@ -122,17 +100,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 0cea9da..458c94d 100644
---- a/Crypto/Number/Prime.hs
-+++ b/Crypto/Number/Prime.hs
-@@ -3,9 +3,7 @@
- #ifndef MIN_VERSION_integer_gmp
- #define MIN_VERSION_integer_gmp(a,b,c) 0
- #endif
--#if MIN_VERSION_integer_gmp(0,5,1)
- {-# LANGUAGE MagicHash #-}
--#endif
- -- |
- -- Module : Crypto.Number.Prime
- -- License : BSD-style
-@@ -30,12 +28,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,
-@@ -78,21 +71,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)
-@@ -129,7 +112,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 9610e34..6669d78 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/distributive_0.4.4_0001-fixes-for-cross-build.patch b/standalone/android/haskell-patches/distributive_0.4.4_0001-fixes-for-cross-build.patch
deleted file mode 100644
index 4229d644d8..0000000000
--- a/standalone/android/haskell-patches/distributive_0.4.4_0001-fixes-for-cross-build.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 86eca0993e1716b4db14570836efbe838626892f Mon Sep 17 00:00:00 2001
-From: dummy <dummy@example.com>
-Date: Sun, 25 May 2014 09:11:15 +0200
-Subject: [PATCH] cross build
-
----
- distributive.cabal | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/distributive.cabal b/distributive.cabal
-index 9be5133..3e72c65 100644
---- a/distributive.cabal
-+++ b/distributive.cabal
-@@ -12,7 +12,7 @@ bug-reports: http://github.com/ekmett/distributive/issues
- copyright: Copyright (C) 2011-2014 Edward A. Kmett
- synopsis: Distributive functors -- Dual to Traversable
- description: Distributive functors -- Dual to Traversable
--build-type: Custom
-+build-type: Simple
- extra-source-files:
- .ghci
- .travis.yml
---
-2.0.0.rc2
-
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
deleted file mode 100644
index 962a642075..0000000000
--- a/standalone/android/haskell-patches/dns_use-android-net.dns1-command-instead-of-resolv.conf.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 087f1ae5e17f0e6d7c9f6b4092a5bb5bb6f5bf60 Mon Sep 17 00:00:00 2001
-From: dummy <dummy@example.com>
-Date: Thu, 16 Oct 2014 02:59:11 +0000
-Subject: [PATCH] port
-
----
- Network/DNS/Resolver.hs | 13 ++++++++-----
- dns.cabal | 1 +
- 2 files changed, 9 insertions(+), 5 deletions(-)
-
-diff --git a/Network/DNS/Resolver.hs b/Network/DNS/Resolver.hs
-index 5721e03..c4400d1 100644
---- a/Network/DNS/Resolver.hs
-+++ b/Network/DNS/Resolver.hs
-@@ -19,7 +19,7 @@ module Network.DNS.Resolver (
- ) 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 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
- 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
-+ 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
-+ [] -> "8.8.8.8" -- google public dns as a fallback only
-+ (l:_) -> l
-
- makeAddrInfo :: HostName -> IO AddrInfo
- makeAddrInfo addr = do
-diff --git a/dns.cabal b/dns.cabal
-index ceaf5f4..cd15e61 100644
---- a/dns.cabal
-+++ b/dns.cabal
-@@ -37,6 +37,7 @@ Library
- , network >= 2.3
- , random
- , resourcet
-+ , process
- else
- Build-Depends: base >= 4 && < 5
- , attoparsec
---
-2.1.1
-
diff --git a/standalone/android/haskell-patches/gsasl_0.3.5-0001-link-with-libgsasl.patch b/standalone/android/haskell-patches/gsasl_0.3.5-0001-link-with-libgsasl.patch
deleted file mode 100644
index 42206a1cf7..0000000000
--- a/standalone/android/haskell-patches/gsasl_0.3.5-0001-link-with-libgsasl.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From df0f41f92d003f7d59ef927737ffec3a9bd61827 Mon Sep 17 00:00:00 2001
-From: Joey Hess <joey@kitenet.net>
-Date: Tue, 7 May 2013 18:41:01 -0400
-Subject: [PATCH] avoid cabal hell
-
----
- gsasl.cabal | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gsasl.cabal b/gsasl.cabal
-index d991873..c5c2b19 100644
---- a/gsasl.cabal
-+++ b/gsasl.cabal
-@@ -31,7 +31,7 @@ library
- build-depends:
- base >= 4.0 && < 5.0
- , transformers >= 0.2
-- , bytestring >= 0.9
-+ , bytestring >= 0.10.3.0
-
- pkgconfig-depends: libgsasl >= 1.1
-
---
-1.7.10.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
deleted file mode 100644
index bb9caec770..0000000000
--- a/standalone/android/haskell-patches/iproute_1.2.11_0001-build-without-IPv6-stuff.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 7beec2e707d59f9573aa2dc7c57bd2a62f16b480 Mon Sep 17 00:00:00 2001
-From: Joey Hess <joey@kitenet.net>
-Date: Wed, 15 May 2013 19:06:03 -0400
-Subject: [PATCH] build without IPv6 stuff
-
----
- 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
---- 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
- -- ** IP range data
- , IPRange (..)
- , AddrRange (addr, mask, mlen)
-diff --git a/Data/IP/Addr.hs b/Data/IP/Addr.hs
-index faaf0c7..5b556fb 100644
---- a/Data/IP/Addr.hs
-+++ b/Data/IP/Addr.hs
-@@ -312,6 +312,7 @@ toHostAddress (IP4 addr4)
- | byteOrder == LittleEndian = fixByteOrder addr4
- | otherwise = addr4
-
-+{-
- -- | The 'fromHostAddress6' function converts 'HostAddress6' to 'IPv6'.
- fromHostAddress6 :: HostAddress6 -> IPv6
- fromHostAddress6 = IP6
-@@ -320,6 +321,8 @@ fromHostAddress6 = IP6
- toHostAddress6 :: IPv6 -> HostAddress6
- toHostAddress6 (IP6 addr6) = addr6
-
-+-}
-+
- fixByteOrder :: Word32 -> Word32
- fixByteOrder s = d1 .|. d2 .|. d3 .|. d4
- where
---
-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
deleted file mode 100644
index 6182cba442..0000000000
--- a/standalone/android/haskell-patches/language-javascript_fix-build-with-new-ghc.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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/network_android-port-fixes.patch b/standalone/android/haskell-patches/network_android-port-fixes.patch
deleted file mode 100644
index 784eec13a9..0000000000
--- a/standalone/android/haskell-patches/network_android-port-fixes.patch
+++ /dev/null
@@ -1,341 +0,0 @@
-From 834a0d3bfe56b969a65eff834604442cde8798f7 Mon Sep 17 00:00:00 2001
-From: dummy <dummy@example.com>
-Date: Wed, 20 Jun 2018 05:06:41 +0100
-Subject: [PATCH] android port fixes
-
-Build note: Ensure a hsc2hs in PATH is modified to pass -x to the real
-one, to enable cross-compiling.
----
- Network/BSD.hsc | 84 -------------------------------------------
- Network/Socket.hsc | 16 ++++-----
- Network/Socket/ByteString.hsc | 2 +-
- Network/Socket/Internal.hsc | 2 +-
- Network/Socket/Types.hsc | 14 +++-----
- cbits/HsNet.c | 18 ++++++++++
- configure | 1 +
- include/HsNetworkConfig.h | 4 +--
- 8 files changed, 36 insertions(+), 105 deletions(-)
-
-diff --git a/Network/BSD.hsc b/Network/BSD.hsc
-index 67f2fcd..4c86af5 100644
---- a/Network/BSD.hsc
-+++ b/Network/BSD.hsc
-@@ -28,12 +28,8 @@ module Network.BSD
- , hostAddress
-
- #if defined(HAVE_GETHOSTENT) && !defined(mingw32_HOST_OS)
-- , getHostEntries
--
- -- ** Low level functionality
-- , setHostEntry
- , getHostEntry
-- , endHostEntry
- #endif
-
- -- * Service names
-@@ -61,14 +57,6 @@ module Network.BSD
- , getProtocolNumber
- , defaultProtocol
-
--#if !defined(mingw32_HOST_OS)
-- , getProtocolEntries
-- -- ** Low level functionality
-- , setProtocolEntry
-- , getProtocolEntry
-- , endProtocolEntry
--#endif
--
- -- * Port numbers
- , PortNumber
-
-@@ -80,11 +68,6 @@ module Network.BSD
- #if !defined(mingw32_HOST_OS)
- , getNetworkByName
- , getNetworkByAddr
-- , getNetworkEntries
-- -- ** Low level functionality
-- , setNetworkEntry
-- , getNetworkEntry
-- , endNetworkEntry
- #endif
-
- #if defined(HAVE_IF_NAMETOINDEX)
-@@ -298,30 +281,6 @@ getProtocolNumber proto = do
- (ProtocolEntry _ _ num) <- getProtocolByName proto
- return num
-
--#if !defined(mingw32_HOST_OS)
--getProtocolEntry :: IO ProtocolEntry -- Next Protocol Entry from DB
--getProtocolEntry = withLock $ do
-- ent <- throwNoSuchThingIfNull "getProtocolEntry" "no such protocol entry"
-- $ c_getprotoent
-- peek ent
--
--foreign import ccall unsafe "getprotoent" c_getprotoent :: IO (Ptr ProtocolEntry)
--
--setProtocolEntry :: Bool -> IO () -- Keep DB Open ?
--setProtocolEntry flg = withLock $ c_setprotoent (fromBool flg)
--
--foreign import ccall unsafe "setprotoent" c_setprotoent :: CInt -> IO ()
--
--endProtocolEntry :: IO ()
--endProtocolEntry = withLock $ c_endprotoent
--
--foreign import ccall unsafe "endprotoent" c_endprotoent :: IO ()
--
--getProtocolEntries :: Bool -> IO [ProtocolEntry]
--getProtocolEntries stayOpen = withLock $ do
-- setProtocolEntry stayOpen
-- getEntries (getProtocolEntry) (endProtocolEntry)
--#endif
-
- -- ---------------------------------------------------------------------------
- -- Host lookups
-@@ -405,21 +364,6 @@ getHostEntry = withLock $ do
- >>= peek
-
- foreign import ccall unsafe "gethostent" c_gethostent :: IO (Ptr HostEntry)
--
--setHostEntry :: Bool -> IO ()
--setHostEntry flg = withLock $ c_sethostent (fromBool flg)
--
--foreign import ccall unsafe "sethostent" c_sethostent :: CInt -> IO ()
--
--endHostEntry :: IO ()
--endHostEntry = withLock $ c_endhostent
--
--foreign import ccall unsafe "endhostent" c_endhostent :: IO ()
--
--getHostEntries :: Bool -> IO [HostEntry]
--getHostEntries stayOpen = do
-- setHostEntry stayOpen
-- getEntries (getHostEntry) (endHostEntry)
- #endif
-
- -- ---------------------------------------------------------------------------
-@@ -482,34 +426,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"
-- $ c_getnetent
-- >>= peek
--
--foreign import ccall unsafe "getnetent" c_getnetent :: IO (Ptr NetworkEntry)
--
---- | Open the network name database. The parameter specifies
---- whether a connection is maintained open between various
---- networkEntry calls
--setNetworkEntry :: Bool -> IO ()
--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 $ c_endnetent
--
--foreign import ccall unsafe "endnetent" c_endnetent :: IO ()
--
---- | Get the list of network entries.
--getNetworkEntries :: Bool -> IO [NetworkEntry]
--getNetworkEntries stayOpen = do
-- setNetworkEntry stayOpen
-- getEntries (getNetworkEntry) (endNetworkEntry)
- #endif
-
- -- ---------------------------------------------------------------------------
-diff --git a/Network/Socket.hsc b/Network/Socket.hsc
-index 8b2e6fe..b02b80d 100644
---- a/Network/Socket.hsc
-+++ b/Network/Socket.hsc
-@@ -59,7 +59,7 @@ module Network.Socket
- , HostName
- , ServiceName
-
--#if defined(IPV6_SOCKET_SUPPORT)
-+#if defined(IPV6_SOCKET_SUPPORT) || 1
- , AddrInfo(..)
-
- , AddrInfoFlag(..)
-@@ -143,7 +143,7 @@ module Network.Socket
- -- * Special constants
- , aNY_PORT
- , iNADDR_ANY
--#if defined(IPV6_SOCKET_SUPPORT)
-+#if defined(IPV6_SOCKET_SUPPORTNO)
- , iN6ADDR_ANY
- #endif
- , sOMAXCONN
-@@ -521,7 +521,7 @@ accept sock@(MkSocket s family stype protocol status) = do
- return new_sock
- #else
- with (fromIntegral sz) $ \ ptr_len -> do
--# ifdef HAVE_ACCEPT4
-+#if 0
- new_sock <- throwSocketErrorIfMinus1RetryMayBlock "accept"
- (threadWaitRead (fromIntegral s))
- (c_accept4 s sockaddr ptr_len (#const SOCK_NONBLOCK))
-@@ -903,7 +903,7 @@ packSocketOption so =
- Just MaxSegment -> Just ((#const IPPROTO_TCP), (#const TCP_MAXSEG))
- #endif
- #ifdef TCP_NODELAY
-- Just NoDelay -> Just ((#const IPPROTO_TCP), (#const TCP_NODELAY))
-+ Just NoDelay -> Nothing -- Just ((#const IPPROTO_TCP), (#const TCP_NODELAY))
- #endif
- #ifdef TCP_USER_TIMEOUT
- Just UserTimeout -> Just ((#const IPPROTO_TCP), (#const TCP_USER_TIMEOUT))
-@@ -1036,9 +1036,9 @@ iNADDR_ANY :: HostAddress
- iNADDR_ANY = htonl (#const INADDR_ANY)
-
- -- | Converts the from host byte order to network byte order.
--foreign import CALLCONV unsafe "htonl" htonl :: Word32 -> Word32
-+foreign import CALLCONV unsafe "my_htonl" htonl :: Word32 -> Word32
- -- | Converts the from network byte order to host byte order.
--foreign import CALLCONV unsafe "ntohl" ntohl :: Word32 -> Word32
-+foreign import CALLCONV unsafe "my_ntohl" ntohl :: Word32 -> Word32
-
- #if defined(IPV6_SOCKET_SUPPORT)
- -- | The IPv6 wild card address.
-@@ -1206,7 +1206,7 @@ unpackBits ((k,v):xs) r
- -----------------------------------------------------------------------------
- -- Address and service lookups
-
--#if defined(IPV6_SOCKET_SUPPORT)
-+#if defined(IPV6_SOCKET_SUPPORT) || 1
-
- -- | Flags that control the querying behaviour of 'getAddrInfo'.
- -- For more information, see <https://tools.ietf.org/html/rfc3493#page-25>
-@@ -1568,7 +1568,7 @@ foreign import CALLCONV unsafe "bind"
- c_bind :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt
- foreign import CALLCONV SAFE_ON_WIN "connect"
- c_connect :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt
--#ifdef HAVE_ACCEPT4
-+#if 0
- foreign import CALLCONV unsafe "accept4"
- c_accept4 :: CInt -> Ptr SockAddr -> Ptr CInt{-CSockLen???-} -> CInt -> IO CInt
- #else
-diff --git a/Network/Socket/ByteString.hsc b/Network/Socket/ByteString.hsc
-index 93e29c9..a736932 100644
---- a/Network/Socket/ByteString.hsc
-+++ b/Network/Socket/ByteString.hsc
-@@ -177,7 +177,7 @@ sendMany sock@(MkSocket fd _ _ _ _) cs = do
- liftM fromIntegral . withIOVec cs $ \(iovsPtr, iovsLen) ->
- throwSocketErrorWaitWrite sock "writev" $
- c_writev (fromIntegral fd) iovsPtr
-- (fromIntegral (min iovsLen (#const IOV_MAX)))
-+ (fromIntegral (min iovsLen (0x0026)))
- #else
- sendMany sock = sendAll sock . B.concat
- #endif
-diff --git a/Network/Socket/Internal.hsc b/Network/Socket/Internal.hsc
-index c8bf4f6..2463bd7 100644
---- a/Network/Socket/Internal.hsc
-+++ b/Network/Socket/Internal.hsc
-@@ -24,7 +24,7 @@ module Network.Socket.Internal
- (
- -- * Socket addresses
- HostAddress
--#if defined(IPV6_SOCKET_SUPPORT)
-+#if defined(IPV6_SOCKET_SUPPORTNO)
- , HostAddress6
- , FlowInfo
- , ScopeID
-diff --git a/Network/Socket/Types.hsc b/Network/Socket/Types.hsc
-index b42c98d..e5bb9fe 100644
---- a/Network/Socket/Types.hsc
-+++ b/Network/Socket/Types.hsc
-@@ -758,10 +758,10 @@ intToPortNumber v = PortNum (htons (fromIntegral v))
- portNumberToInt :: PortNumber -> Int
- portNumberToInt (PortNum po) = fromIntegral (ntohs po)
-
--foreign import CALLCONV unsafe "ntohs" ntohs :: Word16 -> Word16
--foreign import CALLCONV unsafe "htons" htons :: Word16 -> Word16
--foreign import CALLCONV unsafe "ntohl" ntohl :: Word32 -> Word32
--foreign import CALLCONV unsafe "htonl" htonl :: Word32 -> Word32
-+foreign import CALLCONV unsafe "my_ntohs" ntohs :: Word16 -> Word16
-+foreign import CALLCONV unsafe "my_htons" htons :: Word16 -> Word16
-+foreign import CALLCONV unsafe "my_ntohl" ntohl :: Word32 -> Word32
-+foreign import CALLCONV unsafe "my_htonl" htonl :: Word32 -> Word32
-
- instance Enum PortNumber where
- toEnum = intToPortNumber
-@@ -1071,13 +1071,9 @@ poke32 p i0 a = do
- -- | Private newtype proxy for the Storable instance. To avoid orphan instances.
- newtype In6Addr = In6Addr HostAddress6
-
--#if __GLASGOW_HASKELL__ < 800
--#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)
--#endif
--
- instance Storable In6Addr where
- sizeOf _ = #const sizeof(struct in6_addr)
-- alignment _ = #alignment struct in6_addr
-+ alignment _ = 64
-
- peek p = do
- a <- peek32 p 0
-diff --git a/cbits/HsNet.c b/cbits/HsNet.c
-index 86b55dc..6225c32 100644
---- a/cbits/HsNet.c
-+++ b/cbits/HsNet.c
-@@ -6,3 +6,21 @@
-
- #define INLINE
- #include "HsNet.h"
-+
-+#include <sys/endian.h>
-+uint16_t my_htons(uint16_t v)
-+{
-+ htons(v);
-+}
-+uint32_t my_htonl(uint32_t v)
-+{
-+ htonl(v);
-+}
-+uint16_t my_ntohs(uint16_t v)
-+{
-+ ntohs(v);
-+}
-+uint32_t my_ntohl(uint32_t v)
-+{
-+ ntohl(v);
-+}
-diff --git a/configure b/configure
-index 9e82879..24ef3ce 100755
---- a/configure
-+++ b/configure
-@@ -1,4 +1,5 @@
- #! /bin/sh
-+set -- --host=arm-linux-androideabi
- # Guess values for system-dependent variables and create Makefiles.
- # Generated by GNU Autoconf 2.69 for Haskell network package 2.3.0.14.
- #
-diff --git a/include/HsNetworkConfig.h b/include/HsNetworkConfig.h
-index 383f6e2..62b8852 100644
---- a/include/HsNetworkConfig.h
-+++ b/include/HsNetworkConfig.h
-@@ -2,7 +2,7 @@
- /* include/HsNetworkConfig.h.in. Generated from configure.ac by autoheader. */
-
- /* Define to 1 if you have the `accept4' function. */
--#define HAVE_ACCEPT4 1
-+/* #undef HAVE_ACCEPT4 */
-
- /* Define to 1 if you have the <arpa/inet.h> header file. */
- #define HAVE_ARPA_INET_H 1
-@@ -73,7 +73,7 @@
- #define HAVE_LIMITS_H 1
-
- /* Define to 1 if you have the <linux/can.h> header file. */
--#define HAVE_LINUX_CAN_H 1
-+/* #undef HAVE_LINUX_CAN_H */
-
- /* Define to 1 if you have a Linux sendfile(2) implementation. */
- #define HAVE_LINUX_SENDFILE 1
---
-2.1.4
-
diff --git a/standalone/android/haskell-patches/primitive_0.5.3.0_0001-disable-i386-opt-stuff-to-allow-cross-compilation.patch b/standalone/android/haskell-patches/primitive_0.5.3.0_0001-disable-i386-opt-stuff-to-allow-cross-compilation.patch
deleted file mode 100644
index efee692b51..0000000000
--- a/standalone/android/haskell-patches/primitive_0.5.3.0_0001-disable-i386-opt-stuff-to-allow-cross-compilation.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From ff2d1519fb294a123636ac6bd80e50741922c856 Mon Sep 17 00:00:00 2001
-From: dummy <dummy@example.com>
-Date: Sun, 25 May 2014 09:41:13 +0200
-Subject: [PATCH] disable i386 opt stuff to allow cross-compilation
-
----
- primitive.cabal | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/primitive.cabal b/primitive.cabal
-index 9651dfd..b655e8d 100644
---- a/primitive.cabal
-+++ b/primitive.cabal
-@@ -47,8 +47,6 @@ Library
- cc-options: -O3 -fomit-frame-pointer -Wall
- if !os(solaris)
- cc-options: -ftree-vectorize
-- if arch(i386) || arch(x86_64)
-- cc-options: -msse2
-
- source-repository head
- type: git
---
-2.0.0.rc2
-
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
deleted file mode 100644
index c9723f3f76..0000000000
--- a/standalone/android/haskell-patches/socks_0.4.2_0001-remove-IPv6-stuff.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-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 +-------
- Network/Socks5/Conf.hs | 1 -
- Network/Socks5/Lowlevel.hs | 1 -
- Network/Socks5/Types.hs | 18 +-----------------
- Network/Socks5/Wire.hs | 2 --
- 5 files changed, 2 insertions(+), 28 deletions(-)
-
-diff --git a/Network/Socks5/Command.hs b/Network/Socks5/Command.hs
-index db95fbd..fdba5ec 100644
---- a/Network/Socks5/Command.hs
-+++ b/Network/Socks5/Command.hs
-@@ -13,7 +13,6 @@ module Network.Socks5.Command
- , Connect(..)
- , Command(..)
- , connectIPV4
-- , connectIPV6
- , connectDomainName
- -- * lowlevel interface
- , rpc
-@@ -29,7 +28,7 @@ import qualified Data.ByteString as B
- import qualified Data.ByteString.Char8 as BC
- import Data.Serialize
-
--import Network.Socket (Socket, PortNumber, HostAddress, HostAddress6)
-+import Network.Socket (Socket, PortNumber, HostAddress)
- import Network.Socket.ByteString
-
- import Network.Socks5.Types
-@@ -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"
-
--connectIPV6 :: Socket -> HostAddress6 -> PortNumber -> IO (HostAddress6, PortNumber)
--connectIPV6 socket hostaddr6 port = onReply <$> rpc_ socket (Connect $ SocksAddress (SocksAddrIPV6 hostaddr6) port)
-- where onReply (SocksAddrIPV6 h, p) = (h, p)
-- onReply _ = error "ipv6 requested, got something different"
--
- -- TODO: FQDN should only be ascii, maybe putting a "fqdn" data type
- -- in front to make sure and make the BC.pack safe.
- connectDomainName :: Socket -> String -> PortNumber -> IO (SocksHostAddress, PortNumber)
-diff --git a/Network/Socks5/Conf.hs b/Network/Socks5/Conf.hs
-index c29ff7b..007d382 100644
---- a/Network/Socks5/Conf.hs
-+++ b/Network/Socks5/Conf.hs
-@@ -47,5 +47,4 @@ defaultSocksConfFromSockAddr sockaddr = SocksConf server SocksVer5
- where server = SocksAddress haddr port
- (haddr,port) = case sockaddr of
- SockAddrInet p h -> (SocksAddrIPV4 h, p)
-- SockAddrInet6 p _ h _ -> (SocksAddrIPV6 h, p)
- _ -> error "unsupported unix sockaddr type"
-diff --git a/Network/Socks5/Lowlevel.hs b/Network/Socks5/Lowlevel.hs
-index c10d9b9..2c3d59c 100644
---- a/Network/Socks5/Lowlevel.hs
-+++ b/Network/Socks5/Lowlevel.hs
-@@ -17,7 +17,6 @@ resolveToSockAddr :: SocksAddress -> IO SockAddr
- resolveToSockAddr (SocksAddress sockHostAddr port) =
- case sockHostAddr of
- SocksAddrIPV4 ha -> return $ SockAddrInet port ha
-- SocksAddrIPV6 ha6 -> return $ SockAddrInet6 port 0 ha6 0
- SocksAddrDomainName bs -> do he <- getHostByName (BC.unpack bs)
- return $ SockAddrInet port (hostAddress he)
-
-diff --git a/Network/Socks5/Types.hs b/Network/Socks5/Types.hs
-index 7fbec25..17c7c83 100644
---- a/Network/Socks5/Types.hs
-+++ b/Network/Socks5/Types.hs
-@@ -19,7 +19,7 @@ module Network.Socks5.Types
- import Data.ByteString (ByteString)
- import Data.Word
- import Data.Data
--import Network.Socket (HostAddress, HostAddress6, PortNumber)
-+import Network.Socket (HostAddress, PortNumber)
- import Control.Exception
- import qualified Data.ByteString.Char8 as BC
- import Numeric (showHex)
-@@ -53,12 +53,10 @@ data SocksMethod =
- data SocksHostAddress =
- SocksAddrIPV4 !HostAddress
- | SocksAddrDomainName !ByteString
-- | SocksAddrIPV6 !HostAddress6
- deriving (Eq,Ord)
-
- instance Show SocksHostAddress where
- show (SocksAddrIPV4 ha) = "SocksAddrIPV4(" ++ showHostAddress ha ++ ")"
-- show (SocksAddrIPV6 ha6) = "SocksAddrIPV6(" ++ showHostAddress6 ha6 ++ ")"
- show (SocksAddrDomainName dn) = "SocksAddrDomainName(" ++ BC.unpack dn ++ ")"
-
- -- | Converts a HostAddress to a String in dot-decimal notation
-@@ -69,20 +67,6 @@ showHostAddress num = concat [show q1, ".", show q2, ".", show q3, ".", show q4]
- (num''',q3) = num'' `quotRem` 256
- (_,q4) = num''' `quotRem` 256
-
---- | Converts a IPv6 HostAddress6 to standard hex notation
--showHostAddress6 :: HostAddress6 -> String
--showHostAddress6 (a,b,c,d) =
-- (concat . intersperse ":" . map (flip showHex ""))
-- [p1,p2,p3,p4,p5,p6,p7,p8]
-- where (a',p2) = a `quotRem` 65536
-- (_,p1) = a' `quotRem` 65536
-- (b',p4) = b `quotRem` 65536
-- (_,p3) = b' `quotRem` 65536
-- (c',p6) = c `quotRem` 65536
-- (_,p5) = c' `quotRem` 65536
-- (d',p8) = d `quotRem` 65536
-- (_,p7) = d' `quotRem` 65536
--
- -- | Describe a Socket address on the SOCKS protocol
- data SocksAddress = SocksAddress !SocksHostAddress !PortNumber
- deriving (Show,Eq,Ord)
-diff --git a/Network/Socks5/Wire.hs b/Network/Socks5/Wire.hs
-index 10bd262..a30f32e 100644
---- a/Network/Socks5/Wire.hs
-+++ b/Network/Socks5/Wire.hs
-@@ -46,12 +46,10 @@ data SocksResponse = SocksResponse
-
- getAddr 1 = SocksAddrIPV4 <$> getWord32host
- getAddr 3 = SocksAddrDomainName <$> (getWord8 >>= getByteString . fromIntegral)
--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
- putAddr (SocksAddrDomainName b) = putWord8 3 >> putWord8 (fromIntegral $ B.length b) >> putByteString b
--putAddr (SocksAddrIPV6 (a,b,c,d)) = putWord8 4 >> mapM_ putWord32host [a,b,c,d]
-
- getSocksRequest 5 = do
- cmd <- toEnum . fromIntegral <$> getWord8
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/stm-chans_cross-build.patch b/standalone/android/haskell-patches/stm-chans_cross-build.patch
deleted file mode 100644
index f0964d693e..0000000000
--- a/standalone/android/haskell-patches/stm-chans_cross-build.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From c1b166ad1dbed80f7eed7b9c1b2dc5c668eeb8fc Mon Sep 17 00:00:00 2001
-From: androidbuilder <androidbuilder@example.com>
-Date: Fri, 18 Oct 2013 23:28:56 +0000
-Subject: [PATCH] cross build
-
----
- stm-chans.cabal | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/stm-chans.cabal b/stm-chans.cabal
-index 89d4780..2119a74 100644
---- a/stm-chans.cabal
-+++ b/stm-chans.cabal
-@@ -6,7 +6,7 @@
- -- and source-repository:.
- Cabal-Version: >= 1.6
- -- We need a custom build in order to define __HADDOCK__
--Build-Type: Custom
-+Build-Type: Simple
-
- Name: stm-chans
- Version: 3.0.0
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/system-filepath_cross-build.patch b/standalone/android/haskell-patches/system-filepath_cross-build.patch
deleted file mode 100644
index c9f9304a48..0000000000
--- a/standalone/android/haskell-patches/system-filepath_cross-build.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 0e728d5b049224394908d793c73902a8c981e636 Mon Sep 17 00:00:00 2001
-From: dummy <dummy@example.com>
-Date: Mon, 26 May 2014 01:04:40 +0000
-Subject: [PATCH] fix cross build
-
----
- system-filepath.cabal | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/system-filepath.cabal b/system-filepath.cabal
-index d6aa726..f4e5e0f 100644
---- a/system-filepath.cabal
-+++ b/system-filepath.cabal
-@@ -6,7 +6,7 @@ license-file: license.txt
- author: John Millikin <jmillikin@gmail.com>
- maintainer: John Millikin <jmillikin@gmail.com>
- copyright: John Millikin 2010-2012
--build-type: Custom
-+build-type: Simple
- cabal-version: >= 1.8
- category: System
- stability: experimental
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/unbounded-delays_crossbuild.patch b/standalone/android/haskell-patches/unbounded-delays_crossbuild.patch
deleted file mode 100644
index dd0a7fca90..0000000000
--- a/standalone/android/haskell-patches/unbounded-delays_crossbuild.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 0ad071f80ee72e7b8ca5b0b70dfae5bbf8677969 Mon Sep 17 00:00:00 2001
-From: Joey Hess <joey@kitenet.net>
-Date: Wed, 12 Mar 2014 12:18:17 -0400
-Subject: [PATCH] cross build
-
----
- unbounded-delays.cabal | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/unbounded-delays.cabal b/unbounded-delays.cabal
-index 76d0a50..0f27569 100644
---- a/unbounded-delays.cabal
-+++ b/unbounded-delays.cabal
-@@ -1,7 +1,7 @@
- name: unbounded-delays
- version: 0.1.0.6
- cabal-version: >= 1.6
--build-type: Custom
-+build-type: Simple
- author: Bas van Dijk <v.dijk.bas@gmail.com>
- Roel van Dijk <vandijk.roel@gmail.com>
- maintainer: Bas van Dijk <v.dijk.bas@gmail.com>
---
-1.7.10.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
deleted file mode 100644
index 16c4f92a21..0000000000
--- a/standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From db9eb179885874af342bb2c3adef7185496ba1f1 Mon Sep 17 00:00:00 2001
-From: dummy <dummy@example.com>
-Date: Wed, 15 Oct 2014 16:37:32 +0000
-Subject: [PATCH] hack for bionic
-
----
- Data/UnixTime/Types.hsc | 12 ------------
- cbits/conv.c | 2 +-
- 2 files changed, 1 insertion(+), 13 deletions(-)
-
-diff --git a/Data/UnixTime/Types.hsc b/Data/UnixTime/Types.hsc
-index d30f39b..ec7ca4c 100644
---- a/Data/UnixTime/Types.hsc
-+++ b/Data/UnixTime/Types.hsc
-@@ -9,8 +9,6 @@ import Foreign.Storable
-
- #include <sys/time.h>
-
--#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)
--
- -- |
- -- Data structure for Unix time.
- data UnixTime = UnixTime {
-@@ -20,16 +18,6 @@ data UnixTime = UnixTime {
- , utMicroSeconds :: {-# UNPACK #-} !Int32
- } deriving (Eq,Ord,Show)
-
--instance Storable UnixTime where
-- sizeOf _ = (#size struct timeval)
-- alignment _ = (#alignment struct timeval)
-- peek ptr = UnixTime
-- <$> (#peek struct timeval, tv_sec) ptr
-- <*> (#peek struct timeval, tv_usec) ptr
-- poke ptr ut = do
-- (#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
-diff --git a/cbits/conv.c b/cbits/conv.c
-index ec31fef..b7bc0f9 100644
---- a/cbits/conv.c
-+++ b/cbits/conv.c
-@@ -96,7 +96,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) {
---
-2.1.1
-
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
deleted file mode 100644
index 12cb2a922c..0000000000
--- a/standalone/android/haskell-patches/uuid_build-without-v1-uuid-which-needs-network-info.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-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/warp_remove-ipv6-stuff.patch b/standalone/android/haskell-patches/warp_remove-ipv6-stuff.patch
deleted file mode 100644
index cc5368f6b4..0000000000
--- a/standalone/android/haskell-patches/warp_remove-ipv6-stuff.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 2f1d2eddde94d339d91d7b018dc90542b7625fd3 Mon Sep 17 00:00:00 2001
-From: androidbuilder <androidbuilder@example.com>
-Date: Wed, 20 Jun 2018 14:41:04 +0100
-Subject: [PATCH] remove ipv6 stuff
-
----
- 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 116b24e..5c7cbcb 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)
-@@ -305,13 +305,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
-
diff --git a/standalone/android/haskell-patches/x509-store_support-Android-cert-store.patch b/standalone/android/haskell-patches/x509-store_support-Android-cert-store.patch
deleted file mode 100644
index 1683f49745..0000000000
--- a/standalone/android/haskell-patches/x509-store_support-Android-cert-store.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 717945172c2f3ff95cce9db2d075122bccfc9a1a Mon Sep 17 00:00:00 2001
-From: androidbuilder <androidbuilder@example.com>
-Date: Wed, 20 Jun 2018 02:01:30 +0100
-Subject: [PATCH] support Android cert store
-
-Android has only hashsed cert files.
-See https://github.com/vincenthz/hs-certificate/issues/19
----
- Data/X509/CertificateStore.hs | 2 +-
- 2 files changed, 1 insertion(+), 1 deletion(-)
- delete mode 100644 Data/X509/.CertificateStore.hs.swp
-
-diff --git a/Data/X509/CertificateStore.hs b/Data/X509/CertificateStore.hs
-index 07449a2..74b8bde 100644
---- a/Data/X509/CertificateStore.hs
-+++ b/Data/X509/CertificateStore.hs
-@@ -106,7 +106,7 @@ listDirectoryCerts path =
- && isDigit (s !! 9)
- && (s !! 8) == '.'
- && all isHexDigit (take 8 s)
-- isCert x = (not $ isPrefixOf "." x) && (not $ isHashedFile x)
-+ isCert x = (not $ isPrefixOf "." x)
-
- getDirContents = E.catch (map (path </>) . filter isCert <$> getDirectoryContents path) emptyPaths
- where emptyPaths :: E.IOException -> IO [FilePath]
---
-2.1.4
-
diff --git a/standalone/android/haskell-patches/xss-sanitize_deps.patch b/standalone/android/haskell-patches/xss-sanitize_deps.patch
deleted file mode 100644
index 0f0cfd9256..0000000000
--- a/standalone/android/haskell-patches/xss-sanitize_deps.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 41eb8ab50125eb6ccf260c5510407483f1d78dd4 Mon Sep 17 00:00:00 2001
-From: dummy <dummy@example.com>
-Date: Wed, 20 Jun 2018 14:52:52 +0100
-Subject: [PATCH] deps
-
----
- xss-sanitize.cabal | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/xss-sanitize.cabal b/xss-sanitize.cabal
-index 727dc95..2de4270 100644
---- a/xss-sanitize.cabal
-+++ b/xss-sanitize.cabal
-@@ -19,6 +19,7 @@ library
- , tagsoup >= 0.12.2 && < 1
- , utf8-string >= 0.3 && < 1
- , network >= 2 && < 3
-+ , network-uri
- , css-text >= 0.1.1 && < 0.2
- , text >= 0.11 && < 2
- , attoparsec >= 0.10.0.3 && < 1
---
-2.1.4
-
diff --git a/standalone/android/haskell-patches/zlib_0.5.4.0_0001-hack-to-build-on-Android.patch b/standalone/android/haskell-patches/zlib_0.5.4.0_0001-hack-to-build-on-Android.patch
deleted file mode 100644
index a899fb8920..0000000000
--- a/standalone/android/haskell-patches/zlib_0.5.4.0_0001-hack-to-build-on-Android.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 63d07ae4a1e3b77cbe023364599f7c2c3e853d5f Mon Sep 17 00:00:00 2001
-From: Joey Hess <joey@kitenet.net>
-Date: Thu, 28 Feb 2013 23:40:57 -0400
-Subject: [PATCH] hack to build on Android
-
----
- Codec/Compression/Zlib/Stream.hsc | 4 ++--
- zlib.cabal | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/Codec/Compression/Zlib/Stream.hsc b/Codec/Compression/Zlib/Stream.hsc
-index fe851e6..c6168f4 100644
---- a/Codec/Compression/Zlib/Stream.hsc
-+++ b/Codec/Compression/Zlib/Stream.hsc
-@@ -921,7 +921,7 @@ foreign import ccall unsafe "zlib.h inflateInit2_"
-
- c_inflateInit2 :: StreamState -> CInt -> IO CInt
- c_inflateInit2 z n =
-- withCAString #{const_str ZLIB_VERSION} $ \versionStr ->
-+ withCAString "1.2.5" $ \versionStr ->
- c_inflateInit2_ z n versionStr (#{const sizeof(z_stream)} :: CInt)
-
- foreign import ccall unsafe "zlib.h inflate"
-@@ -940,7 +940,7 @@ foreign import ccall unsafe "zlib.h deflateInit2_"
- c_deflateInit2 :: StreamState
- -> CInt -> CInt -> CInt -> CInt -> CInt -> IO CInt
- c_deflateInit2 z a b c d e =
-- withCAString #{const_str ZLIB_VERSION} $ \versionStr ->
-+ withCAString "1.2.5" $ \versionStr ->
- c_deflateInit2_ z a b c d e versionStr (#{const sizeof(z_stream)} :: CInt)
-
- foreign import ccall unsafe "zlib.h deflateSetDictionary"
---
-1.7.10.4
-