void-packages/srcpkgs/re2c/template

30 lines
866 B
Bash
Raw Normal View History

2015-05-21 07:37:58 +00:00
# Template file for 're2c'
pkgname=re2c
version=0.14.2
revision=1
build_style=gnu-configure
hostmakedepends="bison"
short_desc="Tool for generating fast C-based recognizers"
maintainer="beefcurtains <beefcurtains@users.noreply.github.com>"
license="Public Domain"
homepage="http://re2c.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${version}/${pkgname}-${version}.tar.gz"
checksum=a702eb63977af4715555edb41eba3b47bbfdcdb44b566d146869a7db022f1c30
pre_configure() {
# re2c uses itself to build, but that's not
# possible when cross-compiling. Here it's
# forced to build on the host first, so the
# dependency can be satisfied.
env - PATH=/usr/bin:/usr/sbin ./configure
make ${makejobs}
mv re2c host_re2c
make clean
}
post_build() {
./host_re2c -b scanner.re >scanner.cc
rm -f re2c scanner.o
make ${make_build_args} ${make_build_target}
}