1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
6 pkgdesc="CAES Language for Synchronous Hardware"
7 url="https://clash-lang.org/"
10 depends=('ghc-libs' 'haskell-clash-lib' 'haskell-clash-prelude' 'haskell-concurrent-supply'
11 'haskell-data-binary-ieee754' 'haskell-extra' 'haskell-ghc' 'haskell-ghc-typelits-extra'
12 'haskell-ghc-typelits-knownnat' 'haskell-ghc-typelits-natnormalise' 'haskell-hashable'
13 'haskell-lens' 'haskell-primitive' 'haskell-reflection' 'haskell-split' 'haskell-uniplate'
14 'haskell-unordered-containers' 'haskell-utf8-string' 'haskell-vector')
15 makedepends=('ghc' 'uusi')
17 source=("https://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz")
18 sha512sums=('b469a23efafc62b2a9be52e56f9d3c7b22db4c7bcabb655454f78739c879bf3629aca804d966a5f665b09459a9e29608ff1d0666f5dcca59a43b18b1951be62b')
22 uusi -u lens $pkgname.cabal
28 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
29 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
30 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
31 --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
34 runhaskell Setup build $MAKEFLAGS
35 runhaskell Setup register --gen-script
36 runhaskell Setup unregister --gen-script
37 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
38 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
43 runhaskell Setup test --show-details=direct
49 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
50 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
51 runhaskell Setup copy --destdir="$pkgdir"
52 install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
53 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE