Japanized Vim

PR:		ports/6029 (part of)
Submitted by:	Satoshi Taoka <taoka@infonets.hiroshima-u.ac.jp>
This commit is contained in:
Jun Kuriyama 1998-07-10 14:05:19 +00:00
parent 98576262cf
commit 0babcec1a3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=11810
7 changed files with 249 additions and 0 deletions

77
japanese/jvim/Makefile Normal file
View File

@ -0,0 +1,77 @@
# New ports collection makefile for: jvim
# Version required: jvim2.0r+onew2.2.10
# Date created: 5 Sep 1997
# Whom: Satoshi TAOKA <taoka@infonets.hiroshima-u.ac.jp>
#
# $Id$
#
DISTNAME= jvim2.0r+onew2.2.10
PKGNAME?= ja-jvim-2.0r
CATEGORIES= japanese editors
MASTER_SITES= ftp://ftp.lab.kdd.co.jp/Japan/onew/ \
ftp://ftp.leo.chubu.ac.jp/pub/editor/jvim/
MAINTAINER= taoka@infonets.hiroshima-u.ac.jp
LIB_DEPENDS= ${LIB_INPUT_METHOD}
BUILD_DEPENDS= ${BUILD_INPUT_METHOD}
PATCHDIR= ${.CURDIR}/../jvim/patches
FILESDIR= ${.CURDIR}/../jvim/files
PLIST= ${.CURDIR}/../jvim/pkg/PLIST
MANLANG= ja
MAN1= jcat.1 jfold.1 jgrep.1 jvim.1
WRKSRC= ${WRKDIR}/jvim2.0r
# Specifying a velue INPUT_METHOD, and seting values BUILD_DEPENDS,
# LIB_DEPENDS, etc.
.if defined(CANNA)
INPUT_METHOD+= canna
LIB_INPUT_METHOD+= canna\\.1\\.:${PORTSDIR}/japanese/Canna
JPLIB+= -lcanna
.endif
.if defined(WNN4)
INPUT_METHOD+= wnn4
BUILD_INPUT_METHOD+= ${LOCALBASE}/bin/Wnn4/jserver:${PORTSDIR}/japanese/Wnn
JPDEF+= -DWNN_ISDIR
JPLIB+= -ljd -lcrypt
.elif defined(WNN6)
INPUT_METHOD+= wnn6
BUILD_INPUT_METHOD+= ${LOCALBASE}/bin/Wnn4/jserver:${PORTSDIR}/japanese/Wnn
JPDEF+= -DWNN_ISDIR
JPLIB+= -ljd -lcrypt
.endif
#
# Make a value of INPUT_METHOD
.if defined(INPUT_METHOD)
INPUT_METHOD!= echo ${INPUT_METHOD} | sed -e 's/^/-/' -e 's/ /+/g'
.endif
#
# For ONEW library
.if defined(INPUT_METHOD)
BUILD_INPUT_METHOD+= ${LOCALBASE}/lib/libonew${INPUT_METHOD}.a:${PORTSDIR}/japanese/onew${INPUT_METHOD}
JPDEF+= -DONEW
# If we use ONEW libray, then -lonew*.a should appear
# before the other libraries.
JPLIB!= echo ${JPLIB} | sed 's%^%-lonew${INPUT_METHOD} %'
.endif
pre-build:
cd ${WRKSRC}/src; \
${SED} -e 's,%LOCALBASE%,${LOCALBASE},g' \
-e 's,%X11BASE%,${X11BASE},g' \
./makefile.junx > Makefile; \
do-build:
cd ${WRKSRC}/src; make FreeBSD 'JPDEF=${JPDEF}' 'JPLIB=${JPLIB}'
do-install:
cd ${WRKSRC}/src; make install
post-install:
for file in jcat jgrep jfold jvim; do \
strip ${LOCALBASE}/bin/$$file; \
done
.include <bsd.port.mk>

