diff options
author | 2015-07-02 23:02:48 -0400 | |
---|---|---|
committer | 2015-07-02 23:02:48 -0400 | |
commit | 0bf027f0a2abe492b12cd12d94379e92ced24c59 (patch) | |
tree | 5e24ed78a97b93b670aa29a0788cd6036b24cf57 /standalone/android | |
parent | e1e337be2ece90232a3b3e06f4ea69b4fab42d21 (diff) |
remove some patches that are no longer used
Diffstat (limited to 'standalone/android')
7 files changed, 86 insertions, 437 deletions
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 5c0693a31..000000000 --- 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/gnuidn_fix-build-with-new-base.patch b/standalone/android/haskell-patches/gnuidn_fix-build-with-new-base.patch deleted file mode 100644 index ff9d8f245..000000000 --- a/standalone/android/haskell-patches/gnuidn_fix-build-with-new-base.patch +++ /dev/null @@ -1,50 +0,0 @@ -From afdec6c9e66211a0ac8419fffe191b059d1fd00c Mon Sep 17 00:00:00 2001 -From: foo <foo@bar> -Date: Sun, 22 Sep 2013 17:24:33 +0000 -Subject: [PATCH] fix build with new base - ---- - Data/Text/IDN/IDNA.chs | 1 + - Data/Text/IDN/Punycode.chs | 1 + - Data/Text/IDN/StringPrep.chs | 1 + - 3 files changed, 3 insertions(+) - -diff --git a/Data/Text/IDN/IDNA.chs b/Data/Text/IDN/IDNA.chs -index ed29ee4..dbb4ba5 100644 ---- a/Data/Text/IDN/IDNA.chs -+++ b/Data/Text/IDN/IDNA.chs -@@ -31,6 +31,7 @@ import Foreign - import Foreign.C - - import Data.Text.IDN.Internal -+import System.IO.Unsafe - - #include <idna.h> - #include <idn-free.h> -diff --git a/Data/Text/IDN/Punycode.chs b/Data/Text/IDN/Punycode.chs -index 24b5fa6..4e62555 100644 ---- a/Data/Text/IDN/Punycode.chs -+++ b/Data/Text/IDN/Punycode.chs -@@ -32,6 +32,7 @@ import Data.List (unfoldr) - import qualified Data.ByteString as B - import qualified Data.Text as T - -+import System.IO.Unsafe - import Foreign - import Foreign.C - -diff --git a/Data/Text/IDN/StringPrep.chs b/Data/Text/IDN/StringPrep.chs -index 752dc9e..5e9fd84 100644 ---- a/Data/Text/IDN/StringPrep.chs -+++ b/Data/Text/IDN/StringPrep.chs -@@ -39,6 +39,7 @@ import qualified Data.ByteString as B - import qualified Data.Text as T - import qualified Data.Text.Encoding as TE - -+import System.IO.Unsafe - import Foreign - import Foreign.C - --- -1.7.10.4 - diff --git a/standalone/android/haskell-patches/optparse-applicative_remove-ANN.patch b/standalone/android/haskell-patches/optparse-applicative_remove-ANN.patch new file mode 100644 index 000000000..1bb843524 --- /dev/null +++ b/standalone/android/haskell-patches/optparse-applicative_remove-ANN.patch @@ -0,0 +1,33 @@ +From b128590966d4946219e45e2efd88acf7a354abc2 Mon Sep 17 00:00:00 2001 +From: androidbuilder <androidbuilder@example.com> +Date: Tue, 14 Oct 2014 02:28:02 +0000 +Subject: [PATCH] remove ANN + +--- + Options/Applicative.hs | 2 -- + Options/Applicative/Help/Core.hs | 2 -- + 2 files changed, 4 deletions(-) + +diff --git a/Options/Applicative.hs b/Options/Applicative.hs +index bd4129d..f412062 100644 +--- a/Options/Applicative.hs ++++ b/Options/Applicative.hs +@@ -34,5 +34,3 @@ import Options.Applicative.Common + import Options.Applicative.Builder + import Options.Applicative.Builder.Completer + import Options.Applicative.Extra +- +-{-# ANN module "HLint: ignore Use import/export shortcut" #-} +diff --git a/Options/Applicative/Help/Core.hs b/Options/Applicative/Help/Core.hs +index 0a79169..3f1ce3f 100644 +--- a/Options/Applicative/Help/Core.hs ++++ b/Options/Applicative/Help/Core.hs +@@ -139,5 +139,3 @@ parserUsage pprefs p progn = hsep + [ string "Usage:" + , string progn + , align (extractChunk (briefDesc pprefs p)) ] +- +-{-# ANN footerHelp "HLint: ignore Eta reduce" #-} +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/profunctors_3.3-0001-fix-cross-build.patch b/standalone/android/haskell-patches/profunctors_3.3-0001-fix-cross-build.patch new file mode 100644 index 000000000..45397f3e5 --- /dev/null +++ b/standalone/android/haskell-patches/profunctors_3.3-0001-fix-cross-build.patch @@ -0,0 +1,26 @@ +From 392602f5ff14c0b5a801397d075ddcbcd890aa83 Mon Sep 17 00:00:00 2001 +From: Joey Hess <joey@kitenet.net> +Date: Thu, 18 Apr 2013 17:50:59 -0400 +Subject: [PATCH] fix cross build + +--- + src/Data/Profunctor/Unsafe.hs | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/Data/Profunctor/Unsafe.hs b/src/Data/Profunctor/Unsafe.hs +index 025c7c4..0249274 100644 +--- a/src/Data/Profunctor/Unsafe.hs ++++ b/src/Data/Profunctor/Unsafe.hs +@@ -40,9 +40,6 @@ import Data.Tagged + import Prelude hiding (id,(.),sequence) + import Unsafe.Coerce + +-{-# ANN module "Hlint: ignore Redundant lambda" #-} +-{-# ANN module "Hlint: ignore Collapse lambdas" #-} +- + infixr 9 #. + infixl 8 .# + +-- +1.8.2.rc3 + diff --git a/standalone/android/haskell-patches/shakespeare-text_remove-TH.patch b/standalone/android/haskell-patches/shakespeare-text_remove-TH.patch deleted file mode 100644 index ece906f4b..000000000 --- a/standalone/android/haskell-patches/shakespeare-text_remove-TH.patch +++ /dev/null @@ -1,153 +0,0 @@ -From dca2a30ca06865bf66cd25cc14b06f5d28190231 Mon Sep 17 00:00:00 2001 -From: dummy <dummy@example.com> -Date: Thu, 16 Oct 2014 02:46:57 +0000 -Subject: [PATCH] remove TH - ---- - Text/Shakespeare/Text.hs | 125 +++++------------------------------------------ - 1 file changed, 11 insertions(+), 114 deletions(-) - -diff --git a/Text/Shakespeare/Text.hs b/Text/Shakespeare/Text.hs -index 6865a5a..e25a8be 100644 ---- a/Text/Shakespeare/Text.hs -+++ b/Text/Shakespeare/Text.hs -@@ -7,18 +7,18 @@ module Text.Shakespeare.Text - ( TextUrl - , ToText (..) - , renderTextUrl -- , stext -- , text -- , textFile -- , textFileDebug -- , textFileReload -- , st -- | strict text -- , lt -- | lazy text, same as stext :) -+ --, stext -+ --, text -+ --, textFile -+ --, textFileDebug -+ --, textFileReload -+ --, st -- | strict text -+ --, lt -- | lazy text, same as stext :) - -- * Yesod code generation -- , codegen -- , codegenSt -- , codegenFile -- , codegenFileReload -+ --, codegen -+ --, codegenSt -+ --, codegenFile -+ --, codegenFileReload - ) where - - import Language.Haskell.TH.Quote (QuasiQuoter (..)) -@@ -45,106 +45,3 @@ instance ToText Int32 where toText = toText . show - instance ToText Int64 where toText = toText . show - instance ToText Int where toText = toText . show - --settings :: Q ShakespeareSettings --settings = do -- toTExp <- [|toText|] -- wrapExp <- [|id|] -- unWrapExp <- [|id|] -- return $ defaultShakespeareSettings { toBuilder = toTExp -- , wrap = wrapExp -- , unwrap = unWrapExp -- } -- -- --stext, lt, st, text :: QuasiQuoter --stext = -- QuasiQuoter { quoteExp = \s -> do -- rs <- settings -- render <- [|toLazyText|] -- rendered <- shakespeareFromString rs { justVarInterpolation = True } s -- return (render `AppE` rendered) -- } --lt = stext -- --st = -- QuasiQuoter { quoteExp = \s -> do -- rs <- settings -- render <- [|TL.toStrict . toLazyText|] -- rendered <- shakespeareFromString rs { justVarInterpolation = True } s -- return (render `AppE` rendered) -- } -- --text = QuasiQuoter { quoteExp = \s -> do -- rs <- settings -- quoteExp (shakespeare rs) $ filter (/='\r') s -- } -- -- --textFile :: FilePath -> Q Exp --textFile fp = do -- rs <- settings -- shakespeareFile rs fp -- -- --textFileDebug :: FilePath -> Q Exp --textFileDebug = textFileReload --{-# DEPRECATED textFileDebug "Please use textFileReload instead" #-} -- --textFileReload :: FilePath -> Q Exp --textFileReload fp = do -- rs <- settings -- shakespeareFileReload rs fp -- ---- | codegen is designed for generating Yesod code, including templates ---- So it uses different interpolation characters that won't clash with templates. --codegenSettings :: Q ShakespeareSettings --codegenSettings = do -- toTExp <- [|toText|] -- wrapExp <- [|id|] -- unWrapExp <- [|id|] -- return $ defaultShakespeareSettings { toBuilder = toTExp -- , wrap = wrapExp -- , unwrap = unWrapExp -- , varChar = '~' -- , urlChar = '*' -- , intChar = '&' -- , justVarInterpolation = True -- always! -- } -- ---- | codegen is designed for generating Yesod code, including templates ---- So it uses different interpolation characters that won't clash with templates. ---- You can use the normal text quasiquoters to generate code --codegen :: QuasiQuoter --codegen = -- QuasiQuoter { quoteExp = \s -> do -- rs <- codegenSettings -- render <- [|toLazyText|] -- rendered <- shakespeareFromString rs { justVarInterpolation = True } s -- return (render `AppE` rendered) -- } -- ---- | Generates strict Text ---- codegen is designed for generating Yesod code, including templates ---- So it uses different interpolation characters that won't clash with templates. --codegenSt :: QuasiQuoter --codegenSt = -- QuasiQuoter { quoteExp = \s -> do -- rs <- codegenSettings -- render <- [|TL.toStrict . toLazyText|] -- rendered <- shakespeareFromString rs { justVarInterpolation = True } s -- return (render `AppE` rendered) -- } -- --codegenFileReload :: FilePath -> Q Exp --codegenFileReload fp = do -- rs <- codegenSettings -- render <- [|TL.toStrict . toLazyText|] -- rendered <- shakespeareFileReload rs{ justVarInterpolation = True } fp -- return (render `AppE` rendered) -- --codegenFile :: FilePath -> Q Exp --codegenFile fp = do -- rs <- codegenSettings -- render <- [|TL.toStrict . toLazyText|] -- rendered <- shakespeareFile rs{ justVarInterpolation = True } fp -- return (render `AppE` rendered) --- -2.1.1 - diff --git a/standalone/android/haskell-patches/skein_hardcode_little-endian.patch b/standalone/android/haskell-patches/skein_hardcode_little-endian.patch new file mode 100644 index 000000000..7333742b0 --- /dev/null +++ b/standalone/android/haskell-patches/skein_hardcode_little-endian.patch @@ -0,0 +1,26 @@ +From 3a04b41ffce4e4e87b0fedd3a1e3434a3f06cc76 Mon Sep 17 00:00:00 2001 +From: foo <foo@bar> +Date: Sun, 22 Sep 2013 00:18:12 +0000 +Subject: [PATCH] hardcode little endian + +This is the same as building with a cabal flag. + +--- + c_impl/optimized/skein_port.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/c_impl/optimized/skein_port.h b/c_impl/optimized/skein_port.h +index a2d0fc2..6929bb0 100644 +--- a/c_impl/optimized/skein_port.h ++++ b/c_impl/optimized/skein_port.h +@@ -45,6 +45,7 @@ typedef uint64_t u64b_t; /* 64-bit unsigned integer */ + * platform-specific code instead (e.g., for big-endian CPUs).
+ *
+ */
++#define SKEIN_NEED_SWAP (0)
+ #ifndef SKEIN_NEED_SWAP /* compile-time "override" for endianness? */
+
+ #include "brg_endian.h" /* get endianness selection */
+-- +1.7.10.4 + diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages index 6385718cb..a2e1008fb 100755 --- a/standalone/android/install-haskell-packages +++ b/standalone/android/install-haskell-packages @@ -97,19 +97,14 @@ EOF patched persistent-template patched system-filepath patched optparse-applicative + patched warp patched wai-app-static patched shakespeare - patched shakespeare-css - patched shakespeare-js - patched yesod-routes patched yesod-core - patched yesod-persistent patched yesod-form - patched crypto-numbers patched clock patched yesod-auth patched yesod - patched shakespeare-text patched process-conduit patched DAV patched yesod-static @@ -117,7 +112,6 @@ EOF patched dns patched gnutls patched unbounded-delays - patched gnuidn patched network-protocol-xmpp cd .. |