1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=wl-pprint-extras
4 pkgname=haskell-wl-pprint-extras
7 pkgdesc="A free monad based on the Wadler/Leijen pretty printer"
8 url="https://github.com/ekmett/wl-pprint-extras/"
11 depends=('ghc-libs' 'haskell-semigroupoids' 'haskell-utf8-string')
13 source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
14 sha512sums=('705107842ccbf4eb23d0b9e8069fd4d5bb1b03ffecbf9efaa8a579fd977380913d590fa370cc42476d5b28fde98fc44e7879fe343f761cd1751ebeb0b8c0e242')
18 sed -e '/nats/d' -e '/semigroups/d' -e 's/< *0.6/<1/' -i $_hkgname.cabal
19 sed -i -e '/fail _ = empty/d' src/Text/PrettyPrint/Free/Internal.hs
25 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
26 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname \
27 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
28 runhaskell Setup build $MAKEFLAGS
29 runhaskell Setup register --gen-script
30 runhaskell Setup unregister --gen-script
31 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
32 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
38 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
39 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
40 runhaskell Setup copy --destdir="$pkgdir"
41 install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
42 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE