void-packages/srcpkgs/re2c/template

36 lines
1.0 KiB
Bash
Raw Normal View History

2015-05-21 09:37:58 +02:00
# Template file for 're2c'
pkgname=re2c
2015-05-25 08:59:47 +02:00
version=0.14.3
2015-05-21 09:37:58 +02:00
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/"
2015-05-25 08:59:47 +02:00
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}/${version}/${pkgname}-${version}.tar.gz"
checksum=1c6806df599f3aef0804b576cfdf64bdba5ad590626dfca2d44e473460917e84
2015-05-21 09:37:58 +02:00
pre_configure() {
if [ -n "$CROSS_BUILD" ]; then
# 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
fi
2015-05-21 09:37:58 +02:00
}
do_build() {
make ${makejobs} ${make_build_args} ${make_build_target}
if [ ! -e host_re2c ]; then
mv re2c host_re2c
fi
2015-05-21 09:37:58 +02:00
./host_re2c -b scanner.re >scanner.cc
rm -f re2c scanner.o
make ${make_build_args} ${make_build_target}
}