summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d4c0d128e898198dc021dbae2e4e26d8fc9e0740 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Maintainer: Stefan Biereigel <$(base64 --decode <<<'c3RlZmFuQGJpZXJlaWdlbC5kZQo=')>
# Contributor: xiretza <xiretza+aur@gmail.com>
# Contributor: thotypous <thotypous@gmail.com>
# Contributor: Patrick Lloyd <$(base64 --decode <<<'cGF0cmlja0BsbG95ZC5zaAo=')>
# Contributor: Sebastian Bøe <$(base64 --decode <<<'c2ViYXN0aWFuYm9vZUBnbWFpbC5jb20K')>
# Contributor: Darren Wu <$(base64 --decode <<<'ZGFycmVuMTk5NzA4MTBAZ21haWwuY29tCg==')>

pkgname=yosys-git
pkgrel=1
pkgver=0.41+111.r13563.a84e4f44f
pkgdesc='A framework for RTL synthesis'
arch=('x86_64' 'i686')
url='https://yosyshq.net/yosys/'
license=('custom:ISC')
provides=("yosys=$pkgver")
conflicts=("yosys")
depends=('tcl' 'libffi' 'python' 'boost-libs')
optdepends=('graphviz: Schematics display support' 'xdot: Design netlist display support')
makedepends=('git' 'mercurial' 'boost')
checkdepends=('iverilog' 'clang')
source=('git+https://github.com/YosysHQ/yosys.git'
        'git+https://github.com/YosysHQ/abc.git')

sha512sums=('SKIP'
            'SKIP')

pkgver() {
    cd "${srcdir}/yosys"
    printf "%s.r%s.%s" "$(make echo-yosys-ver)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    cd "${srcdir}/yosys"

    git submodule init
    git config submodule.abc.url "$srcdir/abc"
    git -c protocol.file.allow=always submodule update
}

build() {
    cd "${srcdir}/yosys"

    make config-gcc
    echo "ENABLE_LIBYOSYS=1" >> Makefile.conf
    echo "ENABLE_PYOSYS=1" >> Makefile.conf
    echo "ABCPULL=0" >> Makefile.conf

    make PREFIX="/usr"
}

check() {
    cd "${srcdir}/yosys"

    make test
}

package() {
    cd "${srcdir}/yosys"

    # disable stripping in the makefile - duplicated effort and makes debug packages impossible
    make STRIP=':' PREFIX="/usr" PYTHON_PREFIX="${pkgdir}/usr" DESTDIR="${pkgdir}" install

    install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}