void-packages/srcpkgs/flex/template
Jürgen Buchmüller 34bb57a608 flex: fix for glibc-2.26
We need to define _GNU_SOURCE to make stdlib.h define the function
reallocarray(). If not defined, flex builds with a warning and
crashes on invocation.
2017-08-08 07:25:25 +02:00

31 lines
835 B
Bash

# Template file for 'flex'
pkgname=flex
version=2.6.4
revision=2
build_style=gnu-configure
configure_args="--disable-bootstrap --disable-shared"
hostmakedepends="bison"
makedepends="bison"
depends="bison libfl-devel-${version}_${revision} m4"
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=e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995
# Required to enable the definition of reallocarray() in stdlib.h
CFLAGS="-D_GNU_SOURCE"
post_install() {
vlicense COPYING
}
libfl-devel_package() {
replaces="libfl>=0"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
}
}