# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
setvar pkgname = 'libantlr3c'
setvar pkgver = '3.4'
setvar pkgrel = '0'
setvar pkgdesc = ""C runtime for the ANTLR parsing library""
setvar url = ""http://www.antlr.org/""
setvar arch = ""all""
setvar license = ""BSD""
setvar depends = """"
setvar depends_dev = """"
setvar makedepends = "$depends_dev"
setvar install = """"
setvar subpackages = ""$pkgname-dev""
setvar source = ""http://www.antlr3.org/download/C/libantlr3c-$pkgver.tar.gz""

setvar _builddir = ""$srcdir"/libantlr3c-$pkgver"
proc prepare {
	local i
	cd $_builddir
	for i in $source {
		case (i) {
		*.patch { msg $i; patch -p1 -i "$srcdir"/$i || return 1}
		}
	}
	update_config_sub || return 1
}

proc build {
	cd $_builddir
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-abiflags \
		|| return 1
	make || return 1
}

proc package {
	cd $_builddir
	make DESTDIR="$pkgdir" install || return 1
}

setvar md5sums = ""08b1420129d5dccd0f4461cedf2a0d7d  libantlr3c-3.4.tar.gz""
setvar sha256sums = ""ca914a97f1a2d2f2c8e1fca12d3df65310ff0286d35c48b7ae5f11dcc8b2eb52  libantlr3c-3.4.tar.gz""
setvar sha512sums = ""8edb243d745ff5bf3b15940f124d1255a9ca965cb656a73a558aed7fa07effcd7620f23dc692e5d5169a03200254836dd57af3ce444ba225281a5b721497e211  libantlr3c-3.4.tar.gz""