summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorfhajny <fhajny>2017-04-04 07:53:23 +0000
committerfhajny <fhajny>2017-04-04 07:53:23 +0000
commit95e3ccfcb8894e41a814a6da2236bf0c564895cc (patch)
tree2ecaae98311ddba243a5f264e60541756d0b8d72 /editors
parent2bdd71b5c5ffb189265222407c6c78de619ed1c7 (diff)
downloadpkgsrc-95e3ccfcb8894e41a814a6da2236bf0c564895cc.tar.gz
Fix an issue with editor segfaulting in ex mode on Darwin and suppress benign stderr output regarding locale. Reported in joyent/pkgsrc/issues/402, patch provided by @bjcooke in joyent/pkgsrc/pull/463. Bump PKGREVISION.
Diffstat (limited to 'editors')
-rw-r--r--editors/nvi/Makefile4
-rw-r--r--editors/nvi/distinfo6
-rw-r--r--editors/nvi/patches/patch-cl_funcs__termh.c20
-rw-r--r--editors/nvi/patches/patch-cl_screen__termh.c20
-rw-r--r--editors/nvi/patches/patch-common_msg.c80
5 files changed, 114 insertions, 16 deletions
diff --git a/editors/nvi/Makefile b/editors/nvi/Makefile
index 723fd26c655..613a354e576 100644
--- a/editors/nvi/Makefile
+++ b/editors/nvi/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.49 2015/09/07 12:02:05 jperkin Exp $
+# $NetBSD: Makefile,v 1.50 2017/04/04 07:53:23 fhajny Exp $
DISTNAME= nvi-1.81.6
-PKGREVISION= 10
+PKGREVISION= 11
CATEGORIES= editors
MASTER_SITES= ${HOMEPAGE:Q}
EXTRACT_SUFX= .tar.bz2
diff --git a/editors/nvi/distinfo b/editors/nvi/distinfo
index e4de984050c..47216c895c6 100644
--- a/editors/nvi/distinfo
+++ b/editors/nvi/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2015/11/03 03:32:19 agc Exp $
+$NetBSD: distinfo,v 1.23 2017/04/04 07:53:23 fhajny Exp $
SHA1 (nvi-1.81.6.tar.bz2) = d3445ed69166102735335a2ff60d092d9a9143c6
RMD160 (nvi-1.81.6.tar.bz2) = 0db8568bea96392d9a027044177c60317c8ade36
@@ -34,9 +34,11 @@ SHA1 (patch-ba) = 57edce2dafc630d7e948a5b528242bdcff334228
SHA1 (patch-bb) = 5110c239cd1cc82cdd1eaeba6ceedb11ee797b26
SHA1 (patch-bc) = 6ac8377ae6f2fc513c058c0bf7f5ad18e97141a8
SHA1 (patch-bd) = 9a04f7a247fe6bf800469e81f7a83ffddd45b4b5
+SHA1 (patch-cl_funcs__termh.c) = 27a974bf865c8006c6929fa20fde44a4cf53182b
+SHA1 (patch-cl_screen__termh.c) = 55d9214a0e1cd740a065ae58defee6f0fa4d4204
SHA1 (patch-common_conv.c) = efb2dabf226523a493fc1172013adc8021f4c2b9
SHA1 (patch-common_key.h) = 29f8b89b41b087ff7c2e9a5483fb9e6d2291c750
-SHA1 (patch-common_msg.c) = 73c6e8df0d5c85f4fee1316ea65de9da1876340b
+SHA1 (patch-common_msg.c) = b1c7662b195a7438a73bffee86ab2b10f7fe1487
SHA1 (patch-dist_Makefile.am) = ebae821ce659df003f5f2043f754e325c0863aff
SHA1 (patch-dist_config.h.in) = 21568929b165d1e774e59d6c648e0af7b17760da
SHA1 (patch-dist_configure.in) = c7b70b1a93889f41d949a3ede034f30abc063b7b
diff --git a/editors/nvi/patches/patch-cl_funcs__termh.c b/editors/nvi/patches/patch-cl_funcs__termh.c
new file mode 100644
index 00000000000..055226cdaeb
--- /dev/null
+++ b/editors/nvi/patches/patch-cl_funcs__termh.c
@@ -0,0 +1,20 @@
+$NetBSD: patch-cl_funcs__termh.c,v 1.1 2017/04/04 07:53:23 fhajny Exp $
+
+- Suppress compile time warning on Linux and prevent segfault on Darwin when
+ run as nex.
+- Original patch was found in release 13 of nvi 1.81.6 for debian under the
+ name 19include_term_h.patch.
+
+##From: <hesso@pool.math.tu-berlin.de>
+##Subject: Add <term.h> to the include list to suppress a few warnings.
+
+--- cl/cl_funcs.c.orig 2007-11-18 17:41:42.000000000 +0100
++++ cl/cl_funcs.c 2008-05-01 18:23:08.000000000 +0200
+@@ -18,6 +18,7 @@
+ #include <sys/time.h>
+
+ #include <bitstring.h>
++#include <term.h>
+ #include <ctype.h>
+ #include <signal.h>
+ #include <stdio.h>
diff --git a/editors/nvi/patches/patch-cl_screen__termh.c b/editors/nvi/patches/patch-cl_screen__termh.c
new file mode 100644
index 00000000000..5c0eac5b862
--- /dev/null
+++ b/editors/nvi/patches/patch-cl_screen__termh.c
@@ -0,0 +1,20 @@
+$NetBSD: patch-cl_screen__termh.c,v 1.1 2017/04/04 07:53:23 fhajny Exp $
+
+- Suppress compile time warning on Linux and prevent segfault on Darwin when
+ run as nex.
+- Original patch was found in release 13 of nvi 1.81.6 for debian under the
+ name 19include_term_h.patch.
+
+##From: <hesso@pool.math.tu-berlin.de>
+##Subject: Add <term.h> to the include list to suppress a few warnings.
+
+--- cl/cl_screen.c.orig 2007-11-18 17:41:42.000000000 +0100
++++ cl/cl_screen.c 2008-05-01 18:23:02.000000000 +0200
+@@ -17,6 +17,7 @@
+ #include <sys/queue.h>
+
+ #include <bitstring.h>
++#include <term.h>
+ #include <errno.h>
+ #include <signal.h>
+ #include <stdio.h>
diff --git a/editors/nvi/patches/patch-common_msg.c b/editors/nvi/patches/patch-common_msg.c
index 19a3d31566b..84cfa588bd5 100644
--- a/editors/nvi/patches/patch-common_msg.c
+++ b/editors/nvi/patches/patch-common_msg.c
@@ -1,14 +1,70 @@
-$NetBSD: patch-common_msg.c,v 1.1 2015/05/11 08:43:44 enami Exp $
+$NetBSD: patch-common_msg.c,v 1.2 2017/04/04 07:53:23 fhajny Exp $
---- common/msg.c.orig 2007-11-18 16:41:42.000000000 +0000
+--- common/msg.c.orig 2017-04-03 15:17:07.396452540 +0000
+++ common/msg.c
-@@ -640,7 +640,8 @@ msgq_status(SCR *sp, db_recno_t lno, u_i
- p += len;
- } else {
- t = msg_cat(sp, "027|line %lu of %lu [%ld%%]", &len);
-- (void)sprintf(p, t, lno, last, (lno * 100) / last);
-+ (void)sprintf(p, t, (u_long)lno, (u_long)last,
-+ (long)((lno * 100) / last));
- p += strlen(p);
- }
- } else {
+@@ -716,7 +716,7 @@ msg_open(SCR *sp, char *file)
+ DB *db;
+ DBT data, key;
+ db_recno_t msgno;
+- char *p, *t, buf[MAXPATHLEN];
++ char *p, *p2, *t, buf[MAXPATHLEN];
+
+ if ((p = strrchr(file, '/')) != NULL && p[1] == '\0' &&
+ (((t = getenv("LC_MESSAGES")) != NULL && t[0] != '\0') ||
+@@ -725,16 +725,15 @@ msg_open(SCR *sp, char *file)
+ p = buf;
+ } else
+ p = file;
+- if ((sp->db_error = db_create(&db, 0, 0)) != 0 ||
+- (sp->db_error = db->set_re_source(db, p)) != 0 ||
+- (sp->db_error = db_open(db, NULL, DB_RECNO, 0, 0)) != 0) {
+- if (first) {
+- first = 0;
+- return (1);
+- }
+- msgq_str(sp, M_DBERR, p, "%s");
+- return (1);
+- }
++
++ p2 = "%s";
++ if ((sp->db_error = db_create(&db, 0, 0)) == 0 &&
++ (sp->db_error = db->set_re_source(db, p)) == 0) {
++ db->set_errcall(db, 0);
++ if ((sp->db_error = db_open(db, NULL, DB_RECNO, 0, 0)) != 0)
++ goto err;
++ } else
++ goto err;
+
+ /*
+ * Test record 1 for the magic string. The msgq call is here so
+@@ -750,13 +749,8 @@ msg_open(SCR *sp, char *file)
+ data.size != sizeof(VMC) - 1 ||
+ memcmp(data.data, VMC, sizeof(VMC) - 1)) {
+ (void)db->close(db, DB_NOSYNC);
+- if (first) {
+- first = 0;
+- return (1);
+- }
+- msgq_str(sp, M_DBERR, p,
+- "030|The file %s is not a message catalog");
+- return (1);
++ p2 = "030|The file %s is not a message catalog";
++ goto err;
+ }
+ first = 0;
+
+@@ -764,6 +758,14 @@ msg_open(SCR *sp, char *file)
+ (void)sp->gp->msg->close(sp->gp->msg, DB_NOSYNC);
+ sp->gp->msg = db;
+ return (0);
++
++err:
++ if (first) {
++ first = 0;
++ return (1);
++ }
++ msgq_str(sp, M_DBERR, p, p2);
++ return (1);
+ }
+
+ /*