1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00

Japanese input tty frontend for Canna using uum.

PR:		ports/9629
Submitted by:	KIRIYAMA Kazuhiko <kiri@pis.toba-cmt.ac.jp>
This commit is contained in:
Jun Kuriyama 1999-02-11 07:56:55 +00:00
parent 94899da1d7
commit 1ce78a113c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=16607
8 changed files with 269 additions and 0 deletions

44
japanese/canuum/Makefile Normal file
View File

@ -0,0 +1,44 @@
# New ports collection makefile for: canuum
# Version required: 1.0
# Date created: 20 Jan 1999
# Whom: KIRIYAMA Kazuhiko <kiri@kiri.toba-cmt.ac.jp>
#
# $Id$
#
DISTNAME= canuum-1.0
PKGNAME= ja-canuum-1.0
CATEGORIES= japanese
MASTER_SITES= ftp://ftp.nec.co.jp/pub/Canna/Canna22/
DISTFILES= Uum4.109.tar.gz Canna32p2.tar.gz
EXTRACT_ONLY= Uum4.109.tar.gz
MAINTAINER= kiri@pis.toba-cmt.ac.jp
LIB_DEPENDS= canna.1:${PORTSDIR}/japanese/Canna
MANLANG= ja
MAN1= canuum.1
MAKE_ARGS= PREFIX=${PREFIX}
WRKSRC= ${WRKDIR}/Canna32p2/canuum
post-extract:
@${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/Canna32p2.tar.gz \
-C ${WRKDIR} Canna32p2/Canna.conf Canna32p2/canuum
@${MV} ${WRKDIR}/Canna32p2/Canna.conf ${WRKSRC}/
@${CP} ${WRKDIR}/Uum4.109/* ${WRKSRC}
pre-patch:
@(cd ${WRKSRC}; ${PATCH} ${PATCH_DIST_ARGS} < Canuum.patch)
do-configure:
@(cd ${WRKSRC}; xmkmf; make ${MAKE_ARGS} Makefile; \
make ${MAKE_ARGS} cannaconf.h; make ${MAKE_ARGS} depend)
do-build:
@(cd ${WRKSRC}; make ${MAKE_ARGS} all)
post-install:
@${INSTALL_MAN} ${WRKSRC}/canuum.jmn ${PREFIX}/man/ja/man1/canuum.1
.include <bsd.port.mk>

2
japanese/canuum/distinfo Normal file
View File

@ -0,0 +1,2 @@
MD5 (Uum4.109.tar.gz) = f7b322ad8d3a98fc22f598c129ab42bb
MD5 (Canna32p2.tar.gz) = fc5016ed531512618b0541db67d2c2dd

View File

@ -0,0 +1,85 @@
--- Canna.conf.orig Wed Apr 12 22:15:03 1995
+++ Canna.conf Fri Jan 22 13:48:26 1999
@@ -115,18 +115,18 @@
*/
-cannaBinDir = /usr/local/canna/bin
-cannaSrvDir = /usr/local/canna/bin
-cannaLibDir = /usr/local/canna/lib
-cannaManDir = /usr/local/canna/man
-cannaIncDir = /usr/local/canna/include/canna
-libCannaDir = /usr/lib
+cannaBinDir = ${PREFIX}/bin
+cannaSrvDir = ${PREFIX}/sbin
+cannaLibDir = ${PREFIX}/lib/canna
+cannaManDir = ${PREFIX}/man
+cannaIncDir = ${PREFIX}/include/canna
+libCannaDir = ${PREFIX}/lib
-ErrDir = /usr/spool/canna
-LockDir = /usr/spool/canna/lock
+ErrDir = /var/log
+LockDir = /var/run/canna
wcharDefinition = -DCANNA_WCHAR
-Wlib =
-JapaneseLocale = japanese
+Wlib = -lxpg4
+JapaneseLocale = ja_JP.EUC
cannaOwner = bin
cannaGroup = bin
@@ -135,7 +135,7 @@
pointerIntegerDef =
-cannaDsoRev = 1
+cannaDsoRev = 1.0
sharedLibExtension = so.$(cannaDsoRev)
/* 以下の3つは root にならないでインストールするのであれば echo に
@@ -148,7 +148,7 @@
#define JAPANESEMAN
/* locale ディレクトリを持っている場合は以下を記述する */
-/* #define LOCALE_DIR /usr/lib/locale */
+#define LOCALE_DIR /usr/share/locale
/* エンジンスイッチ機能を使うのであればコメントをはずす */
/* #define engineSwitch */
@@ -174,11 +174,11 @@
* インストール済みの共有ライブラリを用いて Canna の
* コマンド類をリンクする時は、次を YES にしてくだい。
*/
-/* #define UseInstalledLibCanna YES */
-#define UseInstalledLibCanna NO
+#define UseInstalledLibCanna YES
+/*#define UseInstalledLibCanna NO */
DicDir = $(cannaLibDir)/dic
-LockFile = .CANNALOCK
+LockFile = Canna.pid
#ifdef NeXT
#define NO_X_ENV
@@ -311,13 +311,13 @@
#endif
#define InstallLibManPageAliases(file,destdir,aliases) @@\
install.man:: @@\
- @(TMP=/tmp/tmp.$$$$; \ @@\
- $(RM) $${TMP}; \ @@\
- echo .so `basename destdir/man$(LIBMANSUFFIX)`/file.$(LIBMANSUFFIX) > $${TMP}; \ @@\
- for i in aliases; do (set -x; \ @@\
- $(INSTALL) -c $(INSTMANFLAGS) $${TMP} $(DESTDIR)destdir/man$(LIBMANSUFFIX)/$$i.$(LIBMANSUFFIX)); \ @@\
- done; \ @@\
- $(RM) $${TMP})
+ @(TMP=/tmp/tmp.$$$$; \ @@\
+ $(RM) $${TMP}; \ @@\
+ echo .so `basename destdir/man$(LIBMANSUFFIX)`/file.$(LIBMANSUFFIX) > $${TMP}; \ @@\
+ for i in aliases; do (set -x; \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) $${TMP} $(DESTDIR)destdir/man$(LIBMANSUFFIX)/$$i.$(LIBMANSUFFIX)); \ @@\
+ done; \ @@\
+ $(RM) $${TMP})
#ifndef MakeDirectoriesLong
#define MakeDirectoriesLong(step,dirs,owner,group) @@\
step:: @@\

