APP=flex
VERSION=2.6.4
BUILD=1sml
HOMEPAGE='https://github.com/westes/flex'
DOWNLOAD='https://github.com/westes/flex/archive/refs/tags/v2.6.4.tar.gz'
DESC="fast lexical analyzer generator"
REQUIRES="m4"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION
  fixbuilddirpermissions

  unset CPPFLAGS

  printf "all:\n\ttrue\n\ninstall:\n\ttrue\n\n" > tests/Makefile.in

  CPPFLAGS="-D_GNU_SOURCE -DSTDC_HEADERS" \
  ./configure \
    --prefix="" \
    --disable-nls \
    --disable-static 

  make
  make install DESTDIR=$PKG

  cp COPYING $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
6564218510945b678bb61a1375ccaa4c254aa43fc52f0c4e3d8b784f551bca82bb8ab1889bde522c3da9b04da99904d17420ef8615862bae65b925770fae2517  flex-2.6.4.tar.lz
"
