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>
10 url="https://www.antlr2.org/"
11 pkgdesc='Language recognition tool providing a framework to build grammatical parsers'
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"
20 md5sums=('01cc9a2a454dd33dcd8c856ec89af090'
21 'e4aa827cf78f97c4e5fae086831192d6'
22 '8574c93f40e6477e83c29f9b07de49da')
26 patch -Np0 -i "${srcdir}"/gcc4.4.patch
32 sed -i "/^CFLAGS=/d" ./configure
33 export CXX_LIB_CMD="ld ${LDFLAGS}"
34 export CXX_LINK_CMD="ld ${LDFLAGS}"
35 ./configure --prefix=/usr \
38 make CXXFLAGS="${CXXFLAGS} -fPIC"
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