# $Id$ PNAME="flex" PVER="2.6.4" PBUILD="r2" PCAT="sys-dev" DESCRIPTION="GNU fast lexical analyser generator." HOMEPAGE="https://github.com/westes/flex/releases" DEPEND=">= virtual/glibc >= sys-dev/m4-1.4" SDEPEND=">= sys-dev/bison-3.6" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" # one check fails: cxx_restarts msetfeature "!check" sminclude mtools multilib SRC_URI=( https://github.com/westes/${PNAME}/releases/download/v${PVER}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2DATE="updatecmd -nolist https://github.com/westes/flex/releases | highesttarball gz" src_prepare() { munpack ${SRCFILE} || die # remove tests which are incompatible with the latest bison all-abis sed -i -e '/test-bison-yylloc/d' -e '/test-bison-yylval/d' tests/Makefile.in || die # do not regenerate the man page all-abis touch '${SRCDIR}-${abi}'/doc/flex.1 || die } src_compile() { mconfigure || die # flex doesn't compiles sometimes with > -j1 mmake -j1 || die } src_install() { mmake DESTDIR=${BINDIR} install || die all-abis mlink libfl.a /usr/'$(mlibdir)'/libl.a || die cat > ${BINDIR}/usr/bin/lex << "EOF" #!/bin/sh exec /usr/bin/flex -l "$@" EOF mchmod 755 /usr/bin/lex || die }