[arch-commits] Commit in haskell-hspec-contrib/repos (4 files)

Felix Yan felixonmars at gemini.archlinux.org
Mon Sep 5 23:04:05 UTC 2022


    Date: Monday, September 5, 2022 @ 23:04:04
  Author: felixonmars
Revision: 1293708

archrelease: copy trunk to community-staging-x86_64

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

--------------------+
 PKGBUILD           |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 hspec-2.10-2.patch |   22 ++++++++++++++++++++++
 hspec-2.10.patch   |   26 ++++++++++++++++++++++++++
 3 files changed, 98 insertions(+)

Copied: haskell-hspec-contrib/repos/community-staging-x86_64/PKGBUILD (from rev 1293707, haskell-hspec-contrib/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2022-09-05 23:04:04 UTC (rev 1293708)
@@ -0,0 +1,50 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=hspec-contrib
+pkgname=haskell-hspec-contrib
+pkgver=0.5.1
+pkgrel=199
+pkgdesc="Contributed functionality for Hspec"
+url="https://hspec.github.io/"
+license=('MIT')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-hspec-core' 'haskell-hunit')
+makedepends=('ghc' 'haskell-hspec' 'haskell-quickcheck')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz
+        hspec-2.10.patch hspec-2.10-2.patch)
+sha512sums=('cc6ee847d7c99b2607c36b2200bf0bc05ce30437110f216f82464069ffdf80a76d836ad7aace3d69a00cf9da4b28d39491a251c6f60401009a6f9c85d20043e0'
+            'ded33d9cf5612520909222609c40083baf0af52a2f0c9c82848eaecdca9e7ee8fde272594840576db385161baf2732f73d61cc768730052a5e538d33106780bd'
+            '9dfdcd8e108ab8fdb2c27a8cbabd841c70b8b8a4633b683a2aad8829f44014ae9b36de157402db521ad3c4bcda47ca86b0dc521355a189faa56da716b7d3415a')
+
+prepare() {
+    patch -d $_hkgname-$pkgver -p2 < hspec-2.10-2.patch
+    patch -d $_hkgname-$pkgver -p2 < 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-contrib/repos/community-staging-x86_64/hspec-2.10-2.patch (from rev 1293707, haskell-hspec-contrib/trunk/hspec-2.10-2.patch)
===================================================================
--- community-staging-x86_64/hspec-2.10-2.patch	                        (rev 0)
+++ community-staging-x86_64/hspec-2.10-2.patch	2022-09-05 23:04:04 UTC (rev 1293708)
@@ -0,0 +1,22 @@
+From a50d17b3c2c8bfa6aa79975bdffb5a749aee910b Mon Sep 17 00:00:00 2001
+From: Simon Hengel <sol at typeful.net>
+Date: Sat, 9 Jan 2021 12:25:35 +0700
+Subject: [PATCH] refactoring: Use bimapForest instead of bimapTree
+
+---
+ hspec-contrib/test/Test/Hspec/Contrib/HUnitSpec.hs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hspec-contrib/test/Test/Hspec/Contrib/HUnitSpec.hs b/hspec-contrib/test/Test/Hspec/Contrib/HUnitSpec.hs
+index bd44505b..1c2a234a 100644
+--- a/hspec-contrib/test/Test/Hspec/Contrib/HUnitSpec.hs
++++ b/hspec-contrib/test/Test/Hspec/Contrib/HUnitSpec.hs
+@@ -8,7 +8,7 @@ import           Test.Hspec.Contrib.HUnit
+ import           Test.HUnit
+ 
+ shouldYield :: Test -> [Tree () String] -> Expectation
+-a `shouldYield` b = map (bimapTree (const ()) itemRequirement) <$> runSpecM (fromHUnitTest a) `shouldReturn` b
++a `shouldYield` b = bimapForest (const ()) itemRequirement <$> runSpecM (fromHUnitTest a) `shouldReturn` b
+ 
+ spec :: Spec
+ spec = do

Copied: haskell-hspec-contrib/repos/community-staging-x86_64/hspec-2.10.patch (from rev 1293707, haskell-hspec-contrib/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-05 23:04:04 UTC (rev 1293708)
@@ -0,0 +1,26 @@
+From f8edd52b3e4886108105a0fb551a0af5c0d84f63 Mon Sep 17 00:00:00 2001
+From: Simon Hengel <sol at typeful.net>
+Date: Thu, 9 Dec 2021 15:13:00 +0700
+Subject: [PATCH] Allow to transform the config in SpecM
+
+---
+ .../test/Test/Hspec/Contrib/HUnitSpec.hs      |  2 +-
+ hspec-core/src/Test/Hspec/Core/Runner.hs      | 90 ++++++++++++++-----
+ hspec-core/src/Test/Hspec/Core/Spec/Monad.hs  | 21 ++++-
+ hspec-core/test/Test/Hspec/Core/HooksSpec.hs  |  7 +-
+ hspec-core/test/Test/Hspec/Core/SpecSpec.hs   |  6 +-
+ 5 files changed, 97 insertions(+), 29 deletions(-)
+
+diff --git a/hspec-contrib/test/Test/Hspec/Contrib/HUnitSpec.hs b/hspec-contrib/test/Test/Hspec/Contrib/HUnitSpec.hs
+index 1c2a234a..4ac53777 100644
+--- a/hspec-contrib/test/Test/Hspec/Contrib/HUnitSpec.hs
++++ b/hspec-contrib/test/Test/Hspec/Contrib/HUnitSpec.hs
+@@ -8,7 +8,7 @@ import           Test.Hspec.Contrib.HUnit
+ import           Test.HUnit
+ 
+ shouldYield :: Test -> [Tree () String] -> Expectation
+-a `shouldYield` b = bimapForest (const ()) itemRequirement <$> runSpecM (fromHUnitTest a) `shouldReturn` b
++a `shouldYield` b = bimapForest (const ()) itemRequirement . snd <$> runSpecM (fromHUnitTest a) `shouldReturn` b
+ 
+ spec :: Spec
+ spec = do



More information about the arch-commits mailing list