summaryrefslogtreecommitdiff
path: root/dev-haskell/asn1-encoding/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-haskell/asn1-encoding/files
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-haskell/asn1-encoding/files')
-rw-r--r--dev-haskell/asn1-encoding/files/asn1-encoding-0.9.0-32bit-tests.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/dev-haskell/asn1-encoding/files/asn1-encoding-0.9.0-32bit-tests.patch b/dev-haskell/asn1-encoding/files/asn1-encoding-0.9.0-32bit-tests.patch
new file mode 100644
index 000000000000..2b45be985bba
--- /dev/null
+++ b/dev-haskell/asn1-encoding/files/asn1-encoding-0.9.0-32bit-tests.patch
@@ -0,0 +1,24 @@
+On 32-bit systems Hourglass silently breaks dates
+out of range '1970 +- 68' years due to use of
+'time_t' and 'gmtime_r' from installed libc.
+
+Workaround test failures by not testing times out of this range.
+
+Github-bug: https://github.com/vincenthz/hs-hourglass/issues/21
+Github-bug: https://github.com/vincenthz/hs-asn1/issues/12
+diff --git a/tests/Tests.hs b/tests/Tests.hs
+index 5a82ec9..525de82 100644
+--- a/tests/Tests.hs
++++ b/tests/Tests.hs
+@@ -88,7 +88,10 @@ instance Arbitrary BitArray where
+
+ instance Arbitrary Date where
+ arbitrary = do
+- y <- choose (1951, 2050)
++ -- 2037 and not 2050
++ -- due to a limitation of 'timeConvert' on 32-bit systems:
++ -- https://github.com/vincenthz/hs-hourglass/issues/21
++ y <- choose (1951, 2037)
+ m <- elements [ January .. December]
+ d <- choose (1, 30)
+ return $ normalizeDate $ Date y m d