[DHG_packages] 01/01: aeson: Backports upstream patches that help with 32 bit compat (Closes: #811060)
Joachim Breitner
nomeata at moszumanska.debian.org
Fri Jan 22 21:14:42 UTC 2016
This is an automated email from the git hooks/post-receive script.
nomeata pushed a commit to annotated tag haskell-aeson_v0.10.0.0-3
in repository DHG_packages.
commit 2609b3e08250c1be23e1e97dad073af3ac078e44
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Fri Jan 22 22:09:09 2016 +0100
aeson: Backports upstream patches that help with 32 bit compat (Closes: #811060)
---
p/haskell-aeson/debian/changelog | 7 +++
.../5cd5d79e8a0db136ba5f679fbcfb60c7cd17649f.patch | 68 ++++++++++++++++++++++
.../a35b5570d6d729a38d68e309c3bd92f3138e3833.patch | 28 +++++++++
p/haskell-aeson/debian/patches/series | 2 +
4 files changed, 105 insertions(+)
diff --git a/p/haskell-aeson/debian/changelog b/p/haskell-aeson/debian/changelog
index 9f36620..aaa8a9e 100644
--- a/p/haskell-aeson/debian/changelog
+++ b/p/haskell-aeson/debian/changelog
@@ -1,3 +1,10 @@
+haskell-aeson (0.10.0.0-3) unstable; urgency=medium
+
+ * Backports upstream patches that help with 32 bit compat
+ (Closes: #811060)
+
+ -- Joachim Breitner <nomeata at debian.org> Fri, 22 Jan 2016 22:08:39 +0100
+
haskell-aeson (0.10.0.0-2) unstable; urgency=medium
* Add missing test modules.
diff --git a/p/haskell-aeson/debian/patches/5cd5d79e8a0db136ba5f679fbcfb60c7cd17649f.patch b/p/haskell-aeson/debian/patches/5cd5d79e8a0db136ba5f679fbcfb60c7cd17649f.patch
new file mode 100644
index 0000000..89874f2
--- /dev/null
+++ b/p/haskell-aeson/debian/patches/5cd5d79e8a0db136ba5f679fbcfb60c7cd17649f.patch
@@ -0,0 +1,68 @@
+From 5cd5d79e8a0db136ba5f679fbcfb60c7cd17649f Mon Sep 17 00:00:00 2001
+From: Bryan O'Sullivan <bos at serpentine.com>
+Date: Fri, 22 Jan 2016 10:14:42 -0800
+Subject: [PATCH] No bitwise comparison on ToJSON/ToEncoding results (gh-340)
+
+---
+ tests/DataFamilies/Properties.hs | 6 +++---
+ tests/Properties.hs | 17 ++++++-----------
+ 2 files changed, 9 insertions(+), 14 deletions(-)
+
+Index: haskell-aeson/tests/DataFamilies/Properties.hs
+===================================================================
+--- haskell-aeson.orig/tests/DataFamilies/Properties.hs 2016-01-22 22:08:26.189073858 +0100
++++ haskell-aeson/tests/DataFamilies/Properties.hs 2016-01-22 22:08:26.185073775 +0100
+@@ -61,11 +61,11 @@
+ , testProperty "ApproxDefault" $
+ thApproxToJSONDefault `sameAs` thApproxToEncodingDefault
+ , testProperty "SomeType2ElemArray" $
+- thSomeTypeToJSON2ElemArray `sameAsV` thSomeTypeToEncoding2ElemArray
++ thSomeTypeToJSON2ElemArray `sameAs` thSomeTypeToEncoding2ElemArray
+ , testProperty "SomeTypeTaggedObject" $
+- thSomeTypeToJSONTaggedObject `sameAsV` thSomeTypeToEncodingTaggedObject
++ thSomeTypeToJSONTaggedObject `sameAs` thSomeTypeToEncodingTaggedObject
+ , testProperty "SomeTypeObjectWithSingleField" $
+- thSomeTypeToJSONObjectWithSingleField `sameAsV`
++ thSomeTypeToJSONObjectWithSingleField `sameAs`
+ thSomeTypeToEncodingObjectWithSingleField
+ ]
+ ]
+Index: haskell-aeson/tests/Properties.hs
+===================================================================
+--- haskell-aeson.orig/tests/Properties.hs 2016-01-22 22:08:26.189073858 +0100
++++ haskell-aeson/tests/Properties.hs 2016-01-22 22:08:26.185073775 +0100
+@@ -63,16 +63,11 @@
+ result :: Result ()
+ result = parse parser ()
+
+--- | Perform a bit-for-bit comparison of two encoding methods.
++-- | Perform a structural comparison of the results of two encoding
++-- methods. Compares decoded values to account for HashMap-driven
++-- variation in JSON object key ordering.
+ sameAs :: (a -> Value) -> (a -> Encoding) -> a -> Property
+ sameAs toVal toEnc v =
+- toLazyByteString (encodeToBuilder (toVal v)) ===
+- toLazyByteString (fromEncoding (toEnc v))
+-
+--- | Behaves like 'sameAs', but compares decoded values to account for
+--- HashMap-driven variation in JSON object key ordering.
+-sameAsV :: (a -> Value) -> (a -> Encoding) -> a -> Property
+-sameAsV toVal toEnc v =
+ eitherDecode (toLazyByteString (fromEncoding (toEnc v))) === Right (toVal v)
+
+ type P6 = Product6 Int Bool String (Approx Double) (Int, Approx Double) ()
+@@ -191,11 +186,11 @@
+ , testProperty "ApproxDefault" $
+ thApproxToJSONDefault `sameAs` thApproxToEncodingDefault
+ , testProperty "SomeType2ElemArray" $
+- thSomeTypeToJSON2ElemArray `sameAsV` thSomeTypeToEncoding2ElemArray
++ thSomeTypeToJSON2ElemArray `sameAs` thSomeTypeToEncoding2ElemArray
+ , testProperty "SomeTypeTaggedObject" $
+- thSomeTypeToJSONTaggedObject `sameAsV` thSomeTypeToEncodingTaggedObject
++ thSomeTypeToJSONTaggedObject `sameAs` thSomeTypeToEncodingTaggedObject
+ , testProperty "SomeTypeObjectWithSingleField" $
+- thSomeTypeToJSONObjectWithSingleField `sameAsV`
++ thSomeTypeToJSONObjectWithSingleField `sameAs`
+ thSomeTypeToEncodingObjectWithSingleField
+ ]
+ ]
diff --git a/p/haskell-aeson/debian/patches/a35b5570d6d729a38d68e309c3bd92f3138e3833.patch b/p/haskell-aeson/debian/patches/a35b5570d6d729a38d68e309c3bd92f3138e3833.patch
new file mode 100644
index 0000000..3ab6b94
--- /dev/null
+++ b/p/haskell-aeson/debian/patches/a35b5570d6d729a38d68e309c3bd92f3138e3833.patch
@@ -0,0 +1,28 @@
+From a35b5570d6d729a38d68e309c3bd92f3138e3833 Mon Sep 17 00:00:00 2001
+From: Bryan O'Sullivan <bos at serpentine.com>
+Date: Thu, 21 Jan 2016 22:24:48 -0800
+Subject: [PATCH] Fix goodProducer on 32-bit systems
+
+---
+ tests/UnitTests.hs | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+Index: haskell-aeson/tests/UnitTests.hs
+===================================================================
+--- haskell-aeson.orig/tests/UnitTests.hs 2016-01-22 22:07:57.924492201 +0100
++++ haskell-aeson/tests/UnitTests.hs 2016-01-22 22:07:57.920492118 +0100
+@@ -77,9 +77,12 @@
+ '{' (L.head (encode wibble))
+ where
+ wibble = Wibble {
+- wibbleString = replicate 4030 'a'
+- , wibbleInt = undefined
++ wibbleString = replicate k 'a'
++ , wibbleInt = 1
+ }
++ k | arch32bit = 4047
++ | otherwise = 4030
++ arch32bit = (maxBound :: Int) == 2147483647
+
+ -- Test decoding various UTC time formats
+ --
diff --git a/p/haskell-aeson/debian/patches/series b/p/haskell-aeson/debian/patches/series
index c9ee156..16730ef 100644
--- a/p/haskell-aeson/debian/patches/series
+++ b/p/haskell-aeson/debian/patches/series
@@ -1,3 +1,5 @@
th-option.diff
threaded-option.diff
missing-test-modules
+5cd5d79e8a0db136ba5f679fbcfb60c7cd17649f.patch
+a35b5570d6d729a38d68e309c3bd92f3138e3833.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/DHG_packages.git
More information about the Pkg-haskell-commits
mailing list