diff --git a/editors/nvi-m17n/Makefile b/editors/nvi-m17n/Makefile new file mode 100644 index 00000000000..5c9ae31e29c --- /dev/null +++ b/editors/nvi-m17n/Makefile @@ -0,0 +1,79 @@ +# $NetBSD: Makefile,v 1.6 2000/01/19 12:28:44 hubertf Exp $ +# FreeBSD Id: Makefile,v 1.11 1999/04/17 10:51:03 itojun Exp + +DISTNAME= nvi-1.79 +PKGNAME= nvi-m17n-1.79.19991117 +CATEGORIES= editors +MASTER_SITES= ftp://sleepy.vwh.net/pub/ \ + ftp://ftp.foretune.co.jp/pub/tools/nvi-m17n/ + +PATCH_SITES= ftp://ftp.foretune.co.jp/pub/tools/nvi-m17n/ +PATCHFILES= nvi-1.79.m17n-19991117.diff.gz + +MAINTAINER= itojun@itojun.org + +CONFLICTS= vigor-* + +WRKSRC= ${WRKDIR}/${DISTNAME}/build +GNU_CONFIGURE= YES +PATCH_DIST_ARGS=-d ${WRKSRC}/.. --forward --quiet -E -p1 -f +CONFIGURE_ENV= OPTFLAG='-D_PATH_SYSEXRC=\"${PREFIX}/etc/vi.exrc\"' +CONFIGURE_ARGS+=--enable-multibyte --program-prefix=n + +.include "../../mk/bsd.prefs.mk" + +PATCH_FUZZ_FACTOR= -F1 + +.if !defined(USE_CANNA) || ${USE_CANNA} == YES +DEPENDS+= Canna-lib-3.5b2:../../japanese/canna-lib +CONFIGURE_ARGS+=--enable-canna=${LOCALBASE} +.endif + +PLIST_TMP= ${WRKDIR}/PLIST +PLIST_SRC+= ${PKGDIR}/PLIST ${PLIST_TMP} + +REQ_TMP= ${PKGDIR}/REQ +REQ_FILE= ${WRKDIR}/REQ + +CANNA_OPT.euc-jp=canna cannactrl cannakey= +CANNA_OPT.sjis=${CANNA_OPT.euc-jp} +CANNA_OPT.iso-2022-jp=${CANNA_OPT.euc-jp} + +AUTODETECT.euc-jp=jp +AUTODETECT.sjis=jp +AUTODETECT.iso-2022-jp=jp + +AUTODETECT.euc-cn=cn +AUTODETECT.big5=cn +AUTODETECT.hz=cn +AUTODETECT.iso-2022-cn=cn + +AUTODETECT.euc-tw=tw + +AUTODETECT.euc-kr=kr +AUTODETECT.iso-2022-kr=kr + +ENCODING+= iso-2022-cn iso-2022-jp iso-2022-kr +ENCODING+= euc-jp euc-cn euc-kr sjis big5 euc-tw hz + +post-build: +.for encoding in ${ENCODING} + @${SED} -e 's|$${CANNA_OPT}|${CANNA_OPT.${encoding}}|' \ + -e 's|$${AUTODETECT}|${AUTODETECT.${encoding}}|' \ + -e 's|$${ENCODING}|${encoding}|g' \ + -e 's|$${PREFIX}|${PREFIX}|' \ + ${FILESDIR}/nvi-m17n > ${WRKDIR}/nvi-${encoding} + @${ECHO} "bin/nvi-${encoding}" >> ${PLIST_TMP} +.endfor + @${SED} -e 's|$${PREFIX}|${PREFIX}|' ${REQ_TMP} > ${REQ_FILE} + +post-install: +.for encoding in ${ENCODING} + @${INSTALL_SCRIPT} ${WRKDIR}/nvi-${encoding} ${PREFIX}/bin +.endfor + @${CP} ${WRKSRC}/../docs.m17n/README.english \ + ${PREFIX}/share/vi/ + @${CP} ${WRKSRC}/../docs.m17n/README.japanese \ + ${PREFIX}/share/vi/ + +.include "../../mk/bsd.pkg.mk" diff --git a/editors/nvi-m17n/files/md5 b/editors/nvi-m17n/files/md5 new file mode 100644 index 00000000000..f81e50be25d --- /dev/null +++ b/editors/nvi-m17n/files/md5 @@ -0,0 +1,4 @@ +$NetBSD: md5,v 1.2 1999/11/17 15:46:24 itojun Exp $ + +MD5 (nvi-1.79.tar.gz) = 52549f8e390db06f9366ee83e59f64de +MD5 (nvi-1.79.m17n-19991117.diff.gz) = 9474e0d52fdae1706d06dbb6dd114eac diff --git a/editors/nvi-m17n/files/nvi-m17n b/editors/nvi-m17n/files/nvi-m17n new file mode 100755 index 00000000000..b977641b370 --- /dev/null +++ b/editors/nvi-m17n/files/nvi-m17n @@ -0,0 +1,9 @@ +#! /bin/sh +EXINIT0="set ${CANNA_OPT} autodetect=${AUTODETECT} fileencoding=${ENCODING} displayencoding=${ENCODING} inputencoding=${ENCODING} noskipdisplay" +if [ -f ~/.exrc ]; then + EXINIT="$EXINIT0 `sed -e '/^set /!d' -e 's/^set //' < ~/.exrc | tr '\012' ' '`" +else + EXINIT=$EXINIT0 +fi +export EXINIT +exec ${PREFIX}/bin/nvi "$@" diff --git a/editors/nvi-m17n/files/patch-sum b/editors/nvi-m17n/files/patch-sum new file mode 100644 index 00000000000..a63122955c0 --- /dev/null +++ b/editors/nvi-m17n/files/patch-sum @@ -0,0 +1,4 @@ +$NetBSD: patch-sum,v 1.1 1999/08/02 05:11:56 sakamoto Exp $ + +MD5 (patch-aa) = 7bcb59cb09ca3c677a99983e8638f5b9 +MD5 (patch-ab) = 6de408db4b247550b65d5e05a3bfc946 diff --git a/editors/nvi-m17n/patches/patch-aa b/editors/nvi-m17n/patches/patch-aa new file mode 100644 index 00000000000..0fa8dae5d52 --- /dev/null +++ b/editors/nvi-m17n/patches/patch-aa @@ -0,0 +1,107 @@ +$NetBSD: patch-aa,v 1.2 1999/12/28 05:37:28 wiz Exp $ +*** Makefile.in.orig Thu Mar 6 13:19:46 1997 +--- Makefile.in Thu Mar 6 13:23:40 1997 +*************** +*** 87,95 **** + cd $(bindir) && $(chmod) $(emode) `echo vi | sed '$(transform)'` + cd $(bindir) && $(rm) -f `echo ex | sed '$(transform)'` + cd $(bindir) && $(rm) -f `echo view | sed '$(transform)'` +! cd $(bindir) && $(ln) \ + `echo vi | sed '$(transform)'` `echo ex | sed '$(transform)'` +! cd $(bindir) && $(ln) \ + `echo vi | sed '$(transform)'` `echo view | sed '$(transform)'` + cd $(bindir) && $(rm) -f regular qregular + $(cp) regular $(bindir)/regular +--- 87,95 ---- + cd $(bindir) && $(chmod) $(emode) `echo vi | sed '$(transform)'` + cd $(bindir) && $(rm) -f `echo ex | sed '$(transform)'` + cd $(bindir) && $(rm) -f `echo view | sed '$(transform)'` +! cd $(bindir) && $(ln) -s \ + `echo vi | sed '$(transform)'` `echo ex | sed '$(transform)'` +! cd $(bindir) && $(ln) -s \ + `echo vi | sed '$(transform)'` `echo view | sed '$(transform)'` + cd $(bindir) && $(rm) -f regular qregular + $(cp) regular $(bindir)/regular +*************** +*** 97,115 **** + cd $(bindir) && $(chmod) $(emode) regular qregular + [ -d $(mandir) ] || \ + ($(mkdir) $(mandir) && $(chmod) $(dmode) $(mandir)) +! [ -d $(mandir)/cat1 ] || \ +! ($(mkdir) $(mandir)/cat1 && $(chmod) $(dmode) $(mandir)/cat1) + @echo "Installing man pages: $(mandir) ..." +! cd $(mandir)/cat1 && $(rm) -f `echo vi.0 | sed '$(transform)'` +! $(cp) $(srcdir)/docs/USD.doc/vi.man/vi.0 \ +! $(mandir)/cat1/`echo vi.0 | sed '$(transform)'` +! cd $(mandir)/cat1 && $(chmod) $(fmode) `echo vi.0 | sed '$(transform)'` +! cd $(mandir)/cat1 && $(rm) -f `echo ex.0 | sed '$(transform)'` +! cd $(mandir)/cat1 && $(rm) -f `echo view.0 | sed '$(transform)'` +! cd $(mandir)/cat1 && $(ln) \ +! `echo vi.0 | sed '$(transform)'` `echo ex.0 | sed '$(transform)'` +! cd $(mandir)/cat1 && $(ln) \ +! `echo vi.0 | sed '$(transform)'` `echo view.0 | sed '$(transform)'` + [ -d $(mandir)/man1 ] || \ + ($(mkdir) $(mandir)/man1 && $(chmod) $(dmode) $(mandir)/man1) + cd $(mandir)/man1 && $(rm) -f `echo vi.1 | sed '$(transform)'` +--- 97,115 ---- + cd $(bindir) && $(chmod) $(emode) regular qregular + [ -d $(mandir) ] || \ + ($(mkdir) $(mandir) && $(chmod) $(dmode) $(mandir)) +! # [ -d $(mandir)/cat1 ] || \ +! # ($(mkdir) $(mandir)/cat1 && $(chmod) $(dmode) $(mandir)/cat1) + @echo "Installing man pages: $(mandir) ..." +! # cd $(mandir)/cat1 && $(rm) -f `echo vi.0 | sed '$(transform)'` +! # $(cp) $(srcdir)/docs/USD.doc/vi.man/vi.0 \ +! # $(mandir)/cat1/`echo vi.0 | sed '$(transform)'` +! # cd $(mandir)/cat1 && $(chmod) $(fmode) `echo vi.0 | sed '$(transform)'` +! # cd $(mandir)/cat1 && $(rm) -f `echo ex.0 | sed '$(transform)'` +! # cd $(mandir)/cat1 && $(rm) -f `echo view.0 | sed '$(transform)'` +! # cd $(mandir)/cat1 && $(ln) -s \ +! # `echo vi.0 | sed '$(transform)'` `echo ex.0 | sed '$(transform)'` +! # cd $(mandir)/cat1 && $(ln) -s \ +! # `echo vi.0 | sed '$(transform)'` `echo view.0 | sed '$(transform)'` + [ -d $(mandir)/man1 ] || \ + ($(mkdir) $(mandir)/man1 && $(chmod) $(dmode) $(mandir)/man1) + cd $(mandir)/man1 && $(rm) -f `echo vi.1 | sed '$(transform)'` +*************** +*** 118,126 **** + cd $(mandir)/man1 && $(chmod) $(fmode) `echo vi.1 | sed '$(transform)'` + cd $(mandir)/man1 && $(rm) -f `echo ex.1 | sed '$(transform)'` + cd $(mandir)/man1 && $(rm) -f `echo view.1 | sed '$(transform)'` +! cd $(mandir)/man1 && $(ln) \ + `echo vi.1 | sed '$(transform)'` `echo ex.1 | sed '$(transform)'` +! cd $(mandir)/man1 && $(ln) \ + `echo vi.1 | sed '$(transform)'` `echo view.1 | sed '$(transform)'` + + cat= dutch english french german ru_SU.KOI8-R spanish swedish +--- 118,126 ---- + cd $(mandir)/man1 && $(chmod) $(fmode) `echo vi.1 | sed '$(transform)'` + cd $(mandir)/man1 && $(rm) -f `echo ex.1 | sed '$(transform)'` + cd $(mandir)/man1 && $(rm) -f `echo view.1 | sed '$(transform)'` +! cd $(mandir)/man1 && $(ln) -s \ + `echo vi.1 | sed '$(transform)'` `echo ex.1 | sed '$(transform)'` +! cd $(mandir)/man1 && $(ln) -s \ + `echo vi.1 | sed '$(transform)'` `echo view.1 | sed '$(transform)'` + + cat= dutch english french german ru_SU.KOI8-R spanish swedish +*************** +*** 163,171 **** + cd $(bindir) && $(rm) -f `echo vi | sed '$(transform)'` + cd $(bindir) && $(rm) -f `echo view | sed '$(transform)'` + cd $(bindir) && $(rm) -f regular qregular +! cd $(mandir)/cat1 && $(rm) -f `echo ex.0 | sed '$(transform)'` +! cd $(mandir)/cat1 && $(rm) -f `echo vi.0 | sed '$(transform)'` +! cd $(mandir)/cat1 && $(rm) -f `echo view.0 | sed '$(transform)'` + cd $(mandir)/man1 && $(rm) -f `echo ex.1 | sed '$(transform)'` + cd $(mandir)/man1 && $(rm) -f `echo vi.1 | sed '$(transform)'` + cd $(mandir)/man1 && $(rm) -f `echo view.1 | sed '$(transform)'` +--- 163,171 ---- + cd $(bindir) && $(rm) -f `echo vi | sed '$(transform)'` + cd $(bindir) && $(rm) -f `echo view | sed '$(transform)'` + cd $(bindir) && $(rm) -f regular qregular +! # cd $(mandir)/cat1 && $(rm) -f `echo ex.0 | sed '$(transform)'` +! # cd $(mandir)/cat1 && $(rm) -f `echo vi.0 | sed '$(transform)'` +! # cd $(mandir)/cat1 && $(rm) -f `echo view.0 | sed '$(transform)'` + cd $(mandir)/man1 && $(rm) -f `echo ex.1 | sed '$(transform)'` + cd $(mandir)/man1 && $(rm) -f `echo vi.1 | sed '$(transform)'` + cd $(mandir)/man1 && $(rm) -f `echo view.1 | sed '$(transform)'` diff --git a/editors/nvi-m17n/patches/patch-ab b/editors/nvi-m17n/patches/patch-ab new file mode 100644 index 00000000000..25ab0adda77 --- /dev/null +++ b/editors/nvi-m17n/patches/patch-ab @@ -0,0 +1,16 @@ +$NetBSD: patch-ab,v 1.3 1999/12/28 05:37:28 wiz Exp $ +--- configure.bad Fri Jun 26 02:22:51 1998 ++++ configure Fri Jun 26 02:23:39 1998 +@@ -1686,10 +1686,8 @@ + case "$host_os" in + bsdi2.1) + vi_cannapath="/usr/contrib/canna";; +- freebsd2.2*|freebsd3*) +- vi_cannapath="/usr/local";; +- freebsd2*) +- vi_cannapath="/usr/local/canna";; ++ freebsd*|netbsd*|openbsd*) ++ vi_cannapath="${prefix}";; + *) + vi_cannapath="/usr/local/canna";; + esac diff --git a/editors/nvi-m17n/pkg/COMMENT b/editors/nvi-m17n/pkg/COMMENT new file mode 100644 index 00000000000..cef87aa8e15 --- /dev/null +++ b/editors/nvi-m17n/pkg/COMMENT @@ -0,0 +1 @@ +Clone of vi/ex, with multilingual patch diff --git a/editors/nvi-m17n/pkg/DESCR b/editors/nvi-m17n/pkg/DESCR new file mode 100644 index 00000000000..c37c20cf106 --- /dev/null +++ b/editors/nvi-m17n/pkg/DESCR @@ -0,0 +1,24 @@ +This ports contains multilingualized nex/nvi. + +nex/nvi is a freely redistributable implementation of ex/vi text +editors originally distributed as part of the Fourth Berkeley +Software Distribution (4BSD), by the University of California, +Berkeley. + +Multilingual patch enables you to use the following multilingual +encoding methods, such as: + none iso-8859-[1234789] latin1 latin2 + euc-jp-1978 euc-jp euc-jp-1983 euc-jp-1990 euc-cn euc-kr + iso-2022-cn iso-2022-jp iso-2022-kr + iso-2022-7-1 iso-2022-7-2 iso-2022-8-2 + sjis big5 hz euc-tw +Multilingual support has been set up to use some of the above (guess from +the name of the ports/packages) as default value. +You can change encoding style on the fly, or by setting up ~/.exrc. +With configurations, for Japanese encodings, you can also enjoy the +embedded canna support. +See /usr/local/share/vi/README.* for details of multilingual patch. + +original distribution site: + ftp://ftp.cs.berkeley.edu/ucb/4bsd/nvi-1.79.tar.gz + ftp://ftp.foretune.co.jp/pub/tools/nvi-m17n/ diff --git a/editors/nvi-m17n/pkg/PLIST b/editors/nvi-m17n/pkg/PLIST new file mode 100644 index 00000000000..598a60fdac6 --- /dev/null +++ b/editors/nvi-m17n/pkg/PLIST @@ -0,0 +1,31 @@ +@comment $NetBSD: PLIST,v 1.2 1999/08/02 05:11:56 sakamoto Exp $ +bin/nvi +bin/nex +bin/nview +bin/regular +bin/qregular +man/man1/nvi.1 +man/man1/nex.1 +man/man1/nview.1 +share/vi/README.english +share/vi/README.japanese +share/vi/recover +share/vi/catalog/dutch +share/vi/catalog/english +share/vi/catalog/french +share/vi/catalog/german +share/vi/catalog/ru_SU.KOI8-R +share/vi/catalog/spanish +share/vi/catalog/swedish +share/vi/perl/forall.pl +share/vi/perl/make.pl +share/vi/perl/tk.pl +share/vi/perl/wc.pl +share/vi/tcl/errors.tcl +share/vi/tcl/gnats.tcl +share/vi/tcl/mailprocs.tcl +share/vi/tcl/wc.tcl +@dirrm share/vi/catalog +@dirrm share/vi/perl +@dirrm share/vi/tcl +@dirrm share/vi diff --git a/editors/nvi-m17n/pkg/REQ b/editors/nvi-m17n/pkg/REQ new file mode 100644 index 00000000000..0c3d7275cb5 --- /dev/null +++ b/editors/nvi-m17n/pkg/REQ @@ -0,0 +1,9 @@ +#!/bin/sh +if [ "$2" != "INSTALL" ]; then + exit 0 +fi +echo "********************************************************" +echo "* W a r n i n g *" +echo "* Read ${PREFIX}/share/vi/README.* for controlling *" +echo "* multilingual functionalities. *" +echo "********************************************************"