#!/bin/bash # Build script for GNU patch set -e cd "$SRCDIR" # 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 \ --host=$BUILD_TRIPLE \ --prefix=$PREFIX # 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 patch - Apply diff files # https://www.gnu.org/software/patch/ [package] name = "patch" version = "2.7.6" release = 1 description = "GNU patch - Apply diff files to originals" url = "https://www.gnu.org/software/patch/" license = "GPL-3.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "patch-2.7.6.tar.xz" urls = ["https://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz"] checksum = "ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd" [build] parallel = true