void-packages/srcpkgs/flex/template
2016-10-25 14:20:23 +02:00

38 lines
1,008 B
Bash

# Template file for 'flex'
pkgname=flex
version=2.6.2
revision=1
build_style=gnu-configure
# YES REALLY! WE DONT WANT BINS LINKED TO LIBFL!
configure_args="--disable-shared"
hostmakedepends="help2man bison"
makedepends="bison"
depends="bison libfl-devel-${version}_${revision}"
short_desc="The Fast Lexical Analyzer"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://flex.sourceforge.net"
license="BSD"
distfiles="https://github.com/westes/${pkgname}/releases/download/v${version}/${pkgname}-${version}.tar.gz"
checksum=9a01437a1155c799b7dc2508620564ef806ba66250c36bf5f9034b1c207cb2c9
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" flex"
post_configure() {
# Use host flex
sed -i 's,./stage1flex$(EXEEXT),flex,' src/Makefile
sed -i '/^flex.1/s,../src/flex$(EXEEXT),/usr/bin/flex,' \
doc/Makefile
}
fi
post_install() {
vlicense COPYING
}
libfl-devel_package() {
replaces="libfl>=0"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
}
}