APP=gawk
VERSION=4.2.1
BUILD=1sml
HOMEPAGE='https://www.gnu.org/software/gawk/'
DOWNLOAD='https://ftp.gnu.org/gnu/gawk/gawk-4.2.1.tar.xz'
DESC="POSIX-compliant pattern scanning and processing language"
REQUIRES="musl"

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

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

  CFLAGS="-static" \
  ./configure \
    --prefix="" \
    --libexecdir=/lib \
    --disable-nls \
    --without-mpfr \
    --without-readline 

  make CFLAGS="-static"
  make install DESTDIR=$PKG

  cp COPYING $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
0bf7ccefea01f6249e2da3299f0478421113adb6a827272fc08b02f2691754f3a2de28478681fd97944286c2495decc7dedc99bec11bcb7ee12ea17cf246e296  gawk-4.2.1.tar.lz
"
