Am Thu, Nov 25, 2021 at 10:09:40AM +0100 schrieb Sijmen J. Mulder: > Stefan Hagen <sh+openbsd-po...@codevoid.de>: > > Yes, we should use gsed RUN_DEP and the ifdef removal patch. I saw the > > patch has been merged upstream already, so we'll get it either way ;-) > > For later reference: https://github.com/jarun/nnn/pull/1243 > I created and tested a diff with the changes from Omar Polo.
Tested on two amd64 systems. Index: Makefile =================================================================== RCS file: /cvs/ports/sysutils/nnn/Makefile,v retrieving revision 1.17 diff -u -p -r1.17 Makefile --- Makefile 4 Oct 2021 14:16:52 -0000 1.17 +++ Makefile 25 Nov 2021 12:58:07 -0000 @@ -2,7 +2,7 @@ COMMENT = the missing terminal file browser for X -V = 4.3 +V = 4.4 DISTNAME = nnn-v${V} PKGNAME = nnn-${V} @@ -31,6 +31,8 @@ USE_GMAKE = Yes NO_TEST = Yes WRKDIST = ${WRKDIR}/nnn-${V} + +RUN_DEPENDS = textproc/gsed post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/bash-completion/completions/ Index: distinfo =================================================================== RCS file: /cvs/ports/sysutils/nnn/distinfo,v retrieving revision 1.14 diff -u -p -r1.14 distinfo --- distinfo 4 Oct 2021 14:16:52 -0000 1.14 +++ distinfo 25 Nov 2021 12:58:07 -0000 @@ -1,2 +1,2 @@ -SHA256 (nnn-v4.3.tar.gz) = tt+OJi5WE90ZK6xhCm2nETBmJ9Vlc/GncKFz7weJU7s= -SIZE (nnn-v4.3.tar.gz) = 236606 +SHA256 (nnn-v4.4.tar.gz) = 4Eo/Dwwq8eGMtvAF0YJnx3A2RCdNIbuT8Dsw5P09FlM= +SIZE (nnn-v4.4.tar.gz) = 239005 Index: patches/patch-nnn =================================================================== RCS file: patches/patch-nnn diff -N patches/patch-nnn --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-nnn 25 Nov 2021 12:58:07 -0000 @@ -0,0 +1,28 @@ +commit deead97e23981074d0e33520558d54b6e34fa374 +URL: https://github.com/jarun/nnn/pull/1243 +Author: Omar Polo <o...@omarpolo.com> +Date: Wed Nov 24 11:40:59 2021 +0100 + + drop unnecessary ifdef __linux__ + + since nnn requires gsed anyway, why don't use it? + Probably forgot in #1210 + +diff --git src/nnn.c src/nnn.c +index 1f02008..20a6051 100644 +--- src/nnn.c ++++ src/nnn.c +@@ -2729,12 +2729,7 @@ static void archive_selection(const char *cmd, const char *archive, const char * + } + + snprintf(buf, CMD_LEN_MAX, +-#ifdef __linux__ + SED" -ze 's|^%s/||' '%s' | xargs -0 %s %s", curpath, selpath, cmd, archive +-#else +- "tr '\\0' '\n' < '%s' | "SED" -e 's|^%s/||' | tr '\n' '\\0' | xargs -0 %s %s", +- selpath, curpath, cmd, archive +-#endif + ); + spawn(utils[UTIL_SH_EXEC], buf, NULL, NULL, F_CLI | F_CONFIRM); + free(buf); +