summaryrefslogtreecommitdiff
path: root/editors/nvi-m17n
diff options
context:
space:
mode:
authorsakamoto <sakamoto@pkgsrc.org>1999-08-02 05:11:56 +0000
committersakamoto <sakamoto@pkgsrc.org>1999-08-02 05:11:56 +0000
commit609cc25e7ed41fdef6259f64bd02ec2e835bf771 (patch)
tree572e4f014e04757bc9abbdc13cea207e3a943892 /editors/nvi-m17n
parent38b7dbb7816f78783ceefec5ff7eb1c6a74c28af (diff)
downloadpkgsrc-609cc25e7ed41fdef6259f64bd02ec2e835bf771.tar.gz
Adapt this package to NetBSD.
Diffstat (limited to 'editors/nvi-m17n')
-rw-r--r--editors/nvi-m17n/Makefile69
-rwxr-xr-xeditors/nvi-m17n/files/nvi-m17n9
-rw-r--r--editors/nvi-m17n/files/patch-sum4
-rw-r--r--editors/nvi-m17n/patches/patch-ab2
-rw-r--r--editors/nvi-m17n/pkg/COMMENT2
-rw-r--r--editors/nvi-m17n/pkg/PLIST1
-rw-r--r--editors/nvi-m17n/pkg/REQ2
7 files changed, 71 insertions, 18 deletions
diff --git a/editors/nvi-m17n/Makefile b/editors/nvi-m17n/Makefile
index 2b7f08aecb3..44e2a2ea36c 100644
--- a/editors/nvi-m17n/Makefile
+++ b/editors/nvi-m17n/Makefile
@@ -1,16 +1,10 @@
-# New ports collection makefile for: nvi-1.79 + multilingual patch(none)
-# Version required: 1.79
-# Date created: 6 Mar 1997
-# Whom: Jun-ichiro itojun Itoh <itojun@itojun.org>
-#
-# $Id: Makefile,v 1.1.1.1 1999/08/02 05:05:16 sakamoto Exp $
-#
-
+# $NetBSD: Makefile,v 1.2 1999/08/02 05:11:56 sakamoto Exp $
+# FreeBSD Id: Makefile,v 1.11 1999/04/17 10:51:03 itojun Exp
DISTNAME= nvi-1.79
-PKGNAME?= nvi-m17n-1.79.19990331
+PKGNAME= nvi-m17n-1.79.19990331
CATEGORIES= editors
-MASTER_SITES= ftp://sleepy.vwh.net/pub/\
+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/
@@ -18,18 +12,63 @@ PATCHFILES= nvi-1.79.m17n-19990331.diff.gz
MAINTAINER= itojun@itojun.org
-#LIB_DEPENDS= canna.1:${PORTSDIR}/japanese/Canna
-
WRKSRC= ${WRKDIR}/${DISTNAME}/build
-GNU_CONFIGURE= yes
+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
+CONFIGURE_ARGS+=--enable-multibyte --program-prefix=n
+
+.include "../../mk/bsd.prefs.mk"
+.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 <bsd.port.mk>
+.include "../../mk/bsd.pkg.mk"
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-ab b/editors/nvi-m17n/patches/patch-ab
index d590fd0019a..7df69d465b2 100644
--- a/editors/nvi-m17n/patches/patch-ab
+++ b/editors/nvi-m17n/patches/patch-ab
@@ -8,7 +8,7 @@
- vi_cannapath="/usr/local";;
- freebsd2*)
- vi_cannapath="/usr/local/canna";;
-+ freebsd*)
++ freebsd*|netbsd*|openbsd*)
+ vi_cannapath="${prefix}";;
*)
vi_cannapath="/usr/local/canna";;
diff --git a/editors/nvi-m17n/pkg/COMMENT b/editors/nvi-m17n/pkg/COMMENT
index 22a9e99dedf..d9e100f5d29 100644
--- a/editors/nvi-m17n/pkg/COMMENT
+++ b/editors/nvi-m17n/pkg/COMMENT
@@ -1 +1 @@
-A clone of vi/ex, with multilingual patch, no default settings
+A clone of vi/ex, with multilingual patch.
diff --git a/editors/nvi-m17n/pkg/PLIST b/editors/nvi-m17n/pkg/PLIST
index 19d97e4a073..598a60fdac6 100644
--- a/editors/nvi-m17n/pkg/PLIST
+++ b/editors/nvi-m17n/pkg/PLIST
@@ -1,3 +1,4 @@
+@comment $NetBSD: PLIST,v 1.2 1999/08/02 05:11:56 sakamoto Exp $
bin/nvi
bin/nex
bin/nview
diff --git a/editors/nvi-m17n/pkg/REQ b/editors/nvi-m17n/pkg/REQ
index e108ec466a2..0c3d7275cb5 100644
--- a/editors/nvi-m17n/pkg/REQ
+++ b/editors/nvi-m17n/pkg/REQ
@@ -4,6 +4,6 @@ if [ "$2" != "INSTALL" ]; then
fi
echo "********************************************************"
echo "* W a r n i n g *"
-echo "* Read /usr/local/share/vi/README.* for controlling *"
+echo "* Read ${PREFIX}/share/vi/README.* for controlling *"
echo "* multilingual functionalities. *"
echo "********************************************************"