blob: 2ace747cc890e3f6a621ecc4452cb0aa5a7ecf45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# This file was generated by https://github.com/berberman/arch-hs, please check it manually.
# Maintainer: Ferdinand Bachmann <theferdi265@gmail.com>
pkgname=sv2v
pkgver=0.0.12
pkgrel=1
pkgdesc="SystemVerilog to Verilog conversion"
url="https://github.com/zachjs/sv2v"
license=("custom: BSD3")
arch=('x86_64')
depends=('ghc-libs' 'haskell-cmdargs' 'haskell-githash' 'haskell-hashable' 'haskell-vector')
makedepends=('ghc' 'alex' 'happy')
source=("https://github.com/zachjs/$pkgname/archive/refs/tags/v$pkgver.tar.gz"
"commit-5374679e4bb26e115b9a9b4a2d8ef4253d7a8bf3.patch")
sha256sums=('b64312c995f2d2792fbe610f4a0440259e7e2a9ad9032b37beabf621da51c6da'
'3c00cd5d53310a45ddbeadaf7e63008e5e48ca7594c80e28992e5f0e8bd76902')
prepare() {
cd $pkgname-$pkgver
# allow building with happy v2
# https://github.com/zachjs/sv2v/commit/5374679e4bb26e115b9a9b4a2d8ef4253d7a8bf3
patch -p1 < "$srcdir/commit-5374679e4bb26e115b9a9b4a2d8ef4253d7a8bf3.patch"
}
build() {
cd $pkgname-$pkgver
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=-optl-Wl\,-z\,relro\,-z\,now \
--ghc-option='-pie'
runhaskell Setup build
runhaskell Setup register --gen-script
runhaskell Setup unregister --gen-script
if [[ -f register.sh ]]; then sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh; fi
if [[ -f unregister.sh ]]; then sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh; fi
}
package() {
cd $pkgname-$pkgver
if [[ -f register.sh ]]; then install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh; fi
if [[ -f unregister.sh ]]; then install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh; fi
runhaskell Setup copy --destdir="$pkgdir"
install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
}
|