#!/bin/zsh # Build script for GNU nano set -e cd "$SRCDIR" # ncurses .pc files are in $PREFIX/lib/pkgconfig export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:${PKG_CONFIG_PATH:-}" # Fix illumos gnulib compatibility issues for f in lib/localename.c gnulib-tests/localename.c; do if [ -f "$f" ]; then sed -i 's/extern char \* getlocalename_l/extern const char * getlocalename_l/' "$f" fi done ./configure --build=$BUILD_TRIPLE \ --prefix=$PREFIX \ --sysconfdir=$SYSCONFDIR \ --disable-nls # Fix illumos memset_s false detection if present for config in lib/config.h gnulib-tests/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 nano - Simple text editor # https://www.nano-editor.org/ [package] name = "nano" version = "8.2" release = 1 description = "GNU nano - Simple text editor" url = "https://www.nano-editor.org/" license = "GPL-3.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["ncurses"] build = ["ncurses"] [[source]] file = "nano-8.2.tar.xz" urls = ["https://www.nano-editor.org/dist/v8/nano-8.2.tar.xz"] checksum = "d5ad07dd862facae03051c54c6535e54c7ed7407318783fcad1ad2d7076fffeb" [build] parallel = true