View File

@ -0,0 +1,38 @@
--- Imakefile.orig Tue Apr 19 20:38:45 1994
+++ Imakefile Fri Jan 22 00:50:46 1999
@@ -2,4 +1,4 @@
-#include "../Canna.conf"
+#include "./Canna.conf"
#if SystemV || SystemV4
SYS_LIBRARIES = -lcurses
@@ -7,11 +7,12 @@
SYS_LIBRARIES = -ltermcap
#endif
- CANNAROOT = ..
+ CANNAROOT = .
INSTUGIDFLAGS = -m 4755 -o root
- CANNASRC = $(CANNAROOT)/lib/canna16
+ CANNASRC = $(CANNAROOT)
DEFINES = -DCANNA -DJAPANESE $(SIGNAL_DEFINES)
- INCLUDES = -I$(CANNAROOT)/include
+ INCLUDES = -I$(CANNAROOT) -I${PREFIX}/include
+ LDOPTIONS = ${CANNALIB16}
SRCS = header.c printf.c termio.c termcap.c ttyfdslot.c setutmp.c \
screen.c cursor.c jhlp.c xutoj.c canna.c
@@ -21,8 +22,12 @@
TARGET = canuum
AllTarget($(TARGET))
-NormalProgramTarget($(TARGET),$(OBJS),$(DEPCANNALIB16),$(CANNALIB16),)
+NormalProgramTarget($(TARGET),$(OBJS),,,)
InstallMultipleFlags($(TARGET),$(cannaBinDir),$(INSTUGIDFLAGS))
InstallManPage($(TARGET),$(cannaManDir))
DependTarget()
LintTarget()
+MakeCannaConfigH(cannaconf.h)
+
+clean::
+ $(RM) -f cannaconf.h

View File

@ -0,0 +1,87 @@
--- jhlp.c.orig Thu Jan 21 21:52:56 1999
+++ jhlp.c Thu Jan 21 21:56:35 1999
@@ -76,6 +76,9 @@
jmp_buf kk_env;
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
+#include <sys/param.h>
+#endif
#ifdef SYSVR2
# include <sys/param.h>
#endif /* SYSVR2 */
@@ -285,9 +288,11 @@
#if defined(BSD42) && !defined(DGUX)
+#if !(defined(BSD) && (BSD >= 199306))
if (saveutmp() < 0) {
puts("Can't save utmp\n");
}
+#endif
#endif /* BSD42 */
@@ -781,7 +786,12 @@
#endif
int pid;
- if ((pid = wait3(&status, WNOHANG | WUNTRACED, NULL)) == child_id) {
+/*
+ * Remove warning.
+ * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp) 1996/8/20
+ */
+/* if ((pid = wait3(&status, WNOHANG | WUNTRACED, NULL)) == child_id) { */
+ if ((pid = wait3((int *)&status, WNOHANG | WUNTRACED, NULL)) == child_id) {
if (WIFSTOPPED(status)) {
#ifdef SIGCONT
kill(pid, SIGCONT);
@@ -1174,9 +1184,11 @@
setpgrp(0, pid);
#endif /* BSD42 */
+#if !(defined(BSD) && (BSD >= 199306))
if (setutmp(ttypfd) == ERROR) {
puts("Can't set utmp.");
}
+#endif
#ifdef linux
setsid();
@@ -1634,9 +1646,11 @@
perror(prog);
}
+#if !(defined(BSD) && (BSD >= 199306))
if (resetutmp(ttypfd) == ERROR) {
printf("Can't reset utmp.");
}
+#endif
#ifdef TIOCSSIZE
pty_rowcol.ts_lines = 0;
pty_rowcol.ts_cols = 0;
@@ -1706,11 +1720,24 @@
char *b, *pty;
int no;
{
+/*
+ * Change pseudo-devices.
+ * Because FreeBSD's master pseudo-devices are pty[p-sP-S][0-9a-v].
+ * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp) 1996/8/20
+ */
if (no < 0x10 * ('z' - 'p' + 1)) {
+#if (defined(BSD) && (BSD >= 199306)) /* 4.4BSD-Lite by Taoka */
+ sprintf(b, "%s%1c%1c", pty, "pqrsPQRS"[(no >> 5)], ((no & 0x1f > 9)? 'a' : '0') + (no & 0x1f));
+#else /* ! 4.4BSD-Lite */
sprintf(b, "%s%1c%1x", pty, 'p' + (no >> 4), no & 0x0f);
+#endif /* ! 4.4BSD-Lite */
} else {
no -= 0x10 * ('z' - 'p' + 1);
+#if (defined(BSD) && (BSD >= 199306)) /* 4.4BSD-Lite by Taoka */
+ sprintf(b, "%s%1c%1c", pty, "pqrsPQRS"[(no >> 5)], ((no & 0x1f > 9)? 'a' : '0') + (no & 0x1f));
+#else /* ! 4.4BSD-Lite */
sprintf(b, "%s%1c%1x", pty, 'P' + (no >> 4), no & 0x0f);
+#endif /* ! 4.4BSD-Lite */
}
}

View File

@ -0,0 +1 @@
Japanese input tty frontend for Canna using uum.

11
japanese/canuum/pkg-descr Normal file
View File

@ -0,0 +1,11 @@
Canuum is a Japanese input frontend program from Wnn tty frontend
uum. Cannum made from uum suitable for Canna user interfaces. After version
2.2, it can also commuicate jserver which is the Wnn Kana-Kannji
transformation server :-)
This software made with Wnn orignal version which had been developed by The
Institute of Mathematical Analythis of Kyoto University, Omron Co.ltd. and
ASTEC Co.ltd.
-KIRIYAMA Kazuhiko
<kiri@pis.toba-cmt.ac.jp>

View File

@ -0,0 +1 @@
bin/canuum