2014-03-13 21:23:48 +00:00
|
|
|
# $Id$
|
|
|
|
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
|
|
|
|
# Contributor: Mathieu Clabaut <mathieu.clabaut@gmail.com>
|
|
|
|
# Contributor: Artyom Smirnov <smirnoffjr@gmail.com>
|
|
|
|
# Contributor: Alexis Robert <alexis.robert@gmail.com>
|
|
|
|
# Maintainer: Daniel Nagy < danielnagy at gmx de>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - configure with --disable-abiflags
|
|
|
|
# - patch to build with environment's CFLAGS
|
|
|
|
|
|
|
|
pkgname=libantlr3c
|
2017-08-14 12:30:30 +00:00
|
|
|
pkgver=3.5.2
|
2014-03-13 21:23:48 +00:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc="C runtime for the ANTLR parsing library"
|
|
|
|
url="http://www.antlr.org/"
|
|
|
|
arch=("i686" "x86_64")
|
|
|
|
license=("BSD")
|
|
|
|
depends=('bash')
|
|
|
|
makedepends=()
|
2017-08-14 12:30:30 +00:00
|
|
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/antlr/antlr3/archive/$pkgver.tar.gz"
|
2014-03-13 21:23:48 +00:00
|
|
|
antlr-c-3.3-cflags.patch)
|
2017-08-14 12:30:30 +00:00
|
|
|
sha256sums=('529baf7d11f06b773543e25271c1a6e1735d2f8061f4866d1ea5c99a5d71ee1f'
|
|
|
|
'a40e2e78d60764dcc56478e773152273daf78bd44d428409f7ed9290d6ba4702')
|
2014-03-13 21:23:48 +00:00
|
|
|
|
|
|
|
prepare() {
|
2017-08-14 12:30:30 +00:00
|
|
|
cd "${srcdir}/antlr3-${pkgver}/runtime/C"
|
|
|
|
patch -p1 -i ${srcdir}/antlr-c-3.3-cflags.patch
|
|
|
|
cat <<EOF >antlr3config.h.in
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <netinet/tcp.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <antlr3defs.h>
|
|
|
|
EOF
|
|
|
|
aclocal
|
|
|
|
libtoolize
|
|
|
|
automake --add-missing
|
|
|
|
autoconf
|
2014-03-13 21:23:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2017-08-14 12:30:30 +00:00
|
|
|
cd "${srcdir}/antlr3-${pkgver}/runtime/C"
|
2014-03-13 21:23:48 +00:00
|
|
|
[ "$CARCH" = "x86_64" ] && _cfgopt=--enable-64bit
|
|
|
|
[[ $CARCH =~ arm.* ]] && _cfgopt=--disable-abiflags
|
|
|
|
./configure --prefix=/usr --sysconfdir=/etc ${_cfgopt}
|
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2017-08-14 12:30:30 +00:00
|
|
|
cd "${srcdir}/antlr3-${pkgver}/runtime/C"
|
2014-03-13 21:23:48 +00:00
|
|
|
make install DESTDIR="${pkgdir}"
|
|
|
|
install -Dm0644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
|
|
|
|
}
|