summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ae43919002fdaaae06200c9a8f6913e53ad4be90 (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
# Maintainer: Rod Kay <rodakay5 at gmail dot com>

pkgname=gnatcoll-xref
pkgdesc='GNAT Components Collection - Tool to support parsing *.ali and *.gli files.'
pkgver=25.0w
pkgrel=1
epoch=1

url=https://github.com/AdaCore/gnatcoll-db
arch=(i686 x86_64)
license=(GPL3 custom)

depends=(gnatcoll-iconv gnatcoll-sqlite)
makedepends=(gprbuild)

_repo_name=gnatcoll-db
_source_dir=$_repo_name-$pkgver-20240505-16412-src

source=(https://github.com/charlie5/archlinux-gnatstudio-support/raw/main/gnatstudio-sources-2024/$_repo_name-$pkgver-20240408-1639A-src.tar.gz)
sha256sums=(66f30323be6cec6fc68cc58aa46a162c61196a2b9d44992f041599d3970afe35)


build()
{
    cd $srcdir/$_source_dir/xref

    # Rid flags not used by Ada.
    #
    CFLAGS="${CFLAGS//-Wformat}"
    CFLAGS="${CFLAGS//-Werror=format-security}"

    make setup BUILD=PROD prefix=/usr
    make -j1 GPRBUILD_OPTIONS="-R -cargs $CFLAGS -largs $LDFLAGS -gargs"
}


package()
{
    cd $srcdir/$_source_dir/xref

    # Make one install at a time to avoid GPRinstall reading/writing to
    # the same installed project files at the same time.
    #
    make prefix="$pkgdir/usr" install -j1

    # Install the license.
    #
    install -D -m644      \
       ../COPYING3        \
       $pkgdir/usr/share/licenses/$pkgname/COPYING3

    # Install the custom license.
    #
    install -D -m644      \
       ../COPYING.RUNTIME \
       $pkgdir/usr/share/licenses/$pkgname/COPYING.RUNTIME
}