1
japanese/jvim/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (jvim2.0r+onew2.2.10.tar.gz) = 42e04a80f3dbdfca4fbe8b9e634d1380

View File

@ -0,0 +1,76 @@
--- ./src/makefile.junx.orig Mon Jul 3 05:54:33 1995
+++ ./src/makefile.junx Fri Oct 31 14:53:29 1997
@@ -15,12 +15,12 @@
#
#>>>>> choose Japanese Kanji code
#JPCODE = -DJP=\".NN\"
-#JPCODE = -DJP=\".EE\"
+JPCODE = -DJP=\".EE\"
#JPCODE = -DJP=\".NN\" -DJPFEP
#>>>>> ONEW specific options
-JPDEF = -DONEW -DWNN_ISDIR # Wnn + Canna / Onew
-JPLIB = -lonew -ljd -lcanna # Wnn + Canna / Onew
+#JPDEF = -DONEW -DWNN_ISDIR # Wnn + Canna / Onew
+#JPLIB = -lonew -ljd -lcanna # Wnn + Canna / Onew
#JPDEF = -DONEW # Canna / Onew
#JPLIB = -lonew -lcanna # Canna / Onew
#JPDEF = -DONEW -DWNN_ISDIR # Wnn / Onew
@@ -47,7 +47,13 @@
-L/usr/X386/lib \
-L/usr/local/X11R5/lib \
-L/usr/local/lib \
- -L/usr/lib
+ -L/usr/lib \
+ -L%LOCALBASE%/lib \
+ -L%X11BASE%/lib \
+ -L/usr/X11R6/lib
+
+INSTALL_MAN?= install -c -m ${MANMOD}
+
######################################################################
all:
@@ -183,6 +189,7 @@
@echo 'FreeBSD'
$(MAKE) $(TARGET) \
'MACHINE = -DBSD_UNIX' \
+ 'LIBS = -ltermcap' \
'CC = gcc -O2 -Wall'
# for FreeBSD before 2.0.5R, 'LIBS = -ltermcap -lcompat' may be needed.
@@ -368,13 +375,13 @@
JGREP = jgrep
### Prefix for location of files
-PREFIX = /usr/local/jvim2.0
+PREFIX?= /usr/local
### Location of binary
BINLOC = $(PREFIX)/bin
### Location of man page
-MANDIR = $(PREFIX)/man
+MANDIR = $(PREFIX)/man/ja
MANLOC = $(MANDIR)/man1
### Location of help file
@@ -500,14 +507,10 @@
chmod $(BINMOD) $(BINLOC)/$(JFOLD)
@$(CSH) -f -c "if (! -d $(MANDIR)) mkdir $(MANDIR)"
@$(CSH) -f -c "if (! -d $(MANLOC)) mkdir $(MANLOC)"
- cp ../doc/$(MANFILE) $(MANLOC)
- chmod $(MANMOD) $(MANLOC)/$(MANFILE)
- cp ../doc/$(JGREP).1 ../doc/$(JGREP).man $(MANLOC)
- chmod $(MANMOD) $(MANLOC)/$(JGREP).1 $(MANLOC)/$(JGREP).man
- cp ../doc/$(JCAT).1 ../doc/$(JCAT).man $(MANLOC)
- chmod $(MANMOD) $(MANLOC)/$(JCAT).1 $(MANLOC)/$(JCAT).man
- cp ../doc/$(JFOLD).1 ../doc/$(JFOLD).man $(MANLOC)
- chmod $(MANMOD) $(MANLOC)/$(JFOLD).1 $(MANLOC)/$(JFOLD).man
+ ${INSTALL_MAN} ../doc/$(MANFILE) $(MANLOC)
+ ${INSTALL_MAN} ../doc/$(JGREP).1 $(MANLOC)
+ ${INSTALL_MAN} ../doc/$(JCAT).1 $(MANLOC)
+ ${INSTALL_MAN} ../doc/$(JFOLD).1 $(MANLOC)
@$(CSH) -f -c "if (! -d $(HELPLOC)) mkdir $(HELPLOC)"
cp ../doc/$(HELPFILE) $(HELPLOC)
chmod $(HELPMOD) $(HELPLOC)/$(HELPFILE)

