1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=math-functions
5 pkgname=haskell-math-functions
8 pkgdesc="Special functions and Chebyshev polynomials"
9 url="https://github.com/bos/math-functions"
12 depends=('ghc-libs' 'haskell-data-default-class' "haskell-primitive" "haskell-vector")
14 checkdepends=('haskell-erf' 'haskell-quickcheck' 'haskell-tasty' 'haskell-tasty-hunit'
15 'haskell-tasty-quickcheck' 'haskell-vector-th-unbox')
16 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
17 sha512sums=('cb29901294463edbba37e97445bb9ed039bdc43815c9bbd9b9bb92b87393e6e891f5840d337c6c06c7e30d26107d32a59c39ac51436be43dba00d0e2411a9053')
22 if (( CHECKFUNC )); then
23 _opts=('--enable-tests')
25 _opts=('--disable-tests')
28 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
29 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname "${_opts[@]}" \
30 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
32 runhaskell Setup build $MAKEFLAGS
33 runhaskell Setup register --gen-script
34 runhaskell Setup unregister --gen-script
35 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
36 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
41 runhaskell Setup test --show-details=direct
47 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
48 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
49 runhaskell Setup copy --destdir="$pkgdir"
50 install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
51 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE