blob: 77f37b20a064fb99facac9c3376b77133077e396 (
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
|
# $Id: PKGBUILD 193188 2013-08-18 11:26:04Z guillaume $
# Maintainer: Guillaume ALAUX <guillaume@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: George Giorgidze <giorgidze (at) gmail.com>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
pkgbase=antlr2
pkgname=('antlr2' 'python2-antlr2')
pkgver=2.7.7
pkgrel=4
# architecture dependant files in /usr/lib/libantlr.a
arch=('i686' 'x86_64')
url="http://www.antlr2.org/"
license=('custom')
makedepends=('java-environment' 'python2' 'sh')
source=("http://www.antlr2.org/download/antlr-${pkgver}.tar.gz"
'runantlr2.sh'
'gcc4.4.patch')
md5sums=('01cc9a2a454dd33dcd8c856ec89af090'
'e4aa827cf78f97c4e5fae086831192d6'
'8574c93f40e6477e83c29f9b07de49da')
build() {
cd "${srcdir}/antlr-${pkgver}"
patch -Np0 -i ${srcdir}/gcc4.4.patch
./configure --prefix=/usr \
--disable-examples \
--disable-csharp
make
}
package_antlr2() {
pkgdesc='Tool for language recognition with C++ or Java actions'
depends=('java-runtime' 'sh')
replaces=('antlr')
conflicts=('antlr')
provides=("antlr=${pkgver}")
cd ${srcdir}/antlr-${pkgver}/lib/cpp
make prefix="${pkgdir}/usr" install
install -Dm644 ${srcdir}/antlr-${pkgver}/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"
}
package_python2-antlr2() {
pkgdesc='Tool for language recognition with C++ or Java actions - Python runtime support'
depends=('antlr2' 'python2')
replaces=('python-antlr')
conflicts=('python-antlr')
provides=("python-antlr=${pkgver}")
cd ${srcdir}/antlr-${pkgver}/lib/python
python2 setup.py install --root="${pkgdir}" --optimize=1
install -d ${pkgdir}/usr/share/licenses
ln -s /usr/share/licenses/antlr2 ${pkgdir}/usr/share/licenses/${pkgname}
}
|