#!/bin/bash # Build script for GNU awk set -e cd "$SRCDIR" # Fix illumos gnulib compatibility issues (if present) # illumos declares getlocalename_l with const char* return type for f in lib/localename-unsafe.c lib/localename.c gnulib-tests/localename.c support/localename.c; do if [ -f "$f" ]; then sed -i 's/extern char \* getlocalename_l/extern const char * getlocalename_l/' "$f" fi done ./configure \ --prefix=$PREFIX \ --disable-nls # Fix illumos memset_s false detection if present for config in lib/config.h gnulib-tests/config.h support/config.h config.h; do if [ -f "$config" ]; then sed -i 's/#define HAVE_MEMSET_S 1/\/* #undef HAVE_MEMSET_S - illumos has it as macro only *\//' "$config" fi done gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # GNU Awk - Pattern scanning and processing language # https://www.gnu.org/software/gawk/ [package] name = "gawk" version = "5.3.0" release = 1 description = "GNU awk pattern scanning and processing language" url = "https://www.gnu.org/software/gawk/" license = "GPL-3.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "gawk-5.3.0.tar.xz" urls = ["https://ftp.gnu.org/gnu/gawk/gawk-5.3.0.tar.xz"] checksum = "ca9c16d3d11d0ff8c69d79dc0b47267e1329a69b39b799895604ed447d3ca90b" [build] parallel = true