From 5695591f5f285392d804779b8df55295e653a316 Mon Sep 17 00:00:00 2001 From: naddy Date: Sat, 14 Jul 2012 09:59:30 +0000 Subject: [PATCH] Import nvi 2.1.0, a version of the base system vi/ex editor with wide character (UTF-8) support. Requested by yasuoka@ and pirofti@ --- editors/nvi/Makefile | 57 +++++++++++++++++++ editors/nvi/distinfo | 2 + .../nvi/patches/patch-build_CMakeLists_txt | 18 ++++++ editors/nvi/patches/patch-common_recover_c | 12 ++++ editors/nvi/pkg/DESCR | 20 +++++++ editors/nvi/pkg/PLIST | 19 +++++++ 6 files changed, 128 insertions(+) create mode 100644 editors/nvi/Makefile create mode 100644 editors/nvi/distinfo create mode 100644 editors/nvi/patches/patch-build_CMakeLists_txt create mode 100644 editors/nvi/patches/patch-common_recover_c create mode 100644 editors/nvi/pkg/DESCR create mode 100644 editors/nvi/pkg/PLIST diff --git a/editors/nvi/Makefile b/editors/nvi/Makefile new file mode 100644 index 00000000000..8e4931c1bb3 --- /dev/null +++ b/editors/nvi/Makefile @@ -0,0 +1,57 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2012/07/14 09:59:30 naddy Exp $ + +COMMENT= ex/vi text editor with wide character support + +# commit 9b89eb63aa3331a9fe9ca79af6b7786785ced6e2 +DISTNAME= nvi-2.1.0 +CATEGORIES= editors +HOMEPAGE= https://github.com/lichray/nvi2 + +MAINTAINER= Christian Weisgerber + +# BSD +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +MASTER_SITES= http://shell.uugrn.org/~naddy/ + +WANTLIB= c ncursesw util + +MODULES= devel/cmake + +SEPARATE_BUILD= No # ${WRKSRC}/config.h is written + +WRKSRC= ${WRKDIST}/build + +FLAVORS= iconv +FLAVOR?= + +.if ${FLAVOR:Miconv} +MODULES+= converters/libiconv +.else +CONFIGURE_ARGS= -DUSE_ICONV:Bool=False +.endif + +post-patch: + perl -pi.bak \ + -e 's:/usr/share/vi/catalog/:${PREFIX}/share/vi/catalog/:' \ + ${WRKSRC}/pathnames.h.in + +post-build: + cd ${WRKDIST}/catalog && ${MAKE_PROGRAM} + +CATALOGS= dutch english french german polish ru_RU.KOI8-R spanish \ + swedish uk_UA.KOI8-U zh_CN.GB2312 + +do-install: + ${INSTALL_PROGRAM} ${WRKBUILD}/nvi ${PREFIX}/bin + cd ${PREFIX}/bin; ln nvi nex; ln nvi nview + ${INSTALL_MAN} ${WRKDIST}/docs/man/vi.1 ${PREFIX}/man/man1/nvi.1 + cd ${PREFIX}/man/man1; ln nvi.1 nex.1; ln nvi.1 nview.1 + ${INSTALL_DATA_DIR} ${PREFIX}/share/vi/catalog + cd ${WRKDIST}/catalog; \ + ${INSTALL_DATA} ${CATALOGS} ${PREFIX}/share/vi/catalog + +.include diff --git a/editors/nvi/distinfo b/editors/nvi/distinfo new file mode 100644 index 00000000000..081d44ec280 --- /dev/null +++ b/editors/nvi/distinfo @@ -0,0 +1,2 @@ +SHA256 (nvi-2.1.0.tar.gz) = uvTC+5r37jOf7xC2fh7UWYrO+fBE/0sAP9Bb7wp8gf8= +SIZE (nvi-2.1.0.tar.gz) = 438758 diff --git a/editors/nvi/patches/patch-build_CMakeLists_txt b/editors/nvi/patches/patch-build_CMakeLists_txt new file mode 100644 index 00000000000..e65efd31a4a --- /dev/null +++ b/editors/nvi/patches/patch-build_CMakeLists_txt @@ -0,0 +1,18 @@ +$OpenBSD: patch-build_CMakeLists_txt,v 1.1.1.1 2012/07/14 09:59:30 naddy Exp $ +--- build/CMakeLists.txt.orig Fri Jul 13 23:11:17 2012 ++++ build/CMakeLists.txt Sat Jul 14 10:53:59 2012 +@@ -26,10 +26,10 @@ if(DEBUG) + "-Wmissing-prototypes" + "-fstrict-aliasing -Wstrict-aliasing") + join("${_arg_str}" CMAKE_C_FLAGS) +-else(DEBUG) +- set(_arg_str "${CMAKE_C_FLAGS} -ansi -O2" +- "-Wuninitialized") +- join("${_arg_str}" CMAKE_C_FLAGS) ++#else(DEBUG) ++# set(_arg_str "${CMAKE_C_FLAGS} -ansi -O2" ++# "-Wuninitialized") ++# join("${_arg_str}" CMAKE_C_FLAGS) + endif(DEBUG) + + # generate the public headers diff --git a/editors/nvi/patches/patch-common_recover_c b/editors/nvi/patches/patch-common_recover_c new file mode 100644 index 00000000000..1e781d5c2a8 --- /dev/null +++ b/editors/nvi/patches/patch-common_recover_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-common_recover_c,v 1.1.1.1 2012/07/14 09:59:30 naddy Exp $ +--- common/recover.c.orig Sat Jul 14 11:21:34 2012 ++++ common/recover.c Sat Jul 14 11:21:44 2012 +@@ -866,7 +866,7 @@ rcv_email( + long hostmax; + int eno; + struct addrinfo *res0; +- struct addrinfo hints = { AI_ADDRCONFIG, PF_UNSPEC, ++ struct addrinfo hints = { 0, PF_UNSPEC, + SOCK_STREAM, IPPROTO_TCP }; + + /* Prepare the the recipient. */ diff --git a/editors/nvi/pkg/DESCR b/editors/nvi/pkg/DESCR new file mode 100644 index 00000000000..24a29603e38 --- /dev/null +++ b/editors/nvi/pkg/DESCR @@ -0,0 +1,20 @@ +Nvi is an implementation of the ex/vi text editor originally distributed as +part of the Fourth Berkeley Software Distribution (4BSD), by the University +of California, Berkeley. + +Nvi supports all the historic ex/vi features except for open mode and the +lisp edit option (e.g., it has a fully implemented underlying ex mode). It +has a number of additional features as well: + +* 8-bit clean data, lines and files limited by available memory +* Multiple edit buffers +* Colon command-line editing and path name completion +* Tag stacks (including support for Cscope databases) +* Extended Regular Expressions +* Infinite undo +* Horizontal scrolling +* Message catalogs +* Wide character support + +Available flavors: + iconv - support conversion between different character encodings diff --git a/editors/nvi/pkg/PLIST b/editors/nvi/pkg/PLIST new file mode 100644 index 00000000000..f46ea2a3af6 --- /dev/null +++ b/editors/nvi/pkg/PLIST @@ -0,0 +1,19 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2012/07/14 09:59:30 naddy Exp $ +@bin bin/nex +@bin bin/nvi +@bin bin/nview +@man man/man1/nex.1 +@man man/man1/nvi.1 +@man man/man1/nview.1 +share/vi/ +share/vi/catalog/ +share/vi/catalog/dutch +share/vi/catalog/english +share/vi/catalog/french +share/vi/catalog/german +share/vi/catalog/polish +share/vi/catalog/ru_RU.KOI8-R +share/vi/catalog/spanish +share/vi/catalog/swedish +share/vi/catalog/uk_UA.KOI8-U +share/vi/catalog/zh_CN.GB2312