View File

@ -0,0 +1,74 @@
--- ./src/jgrep.c.orig Mon Jul 3 23:52:28 1995
+++ ./src/jgrep.c Fri Sep 5 14:01:32 1997
@@ -38,17 +38,19 @@
static int o_nomat = FALSE; /* -v */
static int o_wsrch = FALSE; /* -w */
static int o_scode = FALSE; /* -C */
+static int o_sline = FALSE; /* -n */
static void
usage()
{
fprintf(stderr, "Jgrep/%s by ann@mrit.mei.co.jp\n", JpVersion);
- fprintf(stderr, "Usage: jgrep [ -cilsvwCNJESX., ] pattern [filename ...]\n");
+ fprintf(stderr, "Usage: jgrep [ -cilsvnwCNJESX., ] pattern [filename ...]\n");
fprintf(stderr, " -c Print only a count of the lines.\n");
fprintf(stderr, " -i Ignore case.\n");
fprintf(stderr, " -l Print only file name.\n");
fprintf(stderr, " -s Suppress error message.\n");
fprintf(stderr, " -v Print lines not match with the pattern.\n");
+ fprintf(stderr, " -n Print line number.\n");
fprintf(stderr, " -w Search \\<pattern\\>.\n");
fprintf(stderr, " -C Print kanji code.\n");
fprintf(stderr, " -N -J -E -S -X \n");
@@ -104,7 +106,7 @@
jread = jdisp = JP_NONE;
#endif
- if (argc > 1 && argv[0][0] == '-')
+ while (argc > 1 && argv[0][0] == '-')
{
char *cp;
for(cp = argv[0] + 1; *cp; cp++)
@@ -127,6 +129,10 @@
o_noerr = TRUE;
break;
+ case 'n':
+ o_sline = TRUE;
+ break;
+
case 'v':
o_nomat = TRUE;
break;
@@ -268,9 +274,11 @@
char *fname;
{
int count;
+ int nline;
reg_ic = o_icase;
count = 0;
+ nline = 0;
reset_jcount();
@@ -282,6 +290,9 @@
if (fgets(Line, IOSIZE, fp) == NULL)
break;
+ if (strchr(Line, '\n'))
+ nline++;
+
len = strlen(Line);
len = kanjiconvsfrom(Line, len, IObuff, IOSIZE * 2, NULL,
jread, NULL);
@@ -294,6 +305,8 @@
{
if (fname)
printf("%s:", fname);
+ if (o_sline)
+ printf("%d:", nline);
if (o_scode)
printf("(%c)", judge_jcode(jread));
if (o_nonly)

View File

@ -0,0 +1 @@
Japanized Vim

10
japanese/jvim/pkg-descr Normal file
View File

@ -0,0 +1,10 @@
JVim is a text editor that is upwards compatible to vi. It can be used
to edit any ASCII and Japanese(EUC or JIS) text. It is especially
useful for editing programs.
There are a lot of enhancements above vi: multi level undo, command
line editing, filename completion, on line help, quoting, etc.. Read
difference.doc for a summary of the differences between vi and Vim.
-- S. Taoka
<taoka@infonets.hiroshima-u.ac.jp>

10
japanese/jvim/pkg-plist Normal file
View File

@ -0,0 +1,10 @@
bin/jcat
bin/jgrep
bin/jfold
bin/jvim
bin/jview
lib/jvim.hlp
man/ja/man1/jcat.1.gz
man/ja/man1/jgrep.1.gz
man/ja/man1/jfold.1.gz
man/ja/man1/jvim.1.gz