commit:     550762d9c6c54ae40e01e0cb5396e08843edb64b
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 31 20:31:29 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Mar 31 20:33:48 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=550762d9

dev-haskell/zlib: workaround zlib test failures, bug #613532

zlib does not really support windows size of 8 bits

Reported-by: eroen
Bug: https://github.com/haskell/zlib/issues/11
Bug: https://bugs.gentoo.org/show_bug.cgi?id=613532
Package-Manager: Portage-2.3.5, Repoman-2.3.2

 .../zlib/files/zlib-0.6.1.2-fix-w8-tests.patch     | 26 ++++++++++++++++++++++
 dev-haskell/zlib/zlib-0.6.1.2.ebuild               |  4 +++-
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/dev-haskell/zlib/files/zlib-0.6.1.2-fix-w8-tests.patch 
b/dev-haskell/zlib/files/zlib-0.6.1.2-fix-w8-tests.patch
new file mode 100644
index 00000000000..5b4cb5a6eca
--- /dev/null
+++ b/dev-haskell/zlib/files/zlib-0.6.1.2-fix-w8-tests.patch
@@ -0,0 +1,26 @@
+zlib does not really support windows size of 8 bits:
+
+Reported by eroen
+
+https://github.com/haskell/zlib/issues/11
+https://bugs.gentoo.org/show_bug.cgi?id=613532
+diff --git a/test/Test.hs b/test/Test.hs
+index bbd8b94..81bd260 100644
+--- a/test/Test.hs
++++ b/test/Test.hs
+@@ -66,2 +66,3 @@ prop_decompress_after_compress w cp dp =
+    -- of the zlib source code.
++   compressWindowBits cp /= WindowBits 8 &&
+    (decompressWindowBits dp > compressWindowBits cp || decompressWindowBits 
dp > WindowBits 8) &&
+@@ -76,2 +77,3 @@ prop_gziporzlib1 cp dp =
+    decompressWindowBits dp > compressWindowBits cp &&
++   compressWindowBits cp /= WindowBits 8 &&
+    decompressBufferSize dp > 0 && compressBufferSize cp > 0 ==>
+@@ -85,2 +87,3 @@ prop_gziporzlib2 cp dp =
+    decompressWindowBits dp >= compressWindowBits cp &&
++   compressWindowBits cp /= WindowBits 8 &&
+    decompressBufferSize dp > 0 && compressBufferSize cp > 0 ==>
+@@ -94,2 +97,3 @@ prop_gzip_concat cp dp input =
+    decompressWindowBits dp >= compressWindowBits cp &&
++   compressWindowBits cp /= WindowBits 8 &&
+    decompressBufferSize dp > 0 && compressBufferSize cp > 0 ==>

diff --git a/dev-haskell/zlib/zlib-0.6.1.2.ebuild 
b/dev-haskell/zlib/zlib-0.6.1.2.ebuild
index 38ea3031959..4187ff78db0 100644
--- a/dev-haskell/zlib/zlib-0.6.1.2.ebuild
+++ b/dev-haskell/zlib/zlib-0.6.1.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -28,6 +28,8 @@ DEPEND="${RDEPEND}
                >=dev-haskell/tasty-quickcheck-0.8 
<dev-haskell/tasty-quickcheck-0.9 )
 "
 
+PATCHES=("${FILESDIR}"/${P}-fix-w8-tests.patch)
+
 src_configure() {
        haskell-cabal_src_configure \
                $(cabal_flag non-blocking-ffi non-blocking-ffi)

Reply via email to