[Pkg-haskell-commits] [package-plan] 273/457: Import Crypto patches

Joachim Breitner nomeata at moszumanska.debian.org
Mon Apr 14 20:05:36 UTC 2014


This is an automated email from the git hooks/post-receive script.

nomeata pushed a commit to branch master
in repository package-plan.

commit 2397b68a66f6c6974d8fb16a5a3b1dd1f987c0e4
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Mon Dec 2 08:43:14 2013 +0000

    Import Crypto patches
---
 .../Crypto/4.2.5/patches/class-constraints.diff    | 77 ++++++++++++++++++++++
 patches/Crypto/4.2.5/patches/no-quickcheck.patch   | 62 +++++++++++++++++
 patches/Crypto/4.2.5/patches/series                |  2 +
 3 files changed, 141 insertions(+)

diff --git a/patches/Crypto/4.2.5/patches/class-constraints.diff b/patches/Crypto/4.2.5/patches/class-constraints.diff
new file mode 100644
index 0000000..3b0a781
--- /dev/null
+++ b/patches/Crypto/4.2.5/patches/class-constraints.diff
@@ -0,0 +1,77 @@
+Description: ghc 7.6 class constraints
+Author: Joachim Breitner <nomeata at debian.org>
+
+Index: haskell-crypto-4.2.5/Data/Digest/SHA2.hs
+===================================================================
+--- haskell-crypto-4.2.5.orig/Data/Digest/SHA2.hs	2012-05-14 13:58:24.000000000 +0200
++++ haskell-crypto-4.2.5/Data/Digest/SHA2.hs	2012-10-21 14:21:17.359966255 +0200
+@@ -25,7 +25,7 @@
+ ch x y z = (x .&. y) `xor` (complement x .&. z)
+ maj x y z = (x .&. y) `xor` (x .&. z) `xor` (y .&. z)
+ 
+-class (Bits w) => ShaData w where
++class (Bits w, Num w) => ShaData w where
+   bigSigma0 :: w -> w
+   bigSigma1 :: w -> w
+   smallSigma0 :: w -> w
+Index: haskell-crypto-4.2.5/Data/LargeWord.hs
+===================================================================
+--- haskell-crypto-4.2.5.orig/Data/LargeWord.hs	2012-05-14 13:58:24.000000000 +0200
++++ haskell-crypto-4.2.5/Data/LargeWord.hs	2012-10-21 14:25:31.855955472 +0200
+@@ -62,7 +62,7 @@
+ data LargeKey a b = LargeKey a b
+    deriving (Eq, Ord)
+ 
+-instance (Ord a, Bits a, LargeWord a, Bits b, LargeWord b) =>
++instance (Ord a, Bits a, Num a, LargeWord a, Bits b, Num b, LargeWord b) =>
+    LargeWord (LargeKey a b) where
+       largeWordToInteger (LargeKey lo hi) =
+          largeWordToInteger lo + (2^(bitSize lo)) * largeWordToInteger hi
+@@ -96,17 +96,17 @@
+          where conv = integerToLargeWord . largeWordToInteger
+       largeBitSize ~(LargeKey lo hi) = largeBitSize lo + largeBitSize hi
+ 
+-instance (Ord a, Bits a, LargeWord a, Bits b, LargeWord b) => Show (LargeKey a b) where
++instance (Ord a, Bits a, Num a, LargeWord a, Bits b, Num b, LargeWord b) => Show (LargeKey a b) where
+    showsPrec p = showInt . largeWordToInteger
+ 
+-instance (Ord a, Bits a, LargeWord a, Bits b, LargeWord b) => 
++instance (Ord a, Bits a, Num a, LargeWord a, Bits b, Num b, LargeWord b) => 
+    Num (LargeKey a b) where
+       (+) = largeWordPlus
+       fromInteger = integerToLargeWord 
+ 
+ -- Larger keys are instances of Bits provided their constituents are keys.
+ 
+-instance (Ord a, Bits a, LargeWord a, Bits b, LargeWord b) => 
++instance (Ord a, Bits a, Num a, LargeWord a, Bits b, Num b, LargeWord b) => 
+    Bits (LargeKey a b) where
+       (.&.) = largeWordAnd
+       (.|.) = largeWordOr
+@@ -130,11 +130,11 @@
+ boflk :: (LargeKey a b) -> b
+ boflk = undefined
+ 
+-instance (Ord a, Bits a, LargeWord a, Ord b, Bits b, LargeWord b) =>
++instance (Ord a, Bits a, Num a, LargeWord a, Ord b, Bits b, Num b, LargeWord b) =>
+    Integral (LargeKey a b) where
+       toInteger = largeWordToInteger
+ 
+-instance (Ord a, Bits a, LargeWord a, Ord b, Bits b, LargeWord b) =>
++instance (Ord a, Bits a, Num a, LargeWord a, Ord b, Bits b, Num b, LargeWord b) =>
+    Real (LargeKey a b)
+ 
+ instance Enum (LargeKey a b)
+Index: haskell-crypto-4.2.5/Data/Digest/SHA1.hs
+===================================================================
+--- haskell-crypto-4.2.5.orig/Data/Digest/SHA1.hs	2012-05-14 13:58:24.000000000 +0200
++++ haskell-crypto-4.2.5/Data/Digest/SHA1.hs	2012-10-21 14:26:57.551951840 +0200
+@@ -93,7 +93,7 @@
+       g [] = Nothing
+       g xs = Just (splitAt 64 xs)
+ 
+-fromBytes :: (Bits a) => [a] -> a
++fromBytes :: (Bits a, Num a) => [a] -> a
+ fromBytes input =
+     let dofb accum [] = accum
+         dofb accum (x:xs) = dofb ((shiftL accum 8) .|. x) xs
diff --git a/patches/Crypto/4.2.5/patches/no-quickcheck.patch b/patches/Crypto/4.2.5/patches/no-quickcheck.patch
new file mode 100644
index 0000000..d4efca6
--- /dev/null
+++ b/patches/Crypto/4.2.5/patches/no-quickcheck.patch
@@ -0,0 +1,62 @@
+diff -ur old/haskell-crypto-4.2.3/Crypto.cabal haskell-crypto-4.2.3/Crypto.cabal
+--- old/haskell-crypto-4.2.3/Crypto.cabal	2010-12-27 21:14:30.000000000 -0400
++++ haskell-crypto-4.2.3/Crypto.cabal	2011-04-25 17:48:48.737535576 -0400
+@@ -46,7 +46,7 @@
+                  Data.Digest.SHA512,
+                  Data.LargeWord,
+                  Data.HMAC
+-        Build-Depends:  QuickCheck >= 2.4.0.1, HUnit
++        Build-Depends:  HUnit
+         if flag(small_base)
+             Build-Depends: base >= 3, base < 5, array, random, pretty
+         else
+@@ -58,49 +58,3 @@
+                  Codec.Encryption.DESAux,
+                  Codec.Encryption.AESAux,
+                  Data.Digest.MD5Aux
+-
+-Executable      SymmetricTest
+-  Main-Is:         SymmetricTest.hs
+-  Ghc-options:     -fregs-graph
+-  Other-modules:   Codec.Utils
+-                   Codec.Encryption.Blowfish
+-                   Codec.Encryption.Modes
+-                   Codec.Encryption.Padding
+-                   Codec.Encryption.DES
+-                   Codec.Encryption.AES
+-                   Data.LargeWord
+-
+-Executable      SHA1Test
+-  Main-Is:         SHA1Test.hs
+-  Ghc-options:     -fregs-graph
+-  Other-modules:   Codec.Text.Raw
+-                   Data.Digest.SHA1
+-
+-Executable      RSATest
+-  Main-Is:         RSATest.hs
+-  Ghc-options:     -fregs-graph
+-  Other-modules:   Codec.Utils
+-                   Data.Digest.SHA1
+-                   Codec.Encryption.RSA.MGF
+-                   Codec.Encryption.RSA.EMEOAEP
+-                   Codec.Encryption.RSA
+-
+-Executable      QuickTest
+-  Main-Is:         QuickTest.hs
+-  Ghc-options:     -fregs-graph
+-  Extensions: TypeSynonymInstances
+-  Other-modules:   Codec.Utils
+-                   Codec.Encryption.Blowfish
+-                   Codec.Encryption.AES
+-                   Codec.Encryption.Modes
+-                   Codec.Encryption.Padding
+-                   Data.LargeWord
+-
+-Executable      HMACTest
+-  Main-Is:         HMACTest.hs
+-  Other-modules:   Codec.Utils
+-                   Data.HMAC
+-
+-Executable      WordListTest
+-  Main-Is:         WordListTest.hs
+-  Other-modules:   Data.LargeWord
diff --git a/patches/Crypto/4.2.5/patches/series b/patches/Crypto/4.2.5/patches/series
new file mode 100644
index 0000000..f376931
--- /dev/null
+++ b/patches/Crypto/4.2.5/patches/series
@@ -0,0 +1,2 @@
+class-constraints.diff
+no-quickcheck.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/package-plan.git



More information about the Pkg-haskell-commits mailing list