Re: [maintainer update] nnn 4.3 -> 4.4

2021-11-25 Thread Martin Ziemer
Am Thu, Nov 25, 2021 at 10:09:40AM +0100 schrieb Sijmen J. Mulder:
> Stefan Hagen :
> > 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
--- Makefile4 Oct 2021 14:16:52 -   1.17
+++ Makefile25 Nov 2021 12:58:07 -
@@ -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
--- distinfo4 Oct 2021 14:16:52 -   1.14
+++ distinfo25 Nov 2021 12:58:07 -
@@ -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 -
+++ patches/patch-nnn   25 Nov 2021 12:58:07 -
@@ -0,0 +1,28 @@
+commit deead97e23981074d0e33520558d54b6e34fa374
+URL: https://github.com/jarun/nnn/pull/1243
+Author: Omar Polo 
+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);
+



Re: [maintainer update] nnn 4.3 -> 4.4

2021-11-25 Thread Sijmen J. Mulder
Stefan Hagen :
> 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



Re: [maintainer update] nnn 4.3 -> 4.4

2021-11-24 Thread Stefan Hagen
Omar Polo wrote:
> "Sijmen J. Mulder"  writes:
> > Martin Ziemer :
> >> 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's fun because upstream merged the #ifdef stuff to define SED as gsed
> but then left the 'sed -z' behind an #ifdef __linux__...
> 
> [... code ...]
> 
> 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)

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 ;-)

ok sdk@



Re: [maintainer update] nnn 4.3 -> 4.4

2021-11-24 Thread Omar Polo
"Sijmen J. Mulder"  writes:

> Martin Ziemer :
>> 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
--- Makefile4 Oct 2021 14:16:52 -   1.17
+++ Makefile24 Nov 2021 09:42:02 -
@@ -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
--- distinfo4 Oct 2021 14:16:52 -   1.14
+++ distinfo24 Nov 2021 09:31:36 -
@@ -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 -
+++ patches/patch-src_nnn_c 24 Nov 2021 09:40:48 -
@@ -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);



Re: [maintainer update] nnn 4.3 -> 4.4

2021-11-24 Thread Martin Ziemer
Am Wed, Nov 24, 2021 at 10:00:59AM +0100 schrieb Sijmen J. Mulder:
> Martin Ziemer :
> > 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

You are right. gsed is now needed for basic functionality (I like the
mass-renames in nnn)

Added RUN_DEPENDS to solve this problem, until there is a release
without this dependency.

Index: Makefile
===
RCS file: /cvs/ports/sysutils/nnn/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- Makefile4 Oct 2021 14:16:52 -   1.17
+++ Makefile24 Nov 2021 09:32:58 -
@@ -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
--- distinfo4 Oct 2021 14:16:52 -   1.14
+++ distinfo24 Nov 2021 09:32:58 -
@@ -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



Re: [maintainer update] nnn 4.3 -> 4.4

2021-11-24 Thread Sijmen J. Mulder
Martin Ziemer :
> 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



Re: [maintainer update] nnn 4.3 -> 4.4

2021-11-23 Thread Stefan Hagen
Martin Ziemer wrote:
> This patch updates nnn from 4.3 to 4.4.
> 
> Tested on two amd64 systems.

Runs fine here as well.

OK sdk@



[maintainer update] nnn 4.3 -> 4.4

2021-11-23 Thread Martin Ziemer
This patch updates nnn from 4.3 to 4.4.

Tested on two amd64 systems.

Index: Makefile
===
RCS file: /cvs/ports/sysutils/nnn/Makefile,v
retrieving revision 1.17
diff -p -u -r1.17 Makefile
--- Makefile4 Oct 2021 14:16:52 -   1.17
+++ Makefile23 Nov 2021 13:41:46 -
@@ -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}
 
Index: distinfo
===
RCS file: /cvs/ports/sysutils/nnn/distinfo,v
retrieving revision 1.14
diff -p -u -r1.14 distinfo
--- distinfo4 Oct 2021 14:16:52 -   1.14
+++ distinfo23 Nov 2021 13:41:46 -
@@ -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