#!/bin/bash
# Build script for GNU patchset -e
cd "$SRCDIR"# Fix illumos gnulib compatibility issuesfor f in lib/localename.c gnulib-tests/localename.c; doif[ -f "$f"]; then sed -i 's/extern char \* getlocalename_l/extern const char * getlocalename_l/'"$f"fidone./configure \
--build=$BUILD_TRIPLE \
--host=$BUILD_TRIPLE \
--prefix=$PREFIX
# Fix illumos memset_s false detection if presentfor config in lib/config.h gnulib-tests/config.h config.h; doif[ -f "$config"]; then sed -i 's/#define HAVE_MEMSET_S 1/\/* #undef HAVE_MEMSET_S - illumos has it as macro only *\//'"$config"fidonegmake -j${JOBS:-1}gmake install DESTDIR="$PKGDIR"