pkgsrc-WIP-changes archive

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

Add nvi2-git



Module Name:	pkgsrc-wip
Committed By:	Sijmen J. Mulder <sjmulder%NetBSD.org@localhost>
Pushed By:	sjmulder
Date:		Mon Jan 11 21:14:19 2021 +0100
Changeset:	f819d0648403e8db78ab75d7293c8dceed2a3db7

Added Files:
	nvi2-git/DESCR
	nvi2-git/Makefile
	nvi2-git/PLIST
	nvi2-git/TODO
	nvi2-git/distinfo
	nvi2-git/options.mk
	nvi2-git/patches/patch-cl_cl__screen.c

Log Message:
Add nvi2-git

The git version supports (or should support) Linux and macOS.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f819d0648403e8db78ab75d7293c8dceed2a3db7

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 nvi2-git/DESCR                         |  1 +
 nvi2-git/Makefile                      | 43 ++++++++++++++++++++++++++++++++++
 nvi2-git/PLIST                         |  5 ++++
 nvi2-git/TODO                          |  7 ++++++
 nvi2-git/distinfo                      |  7 ++++++
 nvi2-git/options.mk                    | 26 ++++++++++++++++++++
 nvi2-git/patches/patch-cl_cl__screen.c | 16 +++++++++++++
 7 files changed, 105 insertions(+)

