summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3e69b9cdcdf9c98306c20385ff1db071dee6b554 (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
# Maintainer: Pierre-Marie de Rodat <pmderodat on #ada at freenode.net>

pkgname=langkit-git
pkgver=r7153.b32ae90dc
pkgrel=1

pkgdesc='Compiler for syntactic and semantic language analysis libraries'
url='https://github.com/AdaCore/langkit/'
arch=('any')
license=('GPL')

depends=('gcc-ada' 'gprbuild' 'gnatcoll-core' 'gnatcoll-iconv' 'autopep8'
         'python-psutil' 'python-sphinx' 'python-yaml' 'python-docutils'
         'python-e3-core' 'python-funcy' 'python-mako' 'yapf')
makedepends=('git')

provides=('langkit')
conflicts=('langkit')

source=('git+https://github.com/AdaCore/langkit.git')
sha1sums=('SKIP')

pkgver() {
    cd "$srcdir/${pkgname%-git}"
    printf "r%s.%s" \
        "$(git rev-list --count HEAD)" \
        "$(git rev-parse --short HEAD)"
}

build()
{
    cd "$srcdir/${pkgname%-git}"

    # Make the Langkit Python package tree available for import
    export PYTHONPATH="$srcdir/${pkgname%-git}"

    # Build the Langkit_Support library, used by all Langkit-generated
    # libraries.
    python manage.py build-langkit-support \
        --library-types=static,static-pic,relocatable \
        --build-mode=prod \
        --gargs="-R"
}

package()
{
    cd "$srcdir/${pkgname%-git}"
    python setup.py install --root="$pkgdir"

    python manage.py install-langkit-support \
        --library-types=static,static-pic,relocatable \
        --build-mode=prod \
        "$pkgdir/usr"
}