dev-haskell/chell-quickcheck: allow QuickCheck-2.9
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 5 Nov 2016 23:04:03 +0000 (23:04 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Sat, 5 Nov 2016 23:23:04 +0000 (23:23 +0000)
Package-Manager: portage-2.3.2

dev-haskell/chell-quickcheck/chell-quickcheck-0.2.5-r1.ebuild [new file with mode: 0644]
dev-haskell/chell-quickcheck/files/chell-quickcheck-0.2.5-QC-2.9.patch [new file with mode: 0644]

diff --git a/dev-haskell/chell-quickcheck/chell-quickcheck-0.2.5-r1.ebuild b/dev-haskell/chell-quickcheck/chell-quickcheck-0.2.5-r1.ebuild
new file mode 100644 (file)
index 0000000..0dd4ce3
--- /dev/null
@@ -0,0 +1,37 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+# ebuild generated by hackport 0.4.4.9999
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+DESCRIPTION="QuickCheck support for the Chell testing library"
+HOMEPAGE="https://john-millikin.com/software/chell/"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+RDEPEND=">=dev-haskell/chell-0.3:=[profile?] <dev-haskell/chell-0.5:=[profile?]
+       >=dev-haskell/quickcheck-2.3:2=[profile?]
+       dev-haskell/random:=[profile?]
+       >=dev-lang/ghc-7.4.1:=
+"
+DEPEND="${RDEPEND}
+       >=dev-haskell/cabal-1.6
+"
+
+PATCHES=("${FILESDIR}"/${P}-QC-2.9.patch)
+
+src_prepare() {
+       default
+
+       cabal_chdeps \
+               'QuickCheck >= 2.3 && < 2.9' 'QuickCheck >= 2.3'
+}
diff --git a/dev-haskell/chell-quickcheck/files/chell-quickcheck-0.2.5-QC-2.9.patch b/dev-haskell/chell-quickcheck/files/chell-quickcheck-0.2.5-QC-2.9.patch
new file mode 100644 (file)
index 0000000..50a2d07
--- /dev/null
@@ -0,0 +1,11 @@
+diff --git a/lib/Test/Chell/QuickCheck.hs b/lib/Test/Chell/QuickCheck.hs
+index 56cbd04..c630320 100644
+--- a/lib/Test/Chell/QuickCheck.hs
++++ b/lib/Test/Chell/QuickCheck.hs
+@@ -103,5 +103,3 @@ maxDiscardedTests :: QuickCheck.Testable prop => QuickCheck.Args -> prop -> Int
+ #if MIN_VERSION_QuickCheck(2,5,0)
+-maxDiscardedTests args p = if QuickCheck.exhaustive p
+-      then QuickCheck.maxDiscardRatio args
+-      else QuickCheck.maxDiscardRatio args * QuickCheck.maxSuccess args
++maxDiscardedTests args _ = QuickCheck.maxDiscardRatio args * QuickCheck.maxSuccess args
+ #else