[arch-commits] Commit in haskell-doctest/trunk (PKGBUILD)

Felix Yan felixonmars at archlinux.org
Sun Dec 20 10:47:14 UTC 2020


    Date: Sunday, December 20, 2020 @ 10:47:13
  Author: felixonmars
Revision: 780258

add CHECKFUNC hack

Modified:
  haskell-doctest/trunk/PKGBUILD

----------+
 PKGBUILD |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-12-20 10:39:20 UTC (rev 780257)
+++ PKGBUILD	2020-12-20 10:47:13 UTC (rev 780258)
@@ -11,8 +11,9 @@
 arch=('x86_64')
 depends=('ghc-libs' 'haskell-base-compat' 'haskell-ghc' 'haskell-syb' 'haskell-code-page'
          'haskell-ghc-paths')
-makedepends=('ghc' 'haskell-hunit' 'haskell-hspec' 'haskell-hspec-core' 'haskell-quickcheck'
-             'haskell-stringbuilder' 'haskell-silently' 'haskell-setenv' 'haskell-mockery')
+makedepends=('ghc')
+checkdepends=('haskell-hunit' 'haskell-hspec' 'haskell-hspec-core' 'haskell-quickcheck'
+              'haskell-stringbuilder' 'haskell-silently' 'haskell-setenv' 'haskell-mockery')
 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
 sha512sums=('7816af9e0ca419a0837b8a8c3bc943edbc44ec73d2a36acd8a7e868d370db9f60557667aa8efb81444aad47860defa6374b496fdcbd8f80403ee74e8b2543cee')
 
@@ -25,8 +26,14 @@
 build() {
     cd $_hkgname-$pkgver
 
+    if (( CHECKFUNC )); then
+        _opts=('--enable-tests')
+    else
+        _opts=('--disable-tests')
+    fi
+
     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
-        --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \
+        --prefix=/usr --docdir=/usr/share/doc/$pkgname "${_opts[@]}" \
         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
     runhaskell Setup build $MAKEFLAGS
     runhaskell Setup register --gen-script



More information about the arch-commits mailing list