Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/nnn sysutils/nnn: Address Illumos build issues



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f8661f49579c
branches:  trunk
changeset: 433445:f8661f49579c
user:      sjmulder <sjmulder%pkgsrc.org@localhost>
date:      Tue Jun 02 11:07:41 2020 +0000

description:
sysutils/nnn: Address Illumos build issues

 - Fix for use of undefined macro
 - Work around system curses vs ncurses conflict
 - __EXTENSIONS__ to be able to use much of the standard library

diffstat:

 sysutils/nnn/Makefile                |  17 ++++++++++++-----
 sysutils/nnn/distinfo                |   3 ++-
 sysutils/nnn/patches/patch-src_nnn.c |  21 +++++++++++++++++++++
 3 files changed, 35 insertions(+), 6 deletions(-)

diffs (77 lines):

diff -r ec8ea3326cfe -r f8661f49579c sysutils/nnn/Makefile
--- a/sysutils/nnn/Makefile     Tue Jun 02 11:01:28 2020 +0000
+++ b/sysutils/nnn/Makefile     Tue Jun 02 11:07:41 2020 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.18 2020/05/30 03:06:03 sjmulder Exp $
+# $NetBSD: Makefile,v 1.19 2020/06/02 11:07:41 sjmulder Exp $
 
 DISTNAME=      nnn-3.2
+PKGREVISION=   1
 CATEGORIES=    sysutils
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=jarun/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -19,10 +20,14 @@
 
 .include "../../mk/bsd.prefs.mk"
 
-# Prevent pulling in builtin termcap which conflicts with ncurses'
-# implementation, causing a crash at startup. See:
-# https://github.com/jarun/nnn/issues/445
-.if ${OPSYS} == "NetBSD"
+# NetBSD:
+#   Prevent pulling in builtin termcap which conflicts with ncurses'
+#   implementation, causing a crash at startup. See:
+#   https://github.com/jarun/nnn/issues/445
+#
+# Illumos:
+#   -lreadline links to system curses, causing conflicts with ncurses
+.if ${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS"
 READLINE_DEFAULT=      readline
 .endif
 
@@ -30,6 +35,8 @@
 # https://github.com/jarun/nnn/issues/453
 MAKE_ENV.Linux+=       LDLIBS=-lrt
 
+CFLAGS.SunOS+=         -D__EXTENSIONS__
+
 .include "../../mk/compiler.mk"
 
 # nnn uses -std=c11 for `restrict` but c99 has it too, so use that on
diff -r ec8ea3326cfe -r f8661f49579c sysutils/nnn/distinfo
--- a/sysutils/nnn/distinfo     Tue Jun 02 11:01:28 2020 +0000
+++ b/sysutils/nnn/distinfo     Tue Jun 02 11:07:41 2020 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.13 2020/05/30 03:06:03 sjmulder Exp $
+$NetBSD: distinfo,v 1.14 2020/06/02 11:07:41 sjmulder Exp $
 
 SHA1 (nnn-3.2.tar.gz) = 074b20d4a9da51a673e9a43e6ccc1bd8d0b9b425
 RMD160 (nnn-3.2.tar.gz) = 3a0bc30d30da0cb468390f8a583489f0725f1a6e
 SHA512 (nnn-3.2.tar.gz) = 9cdc8d0d74162ddd4b90f69a4f558a25845732497ebdb129159fda658a799a949fe237013bf69a2d6a649433254ba2ed4c65f8f10cddd119f713c1d5518ea378
 Size (nnn-3.2.tar.gz) = 143122 bytes
+SHA1 (patch-src_nnn.c) = aee0cbbbbe7a9aa85d17ee8acc6c415422dc06e1
diff -r ec8ea3326cfe -r f8661f49579c sysutils/nnn/patches/patch-src_nnn.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/nnn/patches/patch-src_nnn.c      Tue Jun 02 11:07:41 2020 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_nnn.c,v 1.1 2020/06/02 11:07:42 sjmulder Exp $
+
+Wrap FILE_MIME_OPTS use in check, since it's not defined (at the top of
+nnn.c) for Illumos which doesn't have such an option.
+
+https://github.com/jarun/nnn/pull/622
+
+--- src/nnn.c.orig     2020-05-26 00:08:38.000000000 +0000
++++ src/nnn.c
+@@ -3689,9 +3689,11 @@ static bool show_stats(const char *fpath
+                       }
+                       fprintf(fp, " %s\n  ", begin);
+ 
++#ifdef FILE_MIME_OPTS
+                       /* Show the file mime type */
+                       get_output(g_buf, CMD_LEN_MAX, "file", FILE_MIME_OPTS, fpath, FALSE);
+                       fprintf(fp, "%s", g_buf);
++#endif
+               }
+       }
+ 



Home | Main Index | Thread Index | Old Index