diffs:
diff --git a/nvi2-git/DESCR b/nvi2-git/DESCR
new file mode 100644
index 0000000000..b67c8c8733
--- /dev/null
+++ b/nvi2-git/DESCR
@@ -0,0 +1 @@
+A multibyte fork of the nvi editor for BSD
diff --git a/nvi2-git/Makefile b/nvi2-git/Makefile
new file mode 100644
index 0000000000..6333ebf7ba
--- /dev/null
+++ b/nvi2-git/Makefile
@@ -0,0 +1,43 @@
+# $NetBSD: Makefile,v 1.2 2020/11/24 18:27:00 nia Exp $
+
+DISTNAME=	nvi2-2.2.0.20200111
+CATEGORIES=	editors
+MASTER_SITES=	${MASTER_SITE_GITHUB:=lichray/}
+GITHUB_TAG=	b17d184aa69dc84effe44bf9385f095547acb46d
+
+MAINTAINER=	ik%sjmulder.nl@localhost
+HOMEPAGE=	https://github.com/lichray/nvi2
+COMMENT=	Multibyte fork of the nvi editor for BSD
+LICENSE=	modified-bsd
+
+CONFLICTS+=	nvi-[0-9]*
+CONFLICTS+=	nvi-m17n-[0-9]*
+
+USE_CMAKE=	yes
+
+CMAKE_ARG_PATH=	..
+CONFIGURE_DIRS=	build
+BUILD_DIRS=	build
+
+BUILDLINK_TRANSFORM+=	rm:-fcolor-diagnostics
+
+INSTALLATION_DIRS+=	bin ${PKGMANDIR}/man1
+
+.include "options.mk"
+
+SUBST_CLASSES+=		curses
+SUBST_STAGE.curses=	pre-configure
+SUBST_MESSAGE.curses=	Correcting the path to curses.
+SUBST_FILES.curses+=	CMakeLists.txt
+SUBST_SED.curses+=	-e "s,HINTS /usr/lib,HINTS ${BUILDLINK_PREFIX.curses}/lib NO_DEFAULT_PATH,g"
+
+pre-configure:
+	${MKDIR} -p ${WRKSRC}/build
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/build/nvi ${DESTDIR}${PREFIX}/bin/nex
+	${INSTALL_PROGRAM} ${WRKSRC}/build/nvi ${DESTDIR}${PREFIX}/bin/nvi
+	${INSTALL_MAN} ${WRKSRC}/man/vi.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/nex.1
+	${INSTALL_MAN} ${WRKSRC}/man/vi.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/nvi.1
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/nvi2-git/PLIST b/nvi2-git/PLIST
new file mode 100644
index 0000000000..ebe1accff7
--- /dev/null
+++ b/nvi2-git/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1 2020/06/14 11:44:02 nia Exp $
+bin/nex
+bin/nvi
+man/man1/nex.1
+man/man1/nvi.1
diff --git a/nvi2-git/TODO b/nvi2-git/TODO
new file mode 100644
index 0000000000..92d5056f0a
--- /dev/null
+++ b/nvi2-git/TODO
@@ -0,0 +1,7 @@
+ - Doesn't build on Linux (or most distros?) because it db1 is required
+   which isn't built into glibc and seemingly hard to find. There's a
+   branch to port nvi2 to db5.3 but no PR yet:
+
+     https://github.com/matijaskala/nvi2/commit/218c6526fa182e15e3f25888fe4b04f53c3afc83
+
+ - Upstream the patch.
diff --git a/nvi2-git/distinfo b/nvi2-git/distinfo
new file mode 100644
index 0000000000..9e8a3e3cf6
--- /dev/null
+++ b/nvi2-git/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.2 2020/11/24 18:27:00 nia Exp $
+
+SHA1 (nvi2-2.2.0.20200111-b17d184aa69dc84effe44bf9385f095547acb46d.tar.gz) = cc4aee36929e5ae2d8b133e1f2500cd77919cca9
+RMD160 (nvi2-2.2.0.20200111-b17d184aa69dc84effe44bf9385f095547acb46d.tar.gz) = 95301e964b8f2033d774cf54ae28bc60ac419899
+SHA512 (nvi2-2.2.0.20200111-b17d184aa69dc84effe44bf9385f095547acb46d.tar.gz) = 970a606231ce5a0243358e46d4c4eec2bbdaf526a6102d197f054fd06654ec013d15fecb2b785419f1ca6697659988f30c7a790bad3273ad59bd8363bda1127a
+Size (nvi2-2.2.0.20200111-b17d184aa69dc84effe44bf9385f095547acb46d.tar.gz) = 441060 bytes
+SHA1 (patch-cl_cl__screen.c) = de98539a79da66d2489ec6df29351d3cbaac3c56
diff --git a/nvi2-git/options.mk b/nvi2-git/options.mk
new file mode 100644
index 0000000000..4ef875233f
--- /dev/null
+++ b/nvi2-git/options.mk
@@ -0,0 +1,26 @@
+# $NetBSD: options.mk,v 1.2 2020/06/14 11:47:03 nia Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.nvi2
+PKG_SUPPORTED_OPTIONS=	iconv wide-curses
+PKG_SUGGESTED_OPTIONS=	iconv wide-curses
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Miconv)
+.  include "../../converters/libiconv/buildlink3.mk"
+CMAKE_ARGS+=	-DUSE_ICONV=ON
+.else
+CMAKE_ARGS+=	-DUSE_ICONV=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mwide-curses)
+.  include "../../mk/curses.buildlink3.mk"
+.  if ${CURSES_TYPE} != "ncurses" # XXX: Why is this necessary!?
+CMAKE_ARGS+=	-DUSE_WIDECHAR=ON
+.  else
+CMAKE_ARGS+=	-DUSE_WIDECHAR=OFF
+.  endif
+.else
+.  include "../../mk/curses.buildlink3.mk"
+CMAKE_ARGS+=	-DUSE_WIDECHAR=OFF
+.endif
diff --git a/nvi2-git/patches/patch-cl_cl__screen.c b/nvi2-git/patches/patch-cl_cl__screen.c
new file mode 100644
index 0000000000..1406c4ffa6
--- /dev/null
+++ b/nvi2-git/patches/patch-cl_cl__screen.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-cl_cl__screen.c,v 1.1 2020/06/14 11:44:02 nia Exp $
+
+This is only valid in ncurses
+
+--- cl/cl_screen.c.orig	2015-04-08 21:20:21.000000000 +0000
++++ cl/cl_screen.c
+@@ -409,9 +409,6 @@ cl_vi_end(GS *gp)
+ 	/* End curses window. */
+ 	(void)endwin();
+ 
+-	/* Free the SCREEN created by newterm(3X). */
+-	delscreen(set_term(NULL));
+-
+ 	/*
+ 	 * XXX
+ 	 * The screen TE sequence just got sent.  See the comment in


Home | Main Index | Thread Index | Old Index