[arch-commits] Commit in haskell-tasty-discover/repos (3 files)
Felix Yan
felixonmars at gemini.archlinux.org
Thu Nov 18 05:30:24 UTC 2021
Date: Thursday, November 18, 2021 @ 05:30:24
Author: felixonmars
Revision: 1052033
archrelease: copy trunk to community-staging-x86_64
Added:
haskell-tasty-discover/repos/community-staging-x86_64/
haskell-tasty-discover/repos/community-staging-x86_64/PKGBUILD
(from rev 1052032, haskell-tasty-discover/trunk/PKGBUILD)
haskell-tasty-discover/repos/community-staging-x86_64/tasty-hspec-1.1.7.patch
(from rev 1052032, haskell-tasty-discover/trunk/tasty-hspec-1.1.7.patch)
-------------------------+
PKGBUILD | 58 ++++++++++++++++++++++++++++++++++++++
tasty-hspec-1.1.7.patch | 69 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 127 insertions(+)
Copied: haskell-tasty-discover/repos/community-staging-x86_64/PKGBUILD (from rev 1052032, haskell-tasty-discover/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2021-11-18 05:30:24 UTC (rev 1052033)
@@ -0,0 +1,58 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=tasty-discover
+pkgname=haskell-tasty-discover
+pkgver=4.2.2
+pkgrel=111
+pkgdesc="Test discovery for the tasty framework"
+url="https://github.com/haskell-works/tasty-discover"
+license=('MIT')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-glob')
+makedepends=('ghc' 'haskell-hedgehog' 'haskell-hspec' 'haskell-tasty' 'haskell-tasty-hedgehog'
+ 'haskell-tasty-hspec' 'haskell-tasty-hunit' 'haskell-tasty-quickcheck'
+ 'haskell-tasty-smallcheck')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz
+ tasty-hspec-1.1.7.patch)
+sha512sums=('42a0d9c79e3c80780fbf65b9069586d908eaea8cdad62b35120369cfc1fa14f7155b8aba27356d6f454c6fb292bcd3f637ce59827795bdf5cce4e9ab5f9e7792'
+ '396fec6196fabe5e12894a60e621b47eacb59d7effe7a1b4b9145be8acae4c0afc93a46d8495eea1dd8752195948c049e34d3260fedb9d10a425646a55b07acb')
+
+prepare() {
+ patch -d $_hkgname-$pkgver -p1 < tasty-hspec-1.1.7.patch
+}
+
+build() {
+ cd $_hkgname-$pkgver
+
+ # Hack to allow ghc execute tasty-discover when building tests
+ export PATH="$PWD/dist/build/$_hkgname:$PATH"
+ export LD_LIBRARY_PATH="$PWD/dist/build"
+
+ # Test could be built before executable, so build an executable first
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla
+ runhaskell Setup build $MAKEFLAGS
+
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+ --prefix=/usr --docdir=/usr/share/doc/$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-tasty-discover/repos/community-staging-x86_64/tasty-hspec-1.1.7.patch (from rev 1052032, haskell-tasty-discover/trunk/tasty-hspec-1.1.7.patch)
===================================================================
--- community-staging-x86_64/tasty-hspec-1.1.7.patch (rev 0)
+++ community-staging-x86_64/tasty-hspec-1.1.7.patch 2021-11-18 05:30:24 UTC (rev 1052033)
@@ -0,0 +1,69 @@
+commit a7323eb6d64a7b094fb7312cf089f9b6ac6ed7f4
+Author: Felix Yan <felixonmars at archlinux.org>
+Date: Sat May 15 07:16:31 2021 +0800
+
+ Fix compatibility with tasty-hspec 1.1.7
+
+ tasty-hspec no longer re-exports Test.Hspec since 1.1.7. Let's import
+ it ourselves.
+
+diff --git a/tasty-discover.cabal b/tasty-discover.cabal
+index 9e4be46..d8cd477 100644
+--- a/tasty-discover.cabal
++++ b/tasty-discover.cabal
+@@ -39,6 +39,7 @@ common directory { build-depends: directory >=
+ common filepath { build-depends: filepath >= 1.3 && < 2.0 }
+ common Glob { build-depends: Glob >= 0.8 && < 1.0 }
+ common hedgehog { build-depends: hedgehog }
++common hspec { build-depends: hspec }
+ common tasty { build-depends: tasty }
+ common tasty-discover { build-depends: tasty-discover }
+ common tasty-hedgehog { build-depends: tasty-hedgehog }
+@@ -82,6 +83,7 @@ test-suite tasty-discover-test
+ , directory
+ , filepath
+ , hedgehog
++ , hspec
+ , tasty
+ , tasty-hedgehog
+ , tasty-hspec
+diff --git a/test/ConfigTest.hs b/test/ConfigTest.hs
+index 7a52360..3a7bbe8 100644
+--- a/test/ConfigTest.hs
++++ b/test/ConfigTest.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ {-# LANGUAGE TupleSections #-}
+
+ {-# OPTIONS_GHC -fno-warn-orphans #-}
+@@ -12,6 +13,10 @@ import Test.Tasty.Hspec
+ import Test.Tasty.HUnit
+ import Test.Tasty.QuickCheck
+
++#if MIN_VERSION_tasty_hspec(1,1,7)
++import Test.Hspec
++#endif
++
+ import qualified Data.Map.Strict as M
+
+ spec_modules :: Spec
+diff --git a/test/DiscoverTest.hs b/test/DiscoverTest.hs
+index 8e6cc55..b79b6ed 100644
+--- a/test/DiscoverTest.hs
++++ b/test/DiscoverTest.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ {-# LANGUAGE ScopedTypeVariables #-}
+
+ module DiscoverTest where
+@@ -8,6 +9,10 @@ import Test.Tasty.Hspec
+ import Test.Tasty.HUnit
+ import Test.Tasty.QuickCheck
+
++#if MIN_VERSION_tasty_hspec(1,1,7)
++import Test.Hspec
++#endif
++
+ import qualified Hedgehog as H
+ import qualified Hedgehog.Gen as G
+ import qualified Hedgehog.Range as R
More information about the arch-commits
mailing list