summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fa5c131a574db3921d0af92cf2a05fe6f8d549b2 (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
65
66
67
68
69
70
71
72
73
74
75
# Maintainer: xiretza <xiretza+aur@gmail.com>
# Maintainer: Rod Kay <charlie5 on #ada at freenode.net>

pkgbase=gnatcoll-bindings
pkgname=(gnatcoll-python2 gnatcoll-readline gnatcoll-iconv gnatcoll-gmp)
_upstream_ver=20.0-20191009-1B2EA
pkgver=2020
pkgrel=3

pkgdesc='GNAT Components Collection - Language and library bindings'
url='https://github.com/AdaCore/gnatcoll-bindings/'
arch=('i686' 'x86_64')
license=('GPL')

makedepends=('python2' 'gprbuild' 'gnatcoll-core')

_checksum=3c54db553121bf88877e2f56ac4fca36765186eb
source=("${pkgbase}-${_upstream_ver}-src.tar.gz::https://community.download.adacore.com/v1/${_checksum}?filename=${pkgbase}-${_upstream_ver}-src.tar.gz")
sha1sums=("$_checksum")

build()
{
    _gpr_opts="-R -cargs $CFLAGS -largs $LDFLAGS"

    cd "$srcdir/$pkgbase-$_upstream_ver-src/python"
    # --gpr-opts reads all remaining arguments, so no quotes
    python2 setup.py build --prefix=/usr --gpr-opts $_gpr_opts

    cd "$srcdir/$pkgbase-$_upstream_ver-src/readline"
    python2 setup.py build --prefix=/usr --accept-gpl --gpr-opts $_gpr_opts

    cd "$srcdir/$pkgbase-$_upstream_ver-src/iconv"
    python2 setup.py build --prefix=/usr --gpr-opts $_gpr_opts

    cd "$srcdir/$pkgbase-$_upstream_ver-src/gmp"
    python2 setup.py build --prefix=/usr --gpr-opts $_gpr_opts
}

package_gnatcoll-python2()
{
    pkgdesc='GNAT Components Collection - Interface to the python 2 interpreter.'
    depends=('python2' 'gnatcoll-core')
    provides=('gnatcoll-python')
    replaces=('gnatcoll-python')

    cd "$srcdir/$pkgbase-$_upstream_ver-src/python"
    python2 setup.py install --prefix="$pkgdir/usr"
}

package_gnatcoll-readline()
{
    pkgdesc='GNAT Components Collection - Bindings to readline'
    depends=('readline' 'gnatcoll-core')

    cd "$srcdir/$pkgbase-$_upstream_ver-src/readline"
    python2 setup.py install --prefix="$pkgdir/usr"
}

package_gnatcoll-iconv()
{
    pkgdesc='GNAT Components Collection - Bindings to Libiconv'
    depends=('libiconv' 'gnatcoll-core')

    cd "$srcdir/$pkgbase-$_upstream_ver-src/iconv"
    python2 setup.py install --prefix="$pkgdir/usr"
}

package_gnatcoll-gmp()
{
    pkgdesc='GNAT Components Collection - Bindings to GMP'
    depends=('gmp' 'gnatcoll-core')

    cd "$srcdir/$pkgbase-$_upstream_ver-src/gmp"
    python2 setup.py install --prefix="$pkgdir/usr"
}