# $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.8" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" # one check fails: cxx_restarts msetfeature "!check" sminclude mtools mbuild 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_compile() { mconfigure || die # prevent excessive overlinking due to libtool all-abis "sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool || die" mmake || die } src_install() { mmake DESTDIR=${BINDIR} install || die mlink flex /usr/bin/lex || die }