archrelease: copy trunk to extra-x86_64
[arch-packages.git] / antlr2 / trunk / PKGBUILD
blob1a453456dcbe647e22b3b211a6d6e057bf41665c
1 # Maintainer: Guillaume ALAUX <guillaume@archlinux.org>
2 # Contributor: Andrea Scarpino <andrea@archlinux.org>
3 # Contributor: George Giorgidze <giorgidze (at) gmail.com>
4 # Contributor: Stefan Husmann <stefan-husmann@t-online.de>
6 pkgname=antlr2
7 pkgver=2.7.7
8 pkgrel=12
9 arch=('x86_64')
10 url="https://www.antlr2.org/"
11 pkgdesc='Language recognition tool providing a framework to build grammatical parsers'
12 license=('custom')
13 depends=('java-runtime' 'sh')
14 provides=("antlr=${pkgver}")
15 makedepends=('java-environment')
16 options=('staticlibs')
17 source=("https://www.antlr2.org/download/antlr-${pkgver}.tar.gz"
18         'runantlr2.sh'
19         'gcc4.4.patch')
20 md5sums=('01cc9a2a454dd33dcd8c856ec89af090'
21          'e4aa827cf78f97c4e5fae086831192d6'
22          '8574c93f40e6477e83c29f9b07de49da')
24 prepare() {
25   cd antlr-${pkgver}
26   patch -Np0 -i "${srcdir}"/gcc4.4.patch
29 build() {
30   cd antlr-${pkgver}
32   sed -i "/^CFLAGS=/d" ./configure
33   export CXX_LIB_CMD="ld ${LDFLAGS}"
34   export CXX_LINK_CMD="ld ${LDFLAGS}"
35   ./configure --prefix=/usr \
36     --disable-examples \
37     --disable-csharp
38   make CXXFLAGS="${CXXFLAGS} -fPIC"
41 package() {
42   cd antlr-${pkgver}/lib/cpp
43   make prefix="${pkgdir}/usr" install
45   install -Dm644 ../../antlr/antlr.jar "${pkgdir}"/usr/share/java/antlr2.jar
46   install -Dm755 "${srcdir}"/runantlr2.sh "${pkgdir}"/usr/bin/runantlr2
47   install -Dm644 "${srcdir}"/antlr-${pkgver}/LICENSE.txt \
48     "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE