[arch-commits] Commit in haskell-chell-quickcheck/repos (3 files)

Felix Yan felixonmars at archlinux.org
Sun Jan 20 17:44:06 UTC 2019


    Date: Sunday, January 20, 2019 @ 17:44:05
  Author: felixonmars
Revision: 425364

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-chell-quickcheck/repos/community-staging-x86_64/
  haskell-chell-quickcheck/repos/community-staging-x86_64/PKGBUILD
    (from rev 425363, haskell-chell-quickcheck/trunk/PKGBUILD)
  haskell-chell-quickcheck/repos/community-staging-x86_64/quickcheck-2.12.patch
    (from rev 425363, haskell-chell-quickcheck/trunk/quickcheck-2.12.patch)

-----------------------+
 PKGBUILD              |   44 +++++++++++++++++++++++++++++++++++++
 quickcheck-2.12.patch |   56 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 100 insertions(+)

Copied: haskell-chell-quickcheck/repos/community-staging-x86_64/PKGBUILD (from rev 425363, haskell-chell-quickcheck/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2019-01-20 17:44:05 UTC (rev 425364)
@@ -0,0 +1,44 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=chell-quickcheck
+pkgname=haskell-chell-quickcheck
+pkgver=0.2.5.1
+pkgrel=16
+pkgdesc="QuickCheck support for the Chell testing library"
+url="https://john-millikin.com/software/chell/"
+license=('MIT')
+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
+        quickcheck-2.12.patch)
+sha512sums=('4879c084731112e0e17e6d82510850c119c7e5e5cde90c03ecce9ea470f94429ddd040b9346a5aa268b0ea41c5656025cc2dacfe533d370efd7162473a1ebc6e'
+            '47d6f0e7a51a186fe1a0085a1bdcb11402f063ffe48a71282f40b8f69add78c64821c79b4b5c1e0f97feb0d8154745e7dcb4572761b41aca89e399a844bbfafe')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    patch -p2 -i ../quickcheck-2.12.patch
+}
+
+build() {
+    cd $_hkgname-$pkgver
+    
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+        --prefix=/usr --docdir=/usr/share/doc/$pkgname \
+        --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
+    runhaskell Setup build
+    runhaskell Setup register --gen-script
+    runhaskell Setup unregister --gen-script
+    sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+    sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+    cd $_hkgname-$pkgver
+    
+    install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
+    install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
+    runhaskell Setup copy --destdir="$pkgdir"
+    install -D -m644 "license.txt" "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
+    rm -f "${pkgdir}/usr/share/doc/${pkgname}/license.txt"
+}

Copied: haskell-chell-quickcheck/repos/community-staging-x86_64/quickcheck-2.12.patch (from rev 425363, haskell-chell-quickcheck/trunk/quickcheck-2.12.patch)
===================================================================
--- community-staging-x86_64/quickcheck-2.12.patch	                        (rev 0)
+++ community-staging-x86_64/quickcheck-2.12.patch	2019-01-20 17:44:05 UTC (rev 425364)
@@ -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