#!/bin/zsh
# Build script for GNU nanoset -e
cd "$SRCDIR"# ncurses .pc files are in $PREFIX/lib/pkgconfigexport PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:${PKG_CONFIG_PATH:-}"# 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 \
--prefix=$PREFIX \
--sysconfdir=$SYSCONFDIR \
--disable-nls
# 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"