mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
57 lines
1.6 KiB
Bash
57 lines
1.6 KiB
Bash
# $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
|
|
pkgver=3.5.2
|
|
pkgrel=1
|
|
pkgdesc="C runtime for the ANTLR parsing library"
|
|
url="http://www.antlr.org/"
|
|
arch=("i686" "x86_64")
|
|
license=("BSD")
|
|
depends=('bash')
|
|
makedepends=()
|
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/antlr/antlr3/archive/$pkgver.tar.gz"
|
|
antlr-c-3.3-cflags.patch)
|
|
sha256sums=('529baf7d11f06b773543e25271c1a6e1735d2f8061f4866d1ea5c99a5d71ee1f'
|
|
'a40e2e78d60764dcc56478e773152273daf78bd44d428409f7ed9290d6ba4702')
|
|
|
|
prepare() {
|
|
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
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/antlr3-${pkgver}/runtime/C"
|
|
[ "$CARCH" = "x86_64" ] && _cfgopt=--enable-64bit
|
|
[[ $CARCH =~ arm.* ]] && _cfgopt=--disable-abiflags
|
|
./configure --prefix=/usr --sysconfdir=/etc ${_cfgopt}
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/antlr3-${pkgver}/runtime/C"
|
|
make install DESTDIR="${pkgdir}"
|
|
install -Dm0644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
|
|
}
|