diff options
author | seb <seb@pkgsrc.org> | 2002-05-31 13:00:58 +0000 |
---|---|---|
committer | seb <seb@pkgsrc.org> | 2002-05-31 13:00:58 +0000 |
commit | b99ed581207cbde22cff7b1f7e5207d3d2908000 (patch) | |
tree | af28912a7177130b926bad6a38371f767fb37a6d /inputmethod | |
parent | d8feaca9a7fa77dc8737e1ff2cd168c6e5e8efec (diff) | |
download | pkgsrc-b99ed581207cbde22cff7b1f7e5207d3d2908000.tar.gz |
Reimport of package Canna-lib from japanese/canna-lib into inputmethod/canna-lib.
This is part of the japanese category retirement.
CATEGORIES adjusted.
Diffstat (limited to 'inputmethod')
-rw-r--r-- | inputmethod/canna-lib/DESCR | 13 | ||||
-rw-r--r-- | inputmethod/canna-lib/Makefile | 77 | ||||
-rw-r--r-- | inputmethod/canna-lib/PLIST | 121 | ||||
-rw-r--r-- | inputmethod/canna-lib/distinfo | 16 | ||||
-rw-r--r-- | inputmethod/canna-lib/files/LinkFileList.rules | 20 | ||||
-rw-r--r-- | inputmethod/canna-lib/files/canna | 25 | ||||
-rw-r--r-- | inputmethod/canna-lib/patches/patch-aa | 86 | ||||
-rw-r--r-- | inputmethod/canna-lib/patches/patch-ab | 18 | ||||
-rw-r--r-- | inputmethod/canna-lib/patches/patch-ac | 13 | ||||
-rw-r--r-- | inputmethod/canna-lib/patches/patch-ad | 23 | ||||
-rw-r--r-- | inputmethod/canna-lib/patches/patch-ae | 234 | ||||
-rw-r--r-- | inputmethod/canna-lib/patches/patch-af | 13 |
12 files changed, 659 insertions, 0 deletions
diff --git a/inputmethod/canna-lib/DESCR b/inputmethod/canna-lib/DESCR new file mode 100644 index 00000000000..14268d78991 --- /dev/null +++ b/inputmethod/canna-lib/DESCR @@ -0,0 +1,13 @@ +Canna is a Kana-Kanji conversion server. +Support Mule(Multi-lingal extention Emacs), kinput2 X11 input method, +cannum front end and some others. + + To use from Mule (CANNA version), in .emacs file: + + (if (and (boundp 'CANNA) CANNA) ; Is it CANNA MULE? + (progn + (load-library "canna") + (canna) )) + + Then kana-kanji conversion begin to `C-o' key. Show more detail +Info, and/or documents. diff --git a/inputmethod/canna-lib/Makefile b/inputmethod/canna-lib/Makefile new file mode 100644 index 00000000000..02699a43b1f --- /dev/null +++ b/inputmethod/canna-lib/Makefile @@ -0,0 +1,77 @@ +# $NetBSD: Makefile,v 1.1.1.1 2002/05/31 13:00:58 seb Exp $ +# + +DISTNAME= Canna35b2 +PKGNAME= Canna-lib-3.5.2 +PKGREVISION= 1 +CATEGORIES= japanese inputmethod +MASTER_SITES= ftp://ftp.nec.co.jp/pub/Canna/Canna35/ + +PATCH_SITES= http://www.jaist.ac.jp/~fujieda/canna/ +PATCHFILES= Canna35b2-unoff1.patch.gz Canna35b2-unoff2.patch.gz \ + Canna35b2-hack1.patch.gz +PATCH_DIST_STRIP= -p1 + +MAINTAINER= tech-pkg-ja@jp.netbsd.org +HOMEPAGE= http://www.nec.co.jp/japanese/product/computer/soft/canna/ +COMMENT= Kana-Kanji conversion system (library) + +INSTALL_TARGET= install install.man + +# XXX USE_IMAKE can't pass MAKE_FLAGS to XMKMF. +#USE_IMAKE= # defined +USE_X11BASE= # defined +BUILD_DEFS+= USE_INET6 + +.include "../../mk/bsd.prefs.mk" +.if 0 # ${USE_INET6} == "YES" +INET6= -DINET6 +.else +INET6= # empty +.endif +CANNAOWNER?= daemon +CANNAGROUP?= daemon +DICT_DIR?= ${DESTDIR}/var/dict +MAKE_ENV+= CANNAOWNER=${CANNAOWNER} CANNAGROUP=${CANNAGROUP} \ + DICT_DIR=${DICT_DIR} INET6=${INET6} +PLIST_SUBST= CANNAOWNER=${CANNAOWNER} \ + CANNAGROUP=${CANNAGROUP} \ + DICT_DIR=${DICT_DIR} \ + PREFIX=${PREFIX} + +# (1) Change SUBDIRS. +# (2) Don't install `forcpp', `kpdic'. +# (3) Include ${FILESDIR}/LinkFileList.rules just after including Canna.conf +# in Imakefiles. +post-patch: + @${MV} ${WRKSRC}/Imakefile ${WRKSRC}/Imakefile.orig + @${SED} -e 's|\(SUBDIRS = lib canna\).*\( misc\)|\1 cmd/forcpp cmd/kpdic dic/phono\2|' \ + -e 's|\(SGSDIR = \).*|\1 lib canna dic/phono misc doc|' \ + ${WRKSRC}/Imakefile.orig > ${WRKSRC}/Imakefile +.for f in forcpp kpdic + @${MV} ${WRKSRC}/cmd/${f}/Imakefile ${WRKSRC}/cmd/${f}/Imakefile.orig + @${SED} -e '/InstallProgram/d' ${WRKSRC}/cmd/${f}/Imakefile.orig \ + > ${WRKSRC}/cmd/${f}/Imakefile +.endfor + @${FIND} ${WRKSRC} -name Imakefile -print | \ + while read f; do \ + ${CP} $$f $${f}.orig; \ + ( \ + ${ECHO} '/#include ".*\/Canna.conf"$$/a\'; \ + ${ECHO} '#include "${FILESDIR}/LinkFileList.rules"'; \ + ) | ${SED} -f /dev/stdin $${f}.orig >$$f; \ + done + +# We need to pass ${MAKE_ENV} to ${XMKMF} +do-configure: + @cd ${WRKSRC} && \ + ${SETENV} ${SCRIPTS_ENV} XPROJECTROOT=${X11BASE} ${MAKE_ENV} ${XMKMF} + +post-configure: + @${LN} -s ${WRKSRC}/server/*.h ${WRKSRC}/include + +post-install: + @${LN} -s ${DICT_DIR}/canna ${PREFIX}/share/canna/dic + @${CHOWN} ${CANNAOWNER}:${CANNAGROUP} ${DICT_DIR}/canna + +.include "../../mk/bsd.pkg.mk" diff --git a/inputmethod/canna-lib/PLIST b/inputmethod/canna-lib/PLIST new file mode 100644 index 00000000000..c77b1b0cdeb --- /dev/null +++ b/inputmethod/canna-lib/PLIST @@ -0,0 +1,121 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2002/05/31 13:00:58 seb Exp $ +@cwd ${DICT_DIR} +@cwd ${DICT_DIR} +canna/default.cbp +canna/english.cbp +canna/jdaemon.cbp +canna/just.cbp +canna/kaisoku.cbp +canna/kana.cbp +canna/lan5.cbp +canna/matsu.cbp +canna/newjis.cbp +canna/romaji.cbp +canna/sokuon.cbp +canna/tut.cbp +canna/vje.cbp +canna/wx2+.cbp +@cwd ${PREFIX} +include/canna/RK.h +include/canna/jrkanji.h +include/canna/keydef.h +include/canna/mfdef.h +lib/libRKC.a +lib/libRKC.so +lib/libRKC.so.1 +lib/libRKC.so.1.0 +lib/libRKC16.a +lib/libRKC16.so +lib/libRKC16.so.1 +lib/libRKC16.so.1.0 +lib/libcanna.a +lib/libcanna.so +lib/libcanna.so.1 +lib/libcanna.so.1.0 +lib/libcanna16.a +lib/libcanna16.so +lib/libcanna16.so.1 +lib/libcanna16.so.1.0 +man/ja_JP.EUC/man3/RkCloseRoma.3 +man/ja_JP.EUC/man3/RkCvtEuc.3 +man/ja_JP.EUC/man3/RkCvtHan.3 +man/ja_JP.EUC/man3/RkCvtHira.3 +man/ja_JP.EUC/man3/RkCvtKana.3 +man/ja_JP.EUC/man3/RkCvtRoma.3 +man/ja_JP.EUC/man3/RkCvtZen.3 +man/ja_JP.EUC/man3/RkDefineDic.3 +man/ja_JP.EUC/man3/RkDeleteDic.3 +man/ja_JP.EUC/man3/RkEndBun.3 +man/ja_JP.EUC/man3/RkEnlarge.3 +man/ja_JP.EUC/man3/RkFinalize.3 +man/ja_JP.EUC/man3/RkGetDicList.3 +man/ja_JP.EUC/man3/RkGetKanji.3 +man/ja_JP.EUC/man3/RkGetLex.3 +man/ja_JP.EUC/man3/RkGetStat.3 +man/ja_JP.EUC/man3/RkGetYomi.3 +man/ja_JP.EUC/man3/RkGoto.3 +man/ja_JP.EUC/man3/RkInitialize.3 +man/ja_JP.EUC/man3/RkIntro.3 +man/ja_JP.EUC/man3/RkLeft.3 +man/ja_JP.EUC/man3/RkMapPhonogram.3 +man/ja_JP.EUC/man3/RkMapRoma.3 +man/ja_JP.EUC/man3/RkMountD.3 +man/ja_JP.EUC/man3/RkNext.3 +man/ja_JP.EUC/man3/RkNfer.3 +man/ja_JP.EUC/man3/RkOpenRoma.3 +man/ja_JP.EUC/man3/RkPrev.3 +man/ja_JP.EUC/man3/RkRemountDic.3 +man/ja_JP.EUC/man3/RkResize.3 +man/ja_JP.EUC/man3/RkRgnBun.3 +man/ja_JP.EUC/man3/RkRight.3 +man/ja_JP.EUC/man3/RkShorten.3 +man/ja_JP.EUC/man3/RkStoreYomi.3 +man/ja_JP.EUC/man3/RkUnmountDic.3 +man/ja_JP.EUC/man3/RkXfer.3 +man/ja_JP.EUC/man3/XKanjiControl.3 +man/ja_JP.EUC/man3/XLookupKanjiString.3 +man/ja_JP.EUC/man3/cannalib.3 +man/ja_JP.EUC/man3/jrKanjiControl.3 +man/ja_JP.EUC/man3/jrKanjiString.3 +man/ja_JP.EUC/man3/uilib.3 +share/canna/default.canna +share/canna/engine.cf +share/canna/sample/1.1.canna +share/canna/sample/1.2.canna +share/canna/sample/default.canna +share/canna/sample/fixer.canna +share/canna/sample/jdemon.canna +share/canna/sample/just.canna +share/canna/sample/lan5.canna +share/canna/sample/matsu.canna +share/canna/sample/modes.canna +share/canna/sample/sample.canna +share/canna/sample/skk.canna +share/canna/sample/src/Makefile +share/canna/sample/src/is.c +share/canna/sample/src/default.ctd +share/canna/sample/src/english.ctd +share/canna/sample/src/jdaemon.ctd +share/canna/sample/src/just.ctd +share/canna/sample/src/kaisoku.ctd +share/canna/sample/src/kana.ctd +share/canna/sample/src/lan5.ctd +share/canna/sample/src/matsu.ctd +share/canna/sample/src/newjis.ctd +share/canna/sample/src/romaji.ctd +share/canna/sample/src/sokuon.ctd +share/canna/sample/src/tut.ctd +share/canna/sample/src/vje.ctd +share/canna/sample/src/wx2+.ctd +share/canna/sample/tut.canna +share/canna/sample/unix.canna +share/canna/sample/vje.canna +share/canna/sample/wx2+.canna +@exec ln -s ${DICT_DIR}/canna ${PREFIX}/share/canna/dic +@exec ${CHOWN} ${CANNAOWNER}:${CANNAGROUP} ${DICT_DIR}/canna +@unexec ${RM} ${PREFIX}/share/canna/dic +@dirrm share/canna/sample/src +@dirrm share/canna/sample +@dirrm share/canna +@dirrm include/canna +@unexec ${RMDIR} ${DICT_DIR}/canna diff --git a/inputmethod/canna-lib/distinfo b/inputmethod/canna-lib/distinfo new file mode 100644 index 00000000000..134390099c8 --- /dev/null +++ b/inputmethod/canna-lib/distinfo @@ -0,0 +1,16 @@ +$NetBSD: distinfo,v 1.1.1.1 2002/05/31 13:00:58 seb Exp $ + +SHA1 (Canna35b2.tar.gz) = 66742205272cbc6bd91f272596381f761feac0a2 +Size (Canna35b2.tar.gz) = 1333329 bytes +SHA1 (Canna35b2-unoff1.patch.gz) = 19579591190f7ace7d3ec5f61a7d01ca3bc576c1 +Size (Canna35b2-unoff1.patch.gz) = 21443 bytes +SHA1 (Canna35b2-unoff2.patch.gz) = 16d578ed0558a632832194fffad8fcf24c9181fb +Size (Canna35b2-unoff2.patch.gz) = 11375 bytes +SHA1 (Canna35b2-hack1.patch.gz) = 24ab2baf104ef9748f92bd5315d4100a7ee961ab +Size (Canna35b2-hack1.patch.gz) = 8384 bytes +SHA1 (patch-aa) = d74119cb2c37a3db1c5d5417c1e35362b1eac655 +SHA1 (patch-ab) = 38f3ad4e022299a4dfd8d9391b1742b0d0f02a71 +SHA1 (patch-ac) = 8f910e59d71ef09434a40abde698d730ed7fc1c5 +SHA1 (patch-ad) = dd2eb94e75dc4789e298aa1601280d32fbe5ec96 +SHA1 (patch-ae) = e44c60ddf1e042ab5df1457b6723071c38baae02 +SHA1 (patch-af) = 2700fc8395895176c16562af66ea5bf0b13d4e10 diff --git a/inputmethod/canna-lib/files/LinkFileList.rules b/inputmethod/canna-lib/files/LinkFileList.rules new file mode 100644 index 00000000000..87ca9c2504e --- /dev/null +++ b/inputmethod/canna-lib/files/LinkFileList.rules @@ -0,0 +1,20 @@ +XCOMM $NetBSD: LinkFileList.rules,v 1.1.1.1 2002/05/31 13:00:58 seb Exp $ + +/* + * Old LinkFileList definition necessary to compile Canna on XFree86 4.2. + */ + +#ifdef LinkFileList +#undef LinkFileList +#endif + +/* + * LinkFileList - link a list of files from one place to another + */ +#ifndef LinkFileList +#define LinkFileList(step,list,dir,sub) @@\ +step:: list @@\ + @MakeFlagsToShellFlags(i,set +e); \ @@\ + echo " cd" dir; cd dir && \ @@\ + for i in list; do (set -x; RemoveFile($$i); $(LN) sub/$$i .); done +#endif diff --git a/inputmethod/canna-lib/files/canna b/inputmethod/canna-lib/files/canna new file mode 100644 index 00000000000..f317968f649 --- /dev/null +++ b/inputmethod/canna-lib/files/canna @@ -0,0 +1,25 @@ +#! /bin/sh +# +# $NetBSD: canna,v 1.1.1.1 2002/05/31 13:00:58 seb Exp $ +# +# PROVIDE: canna +# REQUIRE: DAEMON + +name="canna" +command_start="@PREFIX@/sbin/cannaserver" +pidfile="" + +cmd=${1:-start} + +case ${cmd} in +start) + if [ -x ${command_start} ]; then + echo "Starting ${name}." + ${command_start} >/dev/null 2>&1 + fi + ;; +*) + : + ;; +esac +exit 0 diff --git a/inputmethod/canna-lib/patches/patch-aa b/inputmethod/canna-lib/patches/patch-aa new file mode 100644 index 00000000000..c216c06668e --- /dev/null +++ b/inputmethod/canna-lib/patches/patch-aa @@ -0,0 +1,86 @@ +$NetBSD: patch-aa,v 1.1.1.1 2002/05/31 13:00:58 seb Exp $ + +--- Canna.conf- Fri Dec 1 00:31:14 2000 ++++ Canna.conf Fri Dec 1 00:31:36 2000 +@@ -130,10 +130,14 @@ + +-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 +- +-ErrDir = /usr/spool/canna ++cannaBinDir = ${PREFIX}/bin ++cannaSrvDir = ${PREFIX}/sbin ++cannaLibDir = ${PREFIX}/share/canna ++cannaManDir = ${PREFIX}/man/ja_JP.EUC ++cannaIncDir = ${PREFIX}/include/canna ++libCannaDir = ${PREFIX}/lib ++ ++ErrDir = ${CANNA_SPOOL} ++ ++/* INET6 related stuff */ ++INET6_DEFS = ${INET6} ++INET6_LIBS = #-L/usr/local/v6/lib -linet6 + +@@ -141,6 +145,6 @@ + Wlib = +-JapaneseLocale = japanese ++JapaneseLocale = ja_JP.eucJP + +-cannaOwner = bin +-cannaGroup = bin ++cannaOwner = ${CANNAOWNER} ++cannaGroup = ${CANNAGROUP} + +@@ -150,3 +154,3 @@ + +-cannaDsoRev = 1 ++cannaDsoRev = 1.0 + /* SunOS 4.x をお使いの方で shared object を利用する場合には +@@ -203,6 +207,5 @@ + */ +-/* #define UseInstalledLibCanna YES */ +-#define UseInstalledLibCanna NO ++#define UseInstalledLibCanna YES + +-DicDir = $(cannaLibDir)/dic ++DicDir = ${DICT_DIR}/canna + +@@ -241,14 +244,14 @@ + # endif +- CANNALIB = -L$(libCannaDir) -lcanna $(DLLIB) ++ CANNALIB = -Wl,-rpath,$(libCannaDir) -L$(libCannaDir) -lcanna $(DLLIB) + #else /* ! UseInstalledLibCanna */ + # if DoSharedLib +- DEPCANNALIB = $(CANNASRC)/libcanna.$(sharedLibExtension) ++ DEPCANNALIB = $(libCannaDir)/libcanna.$(sharedLibExtension) + # else + #ifdef __EMX__ +- DEPCANNALIB = $(CANNASRC)/canna.a ++ DEPCANNALIB = $(libCannaDir)/canna.a + #else +- DEPCANNALIB = $(CANNASRC)/libcanna.a ++ DEPCANNALIB = $(libCannaDir)/libcanna.a + #endif + # endif +- CANNALIB = -L$(CANNASRC) -lcanna $(DLLIB) ++ CANNALIB = -Wl,-rpath,$(libCannaDir) -L$(libCannaDir) -lcanna $(DLLIB) + #endif /* UseInstalledLibCanna */ +@@ -261,10 +264,10 @@ + # endif +- CANNALIB16 = -L$(libCannaDir) -lcanna16 $(DLLIB) ++ CANNALIB16 = -Wl,-rpath,$(libCannaDir) -L$(libCannaDir) -lcanna16 $(DLLIB) + #else /* ! UseInstalledLibCanna */ + # if DoSharedLib +- DEPCANNALIB16 = $(CANNASRC)/libcanna16.$(sharedLibExtension) ++ DEPCANNALIB16 = $(libCannaDir)/libcanna16.$(sharedLibExtension) + # else +- DEPCANNALIB16 = $(CANNASRC)/libcanna16.a ++ DEPCANNALIB16 = $(libCannaDir)/libcanna16.a + # endif +- CANNALIB16 = -L$(CANNASRC) -lcanna16 $(DLLIB) ++ CANNALIB16 = -Wl,-rpath,$(libCannaDir) -L$(libCannaDir) -lcanna16 $(DLLIB) + #endif /* UseInstalledLibCanna */ diff --git a/inputmethod/canna-lib/patches/patch-ab b/inputmethod/canna-lib/patches/patch-ab new file mode 100644 index 00000000000..70ba6166530 --- /dev/null +++ b/inputmethod/canna-lib/patches/patch-ab @@ -0,0 +1,18 @@ +$NetBSD: patch-ab,v 1.1.1.1 2002/05/31 13:00:58 seb Exp $ + +--- ./Imakefile.orig Wed Nov 27 16:01:34 1996 ++++ ./Imakefile Fri Jul 30 19:17:44 1999 +@@ -61,5 +61,5 @@ + do \ + (cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \ +- $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install); \ ++ $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install install.man); \ + done + +@@ -69,5 +69,5 @@ + do \ + (cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \ +- $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install); \ ++ $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install install.man); \ + done + diff --git a/inputmethod/canna-lib/patches/patch-ac b/inputmethod/canna-lib/patches/patch-ac new file mode 100644 index 00000000000..817c5ed7980 --- /dev/null +++ b/inputmethod/canna-lib/patches/patch-ac @@ -0,0 +1,13 @@ +$NetBSD: patch-ac,v 1.1.1.1 2002/05/31 13:00:58 seb Exp $ + +--- dic/phono/Imakefile.orig Wed Nov 27 16:15:14 1996 ++++ dic/phono/Imakefile Fri Jul 30 19:57:02 1999 +@@ -27,7 +27,7 @@ + + ROMAJI_DIC_DEF = -DSHIFT + +- DICDIR = $(cannaLibDir)/dic ++ DICDIR = $(DicDir) + SAMPLEDIR = $(cannaLibDir)/sample + SAMPLESRCDIR = $(cannaLibDir)/sample/src + diff --git a/inputmethod/canna-lib/patches/patch-ad b/inputmethod/canna-lib/patches/patch-ad new file mode 100644 index 00000000000..136d833a1ab --- /dev/null +++ b/inputmethod/canna-lib/patches/patch-ad @@ -0,0 +1,23 @@ +$NetBSD: patch-ad,v 1.1.1.1 2002/05/31 13:00:58 seb Exp $ +--- server/misc.c~ Fri Jul 29 12:03:54 1994 ++++ server/misc.c Fri Jun 30 10:16:39 2000 +@@ -788,12 +788,19 @@ + + if (client->username && client->username[0]) { + if (client->groupname && client->groupname[0]) { ++ if (strlen(DDUSER) + strlen(client->username) + ++ strlen(DDGROUP) + strlen(client->groupname) + ++ strlen(DDPATH) + 4 >= 256) ++ return ( -1 ); + sprintf(dichome, "%s/%s:%s/%s:%s", + DDUSER, client->username, + DDGROUP, client->groupname, + DDPATH); + } + else { ++ if (strlen(DDUSER) + strlen(client->username) + ++ strlen(DDPATH) + 2 >= 256) ++ return ( -1 ); + sprintf(dichome, "%s/%s:%s", + DDUSER, client->username, + DDPATH); diff --git a/inputmethod/canna-lib/patches/patch-ae b/inputmethod/canna-lib/patches/patch-ae new file mode 100644 index 00000000000..e787d4ad509 --- /dev/null +++ b/inputmethod/canna-lib/patches/patch-ae @@ -0,0 +1,234 @@ +$NetBSD: patch-ae,v 1.1.1.1 2002/05/31 13:00:58 seb Exp $ + +PATCH_SITES+= http://apps.v6.linux.or.jp/pub/Linux/IPv6-2/canna/ +PATCHFILES+= Canna35b2-v6-20000602.diff.gz +PATCH_DIST_STRIP= -p1 +(copied here for as the above patch does not apply cleanly + +diff -ru lib/RKC/Imakefile lib/RKC/Imakefile +--- lib/RKC/Imakefile Tue Oct 22 21:26:34 1996 ++++ lib/RKC/Imakefile Fri Jun 2 15:11:31 2000 +@@ -11,7 +11,7 @@ + LINTLIBS = ../RK/llib-lRK.ln + INCLUDES = -I$(CANNAROOT)/include + +- DEFINES = $(SIGNAL_DEFINES) $(RKC_DEFINES) $(ENGINE_DEFS) ++ DEFINES = $(SIGNAL_DEFINES) $(RKC_DEFINES) $(ENGINE_DEFS) $(INET6_DEFS) + + HEADER = rkc.h rkcw.h + OBJS = rkc.o convert.o wconvert.o wutil.o +diff -ru lib/RKC/wconvert.c lib/RKC/wconvert.c +--- lib/RKC/wconvert.c Wed Nov 27 16:22:30 1996 ++++ lib/RKC/wconvert.c Fri Jun 2 15:01:34 2000 +@@ -368,13 +368,46 @@ + int number ; + char *hostname ; + { ++#ifdef INET6 ++ struct addrinfo hints, *res0, *res; ++ struct servent *sp ; ++ char servbuf[NI_MAXSERV]; ++#else + struct sockaddr_in inaddr; /* INET socket address. */ + unsigned long hostinetaddr; /* result of inet_addr of arpa addr */ + struct hostent *host_ptr, workhostbuf ; + struct servent *sp ; + int addrlen ; + char *h_addr_ptr; ++#endif + ++#ifdef INET6 ++ sp = getservbyname( IR_SERVICE_NAME, "tcp"); ++ sprintf(servbuf, "%u", (sp ? ntohs(sp->s_port) : IR_DEFAULT_PORT) + number); ++ memset( &hints, 0, sizeof( hints ) ); ++ hints.ai_family = PF_UNSPEC; ++ hints.ai_socktype = SOCK_STREAM; ++ if ( getaddrinfo( hostname, servbuf, &hints, &res0 ) ){ ++ errno = EINVAL; ++ return( -1 ); ++ } ++ for( res = res0 ; res ; res = res->ai_next ){ ++ if( res->ai_family != PF_INET && res->ai_family != PF_INET6 ) ++ continue; ++ if( (ServerFD = socket( res->ai_family, res->ai_socktype, res->ai_protocol )) < 0 ) ++ continue; ++ errno = 0; ++ if( connect( ServerFD, res->ai_addr, res->ai_addrlen ) ){ ++#ifdef nodef ++ perror("connect"); ++#endif ++ close( ServerFD ) ; ++ ServerFD = -1; ++ continue; ++ } ++ } ++ freeaddrinfo( res0 ); ++#else /* INET6 / !INET6 */ + /* インターネットドメインで接続する。 */ + if( (host_ptr = gethostbyname( hostname ) ) + == (struct hostent *)NULL) { +@@ -423,8 +456,10 @@ + perror("connect") ; + #endif + close( ServerFD ) ; ++ ServerFD = -1; + return( -1 ) ; + } ++#endif /* !INET6 */ + return( ServerFD ) ; + } + #endif +diff -ru server/Imakefile server/Imakefile +--- server/Imakefile Wed Nov 27 16:25:24 1996 ++++ server/Imakefile Fri Jun 2 14:52:47 2000 +@@ -5,12 +5,12 @@ + INSTUGIDFLAGS = -m 6555 $(cannaOwnerGroup) + #ifdef __EMX__ + INSTFLAGS = $(INSTUGIDFLAGS) +- LOCAL_LIBRARIES = $(CANNAROOT)/lib/RK/RK.a ++ LOCAL_LIBRARIES = $(CANNAROOT)/lib/RK/RK.a $(INET6_LIBS) + #else + INSTFLAGS = -s $(INSTUGIDFLAGS) +- LOCAL_LIBRARIES = $(CANNAROOT)/lib/RK/libRK.a ++ LOCAL_LIBRARIES = $(CANNAROOT)/lib/RK/libRK.a $(INET6_LIBS) + #endif +- DEFINES = $(CANNASERVER_DEFINES) ++ DEFINES = $(CANNASERVER_DEFINES) $(INET6_DEFS) + INCLUDES = -I$(CANNAROOT)/include + + IRSRCS = $(SRCS) $(HEADER) +diff -ru server/connection.c server/connection.c +--- server/connection.c Wed Nov 27 16:26:10 1996 ++++ server/connection.c Fri Dec 1 11:52:10 2000 +@@ -133,2 +133,63 @@ + #ifdef USE_INET_SOCKET /* INETドメインの作成 */ ++#ifdef INET6 ++static int open_inet6_socket () ++{ ++ extern int PortNumberPlus; ++ struct sockaddr_in6 in6sock; ++ struct servent *sp; ++ int retry, request; ++ ++ /* /etc/servicesからポート番号を取得する */ ++ if( (sp = getservbyname(IR_SERVICE_NAME ,"tcp")) == NULL ) ++ { ++ ir_debug( Dmsg(5,"Warning: Port number not find on '/etc/services'.\n");) ++ ir_debug( Dmsg(5," Use %d as default.\n", IR_DEFAULT_PORT);) ++ } ++ ++ if ((request = socket (AF_INET6, SOCK_STREAM, 0)) < 0) ++ { ++ ir_debug( Dmsg(5,"Warning: INET socket for server failed.\n");) ++ } ++ else ++ { ++#ifdef SO_REUSEADDR ++ { ++ int one = 1; ++ setsockopt(request, SOL_SOCKET, SO_REUSEADDR, ++ (char *)&one, sizeof(int)); ++ } ++#endif ++ bzero ((char *)&in6sock, sizeof (in6sock)); ++ in6sock.sin6_family = AF_INET6; ++ in6sock.sin6_port = ++ (sp ? ntohs(sp->s_port) : IR_DEFAULT_PORT) + PortNumberPlus; ++ ++ ir_debug( Dmsg(5, "ポート番号:[%d]\n",htons(in6sock.sin6_port));) ++ ++ in6sock.sin6_port = htons(in6sock.sin6_port); ++ in6sock.sin6_addr = in6addr_any; ++ ++ retry = 0; ++ while ( bind(request, (struct sockaddr *)&in6sock, sizeof(in6sock)) < 0 ) ++ { ++ ir_debug( Dmsg(5, "bind トライ回数[%d]\n",retry);) ++ if (++retry == 5){ ++ ir_debug( Dmsg(5,"Warning: Server could not bind.\n");) ++ close(request); ++ request = -1; /* bind 失敗 */ ++ break; ++ } ++ sleep (1); ++ } ++ if( retry != 5 ) { ++ if (listen (request, 5)){ ++ ir_debug( Dmsg(5,"Warning: Server could not listen.\n");) ++ close(request); ++ request = -1; /* listen 失敗 */ ++ } ++ } ++ } ++ return request; ++} ++#endif + static int open_inet_socket () +@@ -200,2 +261,5 @@ + int request; ++#if defined(USE_INET_SOCKET) && defined(INET6) ++ int inet6_ok = 0; ++#endif + +@@ -222,2 +286,14 @@ + #ifdef USE_INET_SOCKET /* INETドメイン */ ++#ifdef INET6 ++ if ((request = open_inet6_socket ()) != -1) ++ { ++ inet6_ok++; ++ WellKnownConnections |= (1L << request); ++ ir_debug( Dmsg(3,"INET6 domain socket is created\n"); ) ++ } ++ else ++ { ++ ir_debug( Dmsg(5,"Warning: INET6 domain not created.\n");) ++ } ++#endif + if ((request = open_inet_socket ()) != -1) +@@ -229,3 +305,9 @@ + ir_debug( Dmsg(5,"Warning: INET domain not created.\n");) ++#ifdef INET6 ++ if ( !inet6_ok ){ ++ return 0; /* 作成に失敗 */ ++ } ++#else + return 0; /* 作成に失敗 */ ++#endif + } +@@ -609,6 +691,11 @@ + { ++#ifdef INET6 ++ struct sockaddr_storage from; ++#else + struct sockaddr_in from; + struct hostent *hp; +- char buf[MAXDATA], *inet_ntoa(); +- int fromlen = sizeof( struct sockaddr_in ) ; ++ char *inet_ntoa(); ++#endif ++ char buf[MAXDATA]; ++ int fromlen = sizeof(from); + +@@ -622,2 +709,15 @@ + ++#ifdef INET6 ++#ifdef AF_UNIX ++ if (from.ss_family != AF_UNIX) ++#else ++ if (from.ss_family != AF_LOCAL) ++#endif ++ { ++ if (getnameinfo((struct sockaddr *)&from, fromlen, buf, sizeof(buf), ++ NULL, 0, 0) != 0) { ++ strcpy(buf, "invalid"); ++ } ++ } ++#else + if( from.sin_family == AF_INET ) { +@@ -630,3 +730,5 @@ + strncpy( buf, inet_ntoa( from.sin_addr ), MAXDATA-1 ) ; +- } else { ++ } ++#endif ++ else { + client->hostaddr = IR_UNIX_ADDRESS; diff --git a/inputmethod/canna-lib/patches/patch-af b/inputmethod/canna-lib/patches/patch-af new file mode 100644 index 00000000000..c2b81ddab6e --- /dev/null +++ b/inputmethod/canna-lib/patches/patch-af @@ -0,0 +1,13 @@ +$NetBSD: patch-af,v 1.1.1.1 2002/05/31 13:00:58 seb Exp $ + +--- lib/RKC/convert.c.orig Wed May 22 22:02:57 1996 ++++ lib/RKC/convert.c +@@ -32,7 +32,7 @@ + #ifndef WIN + #include "sglobal.h" + #endif +-#include "IRproto.h" ++#include "../server/IRproto.h" + + #include <errno.h> + #include <sys/types.h> |