forked from archlinux/svntogit-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
47 lines (40 loc) · 1.33 KB
/
PKGBUILD
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
# Maintainer: Guillaume ALAUX <[email protected]>
# Contributor: Andrea Scarpino <[email protected]>
# Contributor: George Giorgidze <giorgidze (at) gmail.com>
# Contributor: Stefan Husmann <[email protected]>
pkgname=antlr2
pkgver=2.7.7
pkgrel=11
arch=('x86_64')
url="https://www.antlr2.org/"
license=('custom')
makedepends=('java-environment' 'sh')
options=('staticlibs')
source=("https://www.antlr2.org/download/antlr-${pkgver}.tar.gz"
'runantlr2.sh'
'gcc4.4.patch')
md5sums=('01cc9a2a454dd33dcd8c856ec89af090'
'e4aa827cf78f97c4e5fae086831192d6'
'8574c93f40e6477e83c29f9b07de49da')
prepare() {
cd "${srcdir}/antlr-${pkgver}"
patch -Np0 -i "${srcdir}"/gcc4.4.patch
}
build() {
cd "${srcdir}/antlr-${pkgver}"
./configure --prefix=/usr \
--disable-examples \
--disable-csharp
make
}
package() {
pkgdesc='Language recognition tool providing a framework to build grammatical parsers'
depends=('java-runtime' 'sh')
provides=("antlr=${pkgver}")
cd "${srcdir}"/antlr-${pkgver}/lib/cpp
make prefix="${pkgdir}/usr" install
install -Dm644 ../../antlr/antlr.jar "${pkgdir}"/usr/share/java/antlr2.jar
install -Dm755 "${srcdir}"/runantlr2.sh "${pkgdir}"/usr/bin/runantlr2
install -Dm644 "${srcdir}"/antlr-${pkgver}/LICENSE.txt \
"${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}