[arch-commits] Commit in haskell-chell-quickcheck/trunk (2 files)
Felix Yan
felixonmars at archlinux.org
Sun Jan 20 17:43:49 UTC 2019
Date: Sunday, January 20, 2019 @ 17:43:48
Author: felixonmars
Revision: 425363
upgpkg: haskell-chell-quickcheck 0.2.5.1-16
rebuild with QuickCheck 2.12.6.1, servant 0.15, servant-server 0.15, servant-swagger 1.1.7
Added:
haskell-chell-quickcheck/trunk/quickcheck-2.12.patch
Modified:
haskell-chell-quickcheck/trunk/PKGBUILD
-----------------------+
PKGBUILD | 10 +++++---
quickcheck-2.12.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 62 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-01-20 17:20:54 UTC (rev 425362)
+++ PKGBUILD 2019-01-20 17:43:48 UTC (rev 425363)
@@ -3,7 +3,7 @@
_hkgname=chell-quickcheck
pkgname=haskell-chell-quickcheck
pkgver=0.2.5.1
-pkgrel=15
+pkgrel=16
pkgdesc="QuickCheck support for the Chell testing library"
url="https://john-millikin.com/software/chell/"
license=('MIT')
@@ -10,12 +10,14 @@
arch=('x86_64')
depends=('ghc-libs' 'haskell-chell' 'haskell-quickcheck' 'haskell-random')
makedepends=('ghc')
-source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
-sha512sums=('4879c084731112e0e17e6d82510850c119c7e5e5cde90c03ecce9ea470f94429ddd040b9346a5aa268b0ea41c5656025cc2dacfe533d370efd7162473a1ebc6e')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz
+ quickcheck-2.12.patch)
+sha512sums=('4879c084731112e0e17e6d82510850c119c7e5e5cde90c03ecce9ea470f94429ddd040b9346a5aa268b0ea41c5656025cc2dacfe533d370efd7162473a1ebc6e'
+ '47d6f0e7a51a186fe1a0085a1bdcb11402f063ffe48a71282f40b8f69add78c64821c79b4b5c1e0f97feb0d8154745e7dcb4572761b41aca89e399a844bbfafe')
prepare() {
cd $_hkgname-$pkgver
- sed -i 's/<.*2.11/<3/' $_hkgname.cabal
+ patch -p2 -i ../quickcheck-2.12.patch
}
build() {
Added: quickcheck-2.12.patch
===================================================================
--- quickcheck-2.12.patch (rev 0)
+++ quickcheck-2.12.patch 2019-01-20 17:43:48 UTC (rev 425363)
@@ -0,0 +1,56 @@
+commit 0c81a9d15b8b8fcfbde47ef3cf76aa1f136abdfa
+Author: Felix Yan <felixonmars at archlinux.org>
+Date: Mon Jan 21 01:15:45 2019 +0800
+
+ Fix compatibility with QuickCheck 2.12
+
+diff --git a/chell-quickcheck/Test/Chell/QuickCheck.hs b/chell-quickcheck/Test/Chell/QuickCheck.hs
+index 0ec25b0..c9d2abb 100644
+--- a/chell-quickcheck/Test/Chell/QuickCheck.hs
++++ b/chell-quickcheck/Test/Chell/QuickCheck.hs
+@@ -53,8 +53,15 @@ property name prop = Chell.test name $ \opts -> do
+ , State.computeSize = computeSize (QuickCheck.maxSize args) (QuickCheck.maxSuccess args)
+ , State.numSuccessTests = 0
+ , State.numDiscardedTests = 0
++#if MIN_VERSION_QuickCheck(2,12,0)
++ , State.classes = mempty
++ , State.tables = mempty
++ , State.requiredCoverage = mempty
++ , State.expected = True
++#else
+ , State.collected = []
+ , State.expectedFailure = False
++#endif
+
+ #if MIN_VERSION_QuickCheck(2,7,0)
+ , State.randomSeed = QCRandom.mkQCGen seed
+@@ -77,12 +84,16 @@ property name prop = Chell.test name $ \opts -> do
+ #endif
+ }
+
++#if MIN_VERSION_QuickCheck(2,12,0)
++ result <- Test.test state (QuickCheck.property prop)
++#else
+ #if MIN_VERSION_QuickCheck(2,7,0)
+ let genProp = unProperty (QuickCheck.property prop)
+ #else
+ let genProp = QuickCheck.property prop
+ #endif
+ result <- Test.test state (Gen.unGen genProp)
++#endif
+ let output = Test.output result
+ let notes = [("seed", show seed)]
+ let failure = Chell.failure { Chell.failureMessage = output }
+diff --git a/chell-quickcheck/chell-quickcheck.cabal b/chell-quickcheck/chell-quickcheck.cabal
+index 5b5482c..673363e 100644
+--- a/chell-quickcheck/chell-quickcheck.cabal
++++ b/chell-quickcheck/chell-quickcheck.cabal
+@@ -27,7 +27,7 @@ library
+ build-depends:
+ base >= 4.0 && < 5.0
+ , chell >= 0.3 && < 0.5
+- , QuickCheck >= 2.3 && < 2.11
++ , QuickCheck >= 2.3 && < 2.13
+ , random
+
+ exposed-modules:
More information about the arch-commits
mailing list