summaryrefslogtreecommitdiff
path: root/inputmethod/skkfep
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2002-05-31 13:00:04 +0000
committerseb <seb@pkgsrc.org>2002-05-31 13:00:04 +0000
commit15040bf4afd778eddb6074e4e0a98a17ff5acd01 (patch)
treec5e8fbe3e82bcf08d3662e22a94d592885d4715c /inputmethod/skkfep
parentbafcb1bc2c795c7c95278a8f110904e8a150d0ef (diff)
downloadpkgsrc-15040bf4afd778eddb6074e4e0a98a17ff5acd01.tar.gz
Reimport of package skkfep from japanese/skkfep into inputmethod/skkfep.
This is part of the japanese category retirement. CATEGORIES adjusted.
Diffstat (limited to 'inputmethod/skkfep')
-rw-r--r--inputmethod/skkfep/DESCR7
-rw-r--r--inputmethod/skkfep/INSTALL39
-rw-r--r--inputmethod/skkfep/MESSAGE9
-rw-r--r--inputmethod/skkfep/Makefile30
-rw-r--r--inputmethod/skkfep/PLIST4
-rw-r--r--inputmethod/skkfep/distinfo14
-rw-r--r--inputmethod/skkfep/patches/patch-aa46
-rw-r--r--inputmethod/skkfep/patches/patch-ab22
-rw-r--r--inputmethod/skkfep/patches/patch-ac14
-rw-r--r--inputmethod/skkfep/patches/patch-ba11
-rw-r--r--inputmethod/skkfep/patches/patch-bb146
-rw-r--r--inputmethod/skkfep/patches/patch-bc38
-rw-r--r--inputmethod/skkfep/patches/patch-bd21
-rw-r--r--inputmethod/skkfep/patches/patch-be66
-rw-r--r--inputmethod/skkfep/patches/patch-bf104
-rw-r--r--inputmethod/skkfep/patches/patch-bg70
16 files changed, 641 insertions, 0 deletions
diff --git a/inputmethod/skkfep/DESCR b/inputmethod/skkfep/DESCR
new file mode 100644
index 00000000000..add0ec8cb03
--- /dev/null
+++ b/inputmethod/skkfep/DESCR
@@ -0,0 +1,7 @@
+ skkfep is a SKK-like Kana-to-Kanji FrontEnd Processor. It works
+on terminals and realizes SKK-like conversion without emacs.
+
+Features:
+ - realize SKK-like Kana/Kanji user interface on terminals,
+ - shares private and common dictionaries with SKK,
+ - word registration is not currently supported.
diff --git a/inputmethod/skkfep/INSTALL b/inputmethod/skkfep/INSTALL
new file mode 100644
index 00000000000..341c360eaf9
--- /dev/null
+++ b/inputmethod/skkfep/INSTALL
@@ -0,0 +1,39 @@
+#! /bin/sh
+# $NetBSD: INSTALL,v 1.1.1.1 2002/05/31 13:00:04 seb Exp $
+
+conf=@PKGBASE@/etc/skk.conf
+
+case "$2" in
+POST-INSTALL)
+ # install skkserv port number
+ if grep '^skkserv[ ]' /etc/services >/dev/null; then
+ :
+ else
+ echo '
+skkserv 1178/tcp # SKK server' >>/etc/services
+ fi
+
+ # install skk.conf
+ if [ -f $conf ] && grep -v -e '^#' -e '^$' $conf >/dev/null; then
+ : file exists and it seems to have some configurations
+ else
+ cat <<'END' >$conf
+# skk.conf - configuration file for SKK client programs
+
+# Syntax
+# Lines start with '#' are comments.
+#
+# skkserv_host: <hostnme> # Host which skkserv is running on.
+# # default: localhost
+#
+# skkserv_port: <port> # TCP service name or port number of skkserv.
+# # default: skkserv
+#
+
+# skkserv_host: localhost
+# skkserv_port: skkserv
+# skkserv_port: 1178
+END
+ fi
+ ;;
+esac
diff --git a/inputmethod/skkfep/MESSAGE b/inputmethod/skkfep/MESSAGE
new file mode 100644
index 00000000000..5fb1b40b534
--- /dev/null
+++ b/inputmethod/skkfep/MESSAGE
@@ -0,0 +1,9 @@
+======================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2002/05/31 13:00:04 seb Exp $
+
+ To use skkfep, the dictionary server (skkserv) is almost
+required. Use "skkserv" pkg, or, if you have another machine
+running skkserv, put the hostname in ${LOCALBASE}/etc/skk.conf
+file, and skkfep will connect to the host.
+
+======================================================================
diff --git a/inputmethod/skkfep/Makefile b/inputmethod/skkfep/Makefile
new file mode 100644
index 00000000000..63a5b64384b
--- /dev/null
+++ b/inputmethod/skkfep/Makefile
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1.1.1 2002/05/31 13:00:04 seb Exp $
+
+DISTNAME= skkfep0.86c
+PKGNAME= skkfep-0.86c
+WRKSRC= ${WRKDIR}/skkfep
+CATEGORIES= japanese inputmethod
+MASTER_SITES= ftp://ei5nazha.yz.yamagata-u.ac.jp/skkfep/
+
+MAINTAINER= packages@netbsd.org
+HOMEPAGE= http://ei5nazha.yz.yamagata-u.ac.jp/~aito/aito-soft.html
+COMMENT= Terminal based SKK-like Kana-to-Kanji FrontEnd Processor
+
+BUILD_DEFS+= USE_INET6
+
+NO_CONFIGURE=
+MAKE_ENV= MAKE_FLAGS='EXECBASE=${LOCALBASE} CC=${CC}'
+
+DESCR_SRC= ${WRKDIR}/DESCR
+INSTALL_FILE= ${WRKDIR}/INSTALL
+
+post-build:
+ ${SED} 's#@PKGBASE@#${LOCALBASE}#g' ${PKGDIR}/DESCR >${DESCR_SRC}
+ ${SED} 's#@PKGBASE@#${LOCALBASE}#g' ${PKGDIR}/INSTALL >${INSTALL_FILE}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/skkfep ${PREFIX}/bin/skkfep
+ ${INSTALL_MAN} ${WRKSRC}/skkfep.1 ${PREFIX}/man/man1/skkfep.1
+ ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/inputmethod/skkfep/PLIST b/inputmethod/skkfep/PLIST
new file mode 100644
index 00000000000..97d35eb8cb8
--- /dev/null
+++ b/inputmethod/skkfep/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2002/05/31 13:00:04 seb Exp $
+bin/skkfep
+man/man1/skkfep.1
+@unexec if [ -f %D/etc/skk.conf ]; then echo 'Remove "%D/etc/skk.conf" if you will not use SKK programs any longer.'; fi
diff --git a/inputmethod/skkfep/distinfo b/inputmethod/skkfep/distinfo
new file mode 100644
index 00000000000..8b48f3fab18
--- /dev/null
+++ b/inputmethod/skkfep/distinfo
@@ -0,0 +1,14 @@
+$NetBSD: distinfo,v 1.1.1.1 2002/05/31 13:00:04 seb Exp $
+
+SHA1 (skkfep0.86c.tar.gz) = fe1473c2a9d28901a96fdc5cf51079de47c86c32
+Size (skkfep0.86c.tar.gz) = 46748 bytes
+SHA1 (patch-aa) = 67464f423931e62c17c7118e9acb0c33c56d81b1
+SHA1 (patch-ab) = f913b929b6857bf29b2936edde6c87d9d17c4309
+SHA1 (patch-ac) = a55de012abb00d22a9a209c265b72a508c333d47
+SHA1 (patch-ba) = 4c3d43e8424a1218e4b638dde49e16023ee2d96a
+SHA1 (patch-bb) = 9eb7fb317c661ebc293fdf02d2128b31a465c4ab
+SHA1 (patch-bc) = c832e04eceeab71b9add976082c9375bd8a9dc03
+SHA1 (patch-bd) = 8e3321de9841382f932bb9edf1470d1cbe455bce
+SHA1 (patch-be) = 10aa4c7002b224f80e8af540012f76a661cec92d
+SHA1 (patch-bf) = c8e76e009fee4ad6f86bf70c71c0bc51dc596174
+SHA1 (patch-bg) = b1159a569233280cc1ad9df2da0189fd3a2d08ad
diff --git a/inputmethod/skkfep/patches/patch-aa b/inputmethod/skkfep/patches/patch-aa
new file mode 100644
index 00000000000..7807369474d
--- /dev/null
+++ b/inputmethod/skkfep/patches/patch-aa
@@ -0,0 +1,46 @@
+$NetBSD: patch-aa,v 1.1.1.1 2002/05/31 13:00:04 seb Exp $
+
+--- config.h.orig Tue Sep 22 01:45:27 1998
++++ config.h Tue Dec 21 00:09:13 1999
+@@ -2,10 +2,24 @@
+ * Configuration for SKKFEP
+ */
+
+-#include "configs/solaris2.h"
++#ifdef sun
++# ifdef __SVR4
++# include "configs/solaris2.h"
++# undef TERMINFO
++# else
++# include "configs/sun.h"
++# endif
++#elif defined(__NetBSD__)
++#include "configs/netbsd.h"
++#elif defined(__FreeBSD__)
++#include "configs/freebsd.h"
++#elif defined(__bsdi__)
++#include "configs/bsdi.h"
++#elif defined(__linux__)
++#include "configs/linux.h"
++#endif
+
+ #if makefile_parameter
+-CC=gcc
+ DEFINE=-DUSE_LOCALE
+ OPTIMIZE=-O
+ EXTRALIBS=
+@@ -14,7 +28,7 @@
+ #define DEFAULT_KANAKEY "^j"
+
+ /* By Y. Kaneko */
+-/*#define KUTOUTEN /* "."->maru, ","->ten */
++#define KUTOUTEN /* "."->maru, ","->ten */
+
+ #define KANJIBS /* do/don't shuft-out BS code in JIS mode */
+ #define KANJIBS_DEFAULT 0 /* 0 -> shift out / 1 -> don't shift out */
+@@ -28,4 +42,4 @@
+
+ #define NATIVECODE euc /* EUC Kanji code */
+
+-#define SKK_SERVER_HOST "ei5nazha" /* SKK server host */
++#define SKK_SERVER_HOST "localhost" /* SKK server host */
diff --git a/inputmethod/skkfep/patches/patch-ab b/inputmethod/skkfep/patches/patch-ab
new file mode 100644
index 00000000000..8e27f43e81a
--- /dev/null
+++ b/inputmethod/skkfep/patches/patch-ab
@@ -0,0 +1,22 @@
+$NetBSD: patch-ab,v 1.1.1.1 2002/05/31 13:00:04 seb Exp $
+
+--- configs/netbsd.h.orig Tue Jul 7 00:31:13 1998
++++ configs/netbsd.h Mon Dec 20 23:53:25 1999
+@@ -1,5 +1,5 @@
+ /*
+- * Configuration for NetBSD-1.2 (x68k)
++ * Configuration for NetBSD
+ */
+
+ #define BSD /* My machine is BSD system */
+@@ -8,7 +8,9 @@
+ #define HAVE_SETENV /* My machine has setenv() */
+ #define HAVE_BSD_OPENPTY /* BSD type openpty() */
+
+-#include <stdlib.h> /* just in case of NetBSD/Alpha */
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
+ #include <util.h> /* for openpty() */
+
+ #if makefile_parameter
diff --git a/inputmethod/skkfep/patches/patch-ac b/inputmethod/skkfep/patches/patch-ac
new file mode 100644
index 00000000000..a3ed20f125a
--- /dev/null
+++ b/inputmethod/skkfep/patches/patch-ac
@@ -0,0 +1,14 @@
+$NetBSD: patch-ac,v 1.1.1.1 2002/05/31 13:00:04 seb Exp $
+
+--- Makefile.orig Tue Jul 7 00:31:14 1998
++++ Makefile Mon Dec 20 23:45:52 1999
+@@ -15,5 +15,8 @@
+ rm -f genMakefile
+
+ genMakefile: protoMakefile config.h
+- awk -f extrpar `grep 'configs/.*\.h' config.h | sed 's/.*\(configs\/.*\.h\).*/\1/'` > genMakefile
++ rm -f genMakefile
++ cp config.h junk.c
++ awk -f extrpar `cc -E junk.c | sed -n 's/^#[^"]*"\([^/][^"]*onfigs[^"]*\)".*/\1/p' | sort | uniq` > genMakefile
++ rm -f junk.c
+ awk -f extrpar config.h | cat - protoMakefile >> genMakefile
diff --git a/inputmethod/skkfep/patches/patch-ba b/inputmethod/skkfep/patches/patch-ba
new file mode 100644
index 00000000000..b859d0e1738
--- /dev/null
+++ b/inputmethod/skkfep/patches/patch-ba
@@ -0,0 +1,11 @@
+$NetBSD: patch-ba,v 1.1.1.1 2002/05/31 13:00:04 seb Exp $
+
+--- protoMakefile.orig Tue Jul 7 00:31:15 1998
++++ protoMakefile Mon Dec 20 23:49:42 1999
+@@ -1,4 +1,5 @@
+-CFLAGS=$(SYSINCLUDE) $(SYSDEFINE) $(DEFINE) $(OPTIMIZE)
++CFLAGS=$(SYSINCLUDE) $(SYSDEFINE) $(DEFINE) $(OPTIMIZE) \
++ -DSKK_CONF=\"$(EXECBASE)/etc/skk.conf\"
+ LIBS =$(SYSLIBS) $(EXTRALIBS) -ltermcap
+
+ OBJS=fep.o connsh.o readwrite.o terms.o stty.o keybind.o romkan.o etc.o\
diff --git a/inputmethod/skkfep/patches/patch-bb b/inputmethod/skkfep/patches/patch-bb
new file mode 100644
index 00000000000..4a433fa38ea
--- /dev/null
+++ b/inputmethod/skkfep/patches/patch-bb
@@ -0,0 +1,146 @@
+$NetBSD: patch-bb,v 1.1.1.1 2002/05/31 13:00:04 seb Exp $
+
+--- connserv.c.orig Tue Jul 7 00:31:16 1998
++++ connserv.c Tue Nov 7 20:58:57 2000
+@@ -14,6 +14,10 @@
+ #include <netinet/in.h>
+ #include <netdb.h>
+
++#ifdef PF_INET6
++# define HAVE_GETADDRINFO
++#endif
++
+ #define SKK_PORT_NUMBER 1178
+ #define SKK_SERVICENAME "skkserv"
+
+@@ -36,50 +40,112 @@
+ int sock;
+ int i;
+ unsigned short port;
++#ifdef HAVE_GETADDRINFO
++ struct addrinfo aihint, *ai0, *ai;
++ int error;
++#else
+ struct sockaddr_in hostaddr;
+ struct hostent *entry;
+ struct servent *serv;
+ struct protoent *proto;
+- int a1,a2,a3,a4;
++#endif
+ char *hostname;
+-
+- serv = getservbyname(SKK_SERVICENAME,"tcp");
+- fillzero((char*)&hostaddr,sizeof(struct sockaddr_in));
+- if ((proto = getprotobyname("tcp")) == NULL) {
+- return -1;
+- }
+-
+- if ((sock = socket(AF_INET,SOCK_STREAM,proto->p_proto)) < 0) {
+- return -1;
++#ifdef SKK_CONF /* use skk.conf */
++ FILE *conffp;
++ char line[128];
++ char hostbuf[128];
++ char servbuf[128];
++ char *confhost = NULL;
++ char *confport = SKK_SERVICENAME;
++
++ if ((conffp = fopen(SKK_CONF, "r")) != NULL) {
++ char *p, *data;
++
++ while (fgets(line, sizeof line, conffp) != NULL) {
++ if ((p = strchr(line, '#')) != NULL)
++ *p = '\0';
++ if ((p = strtok(line, ": \t\n")) == NULL)
++ continue;
++ if ((data = strtok((char *) NULL, " \t\n")) == NULL)
++ continue;
++ if (!strcmp(p, "skkserv_host")) {
++ strcpy(hostbuf, data);
++ confhost = hostbuf;
++ } else if (!strcmp(p, "skkserv_port")) {
++ strcpy(servbuf, data);
++ confport = servbuf;
++ }
++ }
+ }
++# undef SKK_SERVICENAME
++# define SKK_SERVICENAME confport
++#endif
+
+ if (SKKServerHost)
+ hostname = SKKServerHost;
+ else if ((hostname = getenv("SKKSERVER")) == NULL) {
++#ifdef SKK_CONF
++ if ((hostname = confhost) == NULL)
++#endif
+ #ifdef SKK_SERVER_HOST
+ hostname = SKK_SERVER_HOST;
+ #else
+ return -1;
+ #endif
+ }
+- if ('0' <= *hostname && *hostname <= '9') {
+- if (sscanf(hostname,"%d.%d.%d.%d",&a1,&a2,&a3,&a4) != 4) {
+- return -1;
+- }
+- a1 = (a1<<24)|(a2<<16)|(a3<<8)|a4;
+- hostaddr.sin_addr.s_addr = htonl(a1);
++
++#ifdef HAVE_GETADDRINFO
++ fillzero((char*)&aihint, sizeof aihint);
++ aihint.ai_family = PF_UNSPEC;
++ aihint.ai_socktype = SOCK_STREAM;
++ aihint.ai_flags = AI_CANONNAME;
++ error = getaddrinfo(hostname, SKK_SERVICENAME, &aihint, &ai0);
++ if (error) {
++ printf("%s: %s\r\n", gai_strerror(error), hostname);
++ return -1;
++ }
++
++ sock = -1;
++ for (ai = ai0; ai; ai = ai->ai_next) {
++ sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
++ if (sock >= 0 &&
++ connect(sock, ai->ai_addr, ai->ai_addrlen) == 0)
++ break;
++ close(sock);
++ sock = -1;
++ }
++ if (sock < 0) {
++ perror(hostname);
++ return -1;
++ }
++#else
++ serv = getservbyname(SKK_SERVICENAME,"tcp");
++ fillzero((char*)&hostaddr,sizeof(struct sockaddr_in));
++ if ((proto = getprotobyname("tcp")) == NULL) {
++ return -1;
+ }
+- else {
++
++ if ((sock = socket(AF_INET,SOCK_STREAM,proto->p_proto)) < 0) {
++ return -1;
++ }
++
++ if ((hostaddr.sin_addr.s_addr = inet_addr(hostname)) == INADDR_NONE) {
+ if ((entry = gethostbyname(hostname)) == NULL) {
+ return -1;
+ }
+ bincopy(entry->h_addr, &hostaddr.sin_addr, entry->h_length);
+ }
+ hostaddr.sin_family = AF_INET;
+- hostaddr.sin_port = serv ? serv->s_port : htons(SKK_PORT_NUMBER);
++ hostaddr.sin_port =
++ serv ? serv->s_port :
++#ifdef SKK_CONF
++ (i = atoi(confport)) > 0 ? htons(i) :
++#endif
++ htons(SKK_PORT_NUMBER);
+ if (connect(sock,(struct sockaddr *)&hostaddr,sizeof(struct sockaddr_in)) < 0) {
+ return -1;
+ }
++#endif
+ printf("SKKSERVER=%s\r\n",hostname);
+ skkservsock = sock;
+ rserv = fdopen(sock,"r");
diff --git a/inputmethod/skkfep/patches/patch-bc b/inputmethod/skkfep/patches/patch-bc
new file mode 100644
index 00000000000..17fd65bd7d5
--- /dev/null
+++ b/inputmethod/skkfep/patches/patch-bc
@@ -0,0 +1,38 @@
+$NetBSD: patch-bc,v 1.1.1.1 2002/05/31 13:00:04 seb Exp $
+
+--- connsh.c.orig Tue Sep 22 01:50:12 1998
++++ connsh.c Sun Sep 27 13:41:53 1998
+@@ -21,6 +21,10 @@
+ #define vfork fork
+ #endif
+
++#ifdef USE_SERVER
++extern int skkservsock;
++#endif
++
+ #define DEVICELEN 16
+ #define DEFAULT_SHELL "/bin/csh"
+
+@@ -171,8 +175,9 @@
+ #endif /* not HPUX */
+
+ if((i = vfork()) < 0) {
+- fprintf(stderr,"fork error\n");
+- abort();
++ perror("fork");
++ reset_tty();
++ Exit(1);
+ }
+
+ if(i == 0) { /* child */
+@@ -226,6 +231,10 @@
+ dup2(slave,1);
+ dup2(slave,2);
+ close(slave);
++#ifdef USE_SERVER
++ if (skkservsock >= 0)
++ close(skkservsock);
++#endif
+
+ seteuid(getuid());
+ p = &ShellName[strlen(ShellName)];
diff --git a/inputmethod/skkfep/patches/patch-bd b/inputmethod/skkfep/patches/patch-bd
new file mode 100644
index 00000000000..13766383566
--- /dev/null
+++ b/inputmethod/skkfep/patches/patch-bd
@@ -0,0 +1,21 @@
+$NetBSD: patch-bd,v 1.1.1.1 2002/05/31 13:00:04 seb Exp $
+
+--- fep.c.orig Tue Jul 7 00:31:16 1998
++++ fep.c Tue Dec 21 00:42:53 1999
+@@ -219,7 +219,6 @@
+ /* Initialize */
+ setKanaKey();
+ getTCstr();
+- tty_ready();
+ get_winsize();
+ set_tty();
+ set_int();
+@@ -308,7 +307,7 @@
+ break;
+ }
+ }
+- return jisAJ; /* default */
++ return jisBB; /* default */
+ }
+
+ flushOut(minchar)
diff --git a/inputmethod/skkfep/patches/patch-be b/inputmethod/skkfep/patches/patch-be
new file mode 100644
index 00000000000..a7eacb8a21d
--- /dev/null
+++ b/inputmethod/skkfep/patches/patch-be
@@ -0,0 +1,66 @@
+$NetBSD: patch-be,v 1.1.1.1 2002/05/31 13:00:04 seb Exp $
+
+--- readwrite.c.orig Tue Jul 7 00:31:15 1998
++++ readwrite.c Sun Sep 27 10:24:06 1998
+@@ -4,6 +4,14 @@
+ #include "kanjicode.h"
+ #include "ctrlcode.h"
+
++#ifndef STDIN_FILENO
++#define STDIN_FILENO 0
++#endif
++
++#ifndef STDOUT_FILENO
++#define STDOUT_FILENO 1
++#endif
++
+ #ifdef DEBUG
+ extern FILE *wrlog;
+ #endif
+@@ -29,12 +37,10 @@
+ SIC_B,SOC_B,"JIS",3,3,
+ };
+
+-extern int tty;
+-
+ char read1()
+ { char c;
+
+- if (read(tty,&c,1) != 0)
++ if (read(STDIN_FILENO,&c,1) != 0)
+ return c;
+ return EOF;
+ }
+@@ -320,13 +326,13 @@
+ char *s;
+ { int l = strlen(s);
+
+- writeTTYorg(tty,s,l,INTERNALCODE,OutCode,&TInter_Stat,&To_TTY_Stat);
++ writeTTYorg(STDOUT_FILENO,s,l,INTERNALCODE,OutCode,&TInter_Stat,&To_TTY_Stat);
+ }
+
+ write1(c)
+ char c;
+ {
+- writeTTYorg(tty,&c,1,INTERNALCODE,OutCode,&TInter_Stat,&To_TTY_Stat);
++ writeTTYorg(STDOUT_FILENO,&c,1,INTERNALCODE,OutCode,&TInter_Stat,&To_TTY_Stat);
+ }
+
+ writeShTty(s,l)
+@@ -334,14 +340,14 @@
+ int l;
+ {
+
+- writeTTYorg(tty,s,l,WriteCode,OutCode,&From_SH_Stat,&To_TTY_Stat);
++ writeTTYorg(STDOUT_FILENO,s,l,WriteCode,OutCode,&From_SH_Stat,&To_TTY_Stat);
+ }
+
+ writeTty(s,l)
+ char *s;
+ int l;
+ {
+- writeTTYorg(tty,s,l,INTERNALCODE,OutCode,&TInter_Stat,&To_TTY_Stat);
++ writeTTYorg(STDOUT_FILENO,s,l,INTERNALCODE,OutCode,&TInter_Stat,&To_TTY_Stat);
+ }
+
+
diff --git a/inputmethod/skkfep/patches/patch-bf b/inputmethod/skkfep/patches/patch-bf
new file mode 100644
index 00000000000..b5e49156c22
--- /dev/null
+++ b/inputmethod/skkfep/patches/patch-bf
@@ -0,0 +1,104 @@
+$NetBSD: patch-bf,v 1.1.1.1 2002/05/31 13:00:04 seb Exp $
+
+--- stty.c.orig Wed Sep 23 01:22:53 1998
++++ stty.c Sun Sep 27 10:21:12 1998
+@@ -31,12 +31,15 @@
+
+ #endif
+
++#ifndef STDIN_FILENO
++#define STDIN_FILENO 0
++#endif
++
+ #ifndef NO_SUSPEND
+ SignalFunc suspend();
+ #endif
+
+ TERMPARAM d_ioval;
+-int tty;
+ #ifdef TIOCSWINSZ
+ struct winsize d_winsize;
+ #endif /* TIOCSWINSZ */
+@@ -142,7 +145,7 @@
+ #ifdef TIOCSWINSZ
+ extern int lines, columns;
+
+- ioctl(tty, TIOCGWINSZ, &d_winsize);
++ ioctl(STDIN_FILENO, TIOCGWINSZ, &d_winsize);
+ if (d_winsize.ws_col == 0) {
+ d_winsize.ws_col = columns;
+ } else {
+@@ -153,7 +156,7 @@
+ } else {
+ lines = d_winsize.ws_row;
+ }
+- ioctl(tty, TIOCSWINSZ, &d_winsize);
++ ioctl(STDIN_FILENO, TIOCSWINSZ, &d_winsize);
+ #endif /* TIOCSWINSZ */
+ }
+
+@@ -161,7 +164,7 @@
+ { int er;
+ TERMPARAM ioval;
+
+- GET_TTY(tty, &d_ioval);
++ GET_TTY(STDIN_FILENO, &d_ioval);
+ ioval = d_ioval;
+
+ #if defined TERMIOS || defined TERMIO
+@@ -195,7 +198,7 @@
+ ioval.m_ttyb.sg_flags = RAW;
+ #endif
+
+- er = SET_TTY(tty, &ioval);
++ er = SET_TTY(STDIN_FILENO, &ioval);
+
+ initFep();
+
+@@ -208,14 +211,8 @@
+
+ reset_tty()
+ {
+- reset_tty_without_close();
+- close(tty);
+-}
+-
+-reset_tty_without_close()
+-{
+ termFep();
+- SET_TTY(tty, &d_ioval);
++ SET_TTY(STDIN_FILENO, &d_ioval);
+ }
+
+ set_tty_sane(tty)
+@@ -258,12 +255,6 @@
+ }
+ }
+
+-tty_ready()
+-{ char *ttyname();
+-
+- tty = open(ttyname(0),O_RDWR);
+-}
+-
+ SignalFunc
+ reset_exit()
+ {
+@@ -315,7 +306,7 @@
+ union wait statusp;
+ #endif
+
+-#ifndef NO_SUSPEND
++#ifdef NO_SUSPEND
+ while ((cpid = wait((int *)&statusp)) != -1 && cpid != ShellPID)
+ ;
+ #else
+@@ -385,7 +376,7 @@
+ SignalFunc
+ suspend()
+ {
+- reset_tty_without_close();
++ reset_tty();
+ signal(SIGTSTP,SIG_DFL);
+ kill(0,SIGTSTP);
+
diff --git a/inputmethod/skkfep/patches/patch-bg b/inputmethod/skkfep/patches/patch-bg
new file mode 100644
index 00000000000..954b5685280
--- /dev/null
+++ b/inputmethod/skkfep/patches/patch-bg
@@ -0,0 +1,70 @@
+$NetBSD: patch-bg,v 1.1.1.1 2002/05/31 13:00:04 seb Exp $
+
+--- skkfep.1.orig Tue Jul 7 00:31:16 1998
++++ skkfep.1 Sat Dec 25 17:28:26 1999
+@@ -21,12 +21,13 @@
+ EUC (or DEC code).
+ .IP \fBsj\fR
+ MS-Kanji (Shift-JIS) code.
+-.IP \fBjis\fIIO\fR
++.IP \fBjis\fIIO\fR
+ JIS code. \fII\fR and \fIO\fR are characters which
+-represent shift-in/out escape sequence respectively. For shift-in,
+-\fBA,@\fR(ESC $ @) or \fBB\fR(ESC $ B) can be specified; for
+-shift-out, \fBH\fR(ESC ( H), \fBJ\fR(ESC ( J) or \fBB\fR(ESC ( B) can
++represent kanji/ASCII escape sequences respectively. For kanji sequence,
++\fBA\fR, \fB@\fR (ESC $ @) or \fBB\fR (ESC $ B) can be specified; for
++ASCII sequence, \fBH\fR (ESC ( H), \fBJ\fR (ESC ( J) or \fBB\fR (ESC ( B) can
+ be specified.
++If the \fIIO\fR characters are omitted, the characters default to \fBBB\fR.
+ .RE
+ .TP
+ .BI -f kanjicode
+@@ -34,7 +35,7 @@
+ .TP
+ .BI -udic \0dictionary
+ Specifies the user dictionary file.
+-Default is $(HOME)/.skk-jisyo.
++Default is $HOME/.skk-jisyo.
+ .TP
+ .B -bs
+ Toggle BS behavior when the
+@@ -46,12 +47,12 @@
+ Choose the mode of learning words got from skk server.
+ \fImode\fR is one of following:
+ .RS
+-.IP \fBnone\fR or \fBoff\fR or \fB0\fR
++.IP "\fBnone\fR or \fBoff\fR or \fB0\fR"
+ Do not learn the words at all.
+-.IP \fBtemporal\fR or \fB1\fR
++.IP "\fBtemporal\fR or \fB1\fR"
+ Learn the words while the skkfep process is alive, but do not record
+ the learned information.
+-.IP \fBpermanent\fR or \fB2\fR
++.IP "\fBpermanent\fR or \fB2\fR"
+ Learn the words and record them on the user dictionary.
+ .RE
+ .TP
+@@ -61,12 +62,20 @@
+ .TP
+ .BI -k char
+ Specify the kanji toggle key. A control character is
+-expressed as ^ followed by an alphabet (for example, ^t). Default is
+-^T.
++expressed as ^ followed by an alphabet (for example, ^j). Default is
++^J.
+ .TP
+ .B -esc
+ With this option, ESC key becomes `RETUEN-TO-SKK-MODE' key.
+ This option is useful for vi-users.
++.TP
++.B -viesc
++With this option, ESC key becomes `RETUEN-TO-SKK-MODE' key and
++one of i, a, o, I, A, S, and R key restores the last mode.
++.TP
++.B -emacsesc
++With this option, control characters go though to the shell and disable
++conversion temporarily.
+ .TP
+ .B -rs
+ Reverse status line.