PKGBUILDs/community/libantlr3c/PKGBUILD

61 lines
1.5 KiB
Bash
Raw Normal View History

2019-02-25 13:47:42 +00:00
# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
2014-03-13 21:23:48 +00:00
# Contributor: Mathieu Clabaut <mathieu.clabaut@gmail.com>
# Contributor: Artyom Smirnov <smirnoffjr@gmail.com>
# Contributor: Alexis Robert <alexis.robert@gmail.com>
2019-02-25 13:47:42 +00:00
# Contributor: Daniel Nagy <danielnagy@gmx.de>
2014-03-13 21:23:48 +00:00
# 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
2020-07-10 01:19:09 +00:00
pkgrel=4
2019-02-25 13:47:42 +00:00
pkgdesc='ANother Tool for Language Recognition'
url='https://www.antlr3.org'
arch=(x86_64)
license=(BSD)
makedepends=(git)
source=("git+https://github.com/antlr/antlr3.git#tag=$pkgver"
2014-03-13 21:23:48 +00:00
antlr-c-3.3-cflags.patch)
2019-02-25 13:47:42 +00:00
md5sums=('SKIP'
'f936f142053c03ec57a0be95b7b8fe0c')
2014-03-13 21:23:48 +00:00
prepare() {
2019-02-25 13:47:42 +00:00
cd antlr3/runtime/C
2017-08-14 12:30:30 +00:00
patch -p1 -i ${srcdir}/antlr-c-3.3-cflags.patch
2019-02-25 13:47:42 +00:00
cat <<EOF> antlr3config.h.in
2017-08-14 12:30:30 +00:00
#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() {
2019-02-25 13:47:42 +00:00
cd antlr3/runtime/C
2014-03-13 21:23:48 +00:00
[[ $CARCH =~ arm.* ]] && _cfgopt=--disable-abiflags
./configure --prefix=/usr --sysconfdir=/etc ${_cfgopt}
make
}
package() {
2019-02-25 13:47:42 +00:00
cd antlr3/runtime/C
DESTDIR="$pkgdir" make install
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
2014-03-13 21:23:48 +00:00
}
2019-02-25 13:47:42 +00:00
# getver: antlr3.org
# vim: ts=2 sw=2 et: