blob: 4cbfe6efefa54390d9f428e886809701909401ee (
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
76
77
78
79
80
|
# Maintainer: Rod Kay <rodakay5 at gmail dot com>
pkgname=ada-libfswatch
pkgdesc='An Ada binding to the libfswatch library in the fswatch project.'
pkgver=25.0w
pkgrel=1
epoch=1
url=https://github.com/AdaCore/ada_libfswatch
arch=(x86_64)
license=(GPL3 custom)
depends=(fswatch gnatcoll-core)
makedepends=(gprbuild)
_repo_name=ada_libfswatch
_source_dir=$_repo_name-$pkgver-20240505-16247-src
source=(https://github.com/charlie5/archlinux-gnatstudio-support/raw/main/gnatstudio-sources-2024/$_repo_name-$pkgver-20240505-16247-src.tar.gz
0001-Use-system-libfswatch-install.patch
0002-Build-dynamic-library.patch
0003-Makefile-allow-passing-custom-flags-to-gprbuild.patch)
sha256sums=(fda4f4390bb78b1805b3fabe1248c99e59b72933368bad941ec346d4faaedc1d
a1947e1d8b0f0449d196d422d0a2fd038fd8aa6e0abdd533cf71dbece901492b
904c986f2cb67744f8799ec7770f73f3f893713d0ccc5f4c552d8d9a3cc9dae8
53dc07cbb68b3ddfdb3133b0c2edb9878818fcba54d2f1dbc70b8821cf42d1cf)
prepare()
{
cd $srcdir/$_source_dir
patch -p1 < $srcdir/0001-Use-system-libfswatch-install.patch
patch -p1 < $srcdir/0002-Build-dynamic-library.patch
patch -p1 < $srcdir/0003-Makefile-allow-passing-custom-flags-to-gprbuild.patch
}
build()
{
cd $srcdir/$_source_dir
ADA_FLAGS="$CFLAGS"
ADA_FLAGS="${ADA_FLAGS//-Wformat}"
ADA_FLAGS="${ADA_FLAGS//-Werror=format-security}"
make GPRBUILD_FLAGS="-vh -R -cargs $ADA_FLAGS -largs $LDFLAGS -gargs"
}
package()
{
cd $srcdir/$_source_dir
OS=unix \
make install DESTDIR=$pkgdir/usr
# 'gprinstall' installs a soft link for '/usr/lib/libfswatch.so'
# which is already owned by fswatch, so remove it.
#
rm "$pkgdir/usr/lib/libfswatch.so"
# 'gprinstall' is set to be recursive in the Makefile which adds 'gnatcoll.gpr', so remove it.
#
rm "$pkgdir/usr/share/gpr/gnatcoll.gpr"
rm "$pkgdir/usr/share/gpr/manifests/gnatcoll"
# Install the license.
#
install -D -m644 \
COPYING3 \
$pkgdir/usr/share/licenses/ada-libfswatch/COPYING3
# Install the custom license.
#
install -D -m644 \
COPYING.RUNTIME \
$pkgdir/usr/share/licenses/ada-libfswatch/COPYING.RUNTIME
}
|