[arch-commits] Commit in haskell-hspec-smallcheck/repos (3 files)

Felix Yan felixonmars at gemini.archlinux.org
Sat Sep 10 19:56:03 UTC 2022


    Date: Saturday, September 10, 2022 @ 19:56:02
  Author: felixonmars
Revision: 1300415

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-hspec-smallcheck/repos/community-staging-x86_64/
  haskell-hspec-smallcheck/repos/community-staging-x86_64/PKGBUILD
    (from rev 1300414, haskell-hspec-smallcheck/trunk/PKGBUILD)
  haskell-hspec-smallcheck/repos/community-staging-x86_64/hspec-2.10.patch
    (from rev 1300414, haskell-hspec-smallcheck/trunk/hspec-2.10.patch)

------------------+
 PKGBUILD         |   42 ++++++++++++++++++++++++++++++++++++++++++
 hspec-2.10.patch |   30 ++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+)

Copied: haskell-hspec-smallcheck/repos/community-staging-x86_64/PKGBUILD (from rev 1300414, haskell-hspec-smallcheck/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2022-09-10 19:56:02 UTC (rev 1300415)
@@ -0,0 +1,42 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=hspec-smallcheck
+pkgname=haskell-hspec-smallcheck
+pkgver=0.5.3
+pkgrel=1
+pkgdesc="SmallCheck support for the Hspec testing framework"
+url="http://hspec.github.io/"
+license=('MIT')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-call-stack' 'haskell-hspec-core' 'haskell-hunit' 'haskell-smallcheck')
+makedepends=('ghc' 'haskell-base-orphans' 'haskell-hspec' 'haskell-quickcheck')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+sha512sums=('cbf1130e11a75c6042762f94e60b51b286061b175d7d3b5b5c4c4f1477b0aa54d8bc17546b8aafe6a1601ca9a2a765bf392af80850c11cc30e68c1ae5e51146a')
+
+build() {
+    cd $_hkgname-$pkgver
+    
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+        --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
+        --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
+    runhaskell Setup build $MAKEFLAGS
+    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
+}
+
+check() {
+    cd $_hkgname-$pkgver
+    runhaskell Setup test --show-details=direct
+}
+
+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 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+    rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}

Copied: haskell-hspec-smallcheck/repos/community-staging-x86_64/hspec-2.10.patch (from rev 1300414, haskell-hspec-smallcheck/trunk/hspec-2.10.patch)
===================================================================
--- community-staging-x86_64/hspec-2.10.patch	                        (rev 0)
+++ community-staging-x86_64/hspec-2.10.patch	2022-09-10 19:56:02 UTC (rev 1300415)
@@ -0,0 +1,30 @@
+From 4c1a9e3e7c0669aa0f3dbda4a8c5634f591add6d Mon Sep 17 00:00:00 2001
+From: Simon Hengel <sol at typeful.net>
+Date: Fri, 15 Apr 2022 02:59:32 +0700
+Subject: [PATCH] Require hspec-2.10.0
+
+---
+ .ghci                        |  2 +-
+ .gitattributes               |  1 +
+ .gitignore                   |  2 +-
+ .travis.yml                  | 38 ------------------------------------
+ hspec-smallcheck.cabal       | 15 +++++++-------
+ package.yaml                 |  3 ++-
+ src/Test/Hspec/SmallCheck.hs |  2 +-
+ 7 files changed, 14 insertions(+), 49 deletions(-)
+ create mode 100644 .gitattributes
+ delete mode 100644 .travis.yml
+
+diff --git a/src/Test/Hspec/SmallCheck.hs b/src/Test/Hspec/SmallCheck.hs
+index 52a4ff0..fe0cb4a 100644
+--- a/src/Test/Hspec/SmallCheck.hs
++++ b/src/Test/Hspec/SmallCheck.hs
+@@ -50,7 +50,7 @@ instance Example (Property IO) where
+           modifyIORef counter succ
+           n <- readIORef counter
+           reportProgress (n, 0)
+-    r <- smallCheckWithHook (paramsSmallCheckDepth c) hook p
++    r <- smallCheckWithHook (fromMaybe 5 $ paramsSmallCheckDepth c) hook p
+     return . Result "" $ case r of
+       Just e -> case T.parseResult (ppFailure e) of
+         (m, Just (T.Failure loc reason)) -> Failure loc $ case reason of



More information about the arch-commits mailing list