"Sijmen J. Mulder" <[email protected]> writes:
> Martin Ziemer <[email protected]>:
>> This patch updates nnn from 4.3 to 4.4.
>
> Note nnn requires GNU sed (as 'gsed') for some of its functionality:
>
> https://github.com/jarun/nnn/pull/1210
>
> (It doesn't use configure...)
>
> Sijmen
It's fun because upstream merged the #ifdef stuff to define SED as gsed
but then left the 'sed -z' behind an #ifdef __linux__...
2731 snprintf(buf, CMD_LEN_MAX,
2732 #ifdef __linux__
2733 SED" -ze 's|^%s/||' '%s' | xargs -0 %s %s", curpath,
selpath, cmd, archive
2734 #else
2735 "tr '\\0' '\n' < '%s' | "SED" -e 's|^%s/||' | tr '\n'
'\\0' | xargs -0 %s %s",
2736 selpath, curpath, cmd, archive
2737 #endif
2738 );
should we patch that? the 'z' key works fine then, and maybe it's a bit
more robust against files with \n in them (if we even care)
anyway, I've been using nnn 4.4 since yesterday and it works for me too
(but I don't usually copy/move/archive stuff with it ^^")
Index: Makefile
===================================================================
RCS file: /home/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 24 Nov 2021 09:42:02 -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}
@@ -22,6 +22,8 @@ MASTER_SITES = https://github.com/jarun
# Uses -std=c11 so cannot use base-gcc
COMPILER = base-clang ports-gcc
COMPILER_LANGS = c
+
+RUN_DEPENDS = textproc/gsed
MAKE_FLAGS = CFLAGS_OPTIMIZATION=
FAKE_FLAGS = MANPREFIX="$(PREFIX)/man" \
Index: distinfo
===================================================================
RCS file: /home/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 24 Nov 2021 09:31:36 -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-src_nnn_c
===================================================================
RCS file: patches/patch-src_nnn_c
diff -N patches/patch-src_nnn_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_nnn_c 24 Nov 2021 09:40:48 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+Index: src/nnn.c
+--- src/nnn.c.orig
++++ src/nnn.c
+@@ -2729,12 +2729,7 @@ static void archive_selection(const char *cmd, const c
+ }
+
+ 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);