[arch-commits] Commit in haskell-hspec-smallcheck/repos (3 files)
Felix Yan
felixonmars at gemini.archlinux.org
Tue Sep 6 16:20:31 UTC 2022
Date: Tuesday, September 6, 2022 @ 16:20:30
Author: felixonmars
Revision: 1294457
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 1294456, haskell-hspec-smallcheck/trunk/PKGBUILD)
haskell-hspec-smallcheck/repos/community-staging-x86_64/hspec-2.10.patch
(from rev 1294456, haskell-hspec-smallcheck/trunk/hspec-2.10.patch)
------------------+
PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
hspec-2.10.patch | 30 ++++++++++++++++++++++++++++++
2 files changed, 78 insertions(+)
Copied: haskell-hspec-smallcheck/repos/community-staging-x86_64/PKGBUILD (from rev 1294456, haskell-hspec-smallcheck/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2022-09-06 16:20:30 UTC (rev 1294457)
@@ -0,0 +1,48 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=hspec-smallcheck
+pkgname=haskell-hspec-smallcheck
+pkgver=0.5.2
+pkgrel=235
+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
+ hspec-2.10.patch)
+sha512sums=('2fd27126285e7d308f277480dcadcb6b047f67a82389edaf7d4761504f88ffedd8831db5b6b4f178c429cf3e8009e8aee8c6b05040dd960e7d2813e50908bd05'
+ 'edca9cf9a69225bb08db3dfafaf25baa1e0e66d02f0d3f460dfba005b46cd693193df6ac1fdcc3d21f2e49f3891af296485788fd2656e3d28eb3a05d5210e44d')
+
+prepare() {
+ patch -d $_hkgname-$pkgver -p1 < hspec-2.10.patch
+}
+
+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 1294456, 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-06 16:20:30 UTC (rev 1294457)
@@ -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