diff options
-rw-r--r-- | japanese/canna-lib/Makefile | 11 | ||||
-rw-r--r-- | japanese/canna-lib/files/md5 | 3 | ||||
-rw-r--r-- | japanese/canna-lib/files/patch-sum | 5 | ||||
-rw-r--r-- | japanese/canna-lib/patches/patch-aa | 37 | ||||
-rw-r--r-- | japanese/canna-lib/patches/patch-ae | 210 | ||||
-rw-r--r-- | japanese/canna-server/Makefile | 9 |
6 files changed, 248 insertions, 27 deletions
diff --git a/japanese/canna-lib/Makefile b/japanese/canna-lib/Makefile index cc30a83bb82..da399c6327b 100644 --- a/japanese/canna-lib/Makefile +++ b/japanese/canna-lib/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2000/08/26 17:18:22 sakamoto Exp $ +# $NetBSD: Makefile,v 1.5 2000/11/30 15:48:09 itojun Exp $ # DISTNAME= Canna35b2 @@ -16,12 +16,19 @@ HOMEPAGE= http://www.nec.co.jp/japanese/product/computer/soft/canna/ INSTALL_TARGET= install install.man +BUILD_DEFS+= USE_INET6 + .include "../../mk/bsd.prefs.mk" +.if ${USE_INET6} == "YES" +INET6= -DINET6 +.else +INET6= # empty +.endif CANNAOWNER?= daemon CANNAGROUP?= daemon DICT_DIR?= /var/dict MAKE_ENV+= CANNAOWNER=${CANNAOWNER} CANNAGROUP=${CANNAGROUP} \ - DICT_DIR=${DICT_DIR} + DICT_DIR=${DICT_DIR} INET6=${INET6} PLIST_SUBST= CANNAOWNER=${CANNAOWNER} \ CANNAGROUP=${CANNAGROUP} \ DICT_DIR=${DICT_DIR} \ diff --git a/japanese/canna-lib/files/md5 b/japanese/canna-lib/files/md5 index 6bcb082793c..d5853dbbeb3 100644 --- a/japanese/canna-lib/files/md5 +++ b/japanese/canna-lib/files/md5 @@ -1,6 +1,7 @@ -$NetBSD: md5,v 1.1.1.1 1999/08/02 04:37:09 sakamoto Exp $ +$NetBSD: md5,v 1.2 2000/11/30 15:48:09 itojun Exp $ MD5 (Canna35b2.tar.gz) = 09ae4dd3a5d33168ba17470ad9242cf3 MD5 (Canna35b2-unoff1.patch.gz) = 88de4ac6a46697e4f664f1a362ecd1d2 MD5 (Canna35b2-unoff2.patch.gz) = 7253b322dd6224376e03a95bec8a1c8f MD5 (Canna35b2-hack1.patch.gz) = a3969af8317798d1b586f7a68089ff4a +MD5 (Canna35b2-v6-20000602.diff.gz) = d4a22262e8d4cb335def8fe0b2cb6583 diff --git a/japanese/canna-lib/files/patch-sum b/japanese/canna-lib/files/patch-sum index 19faafb537d..defed1518c6 100644 --- a/japanese/canna-lib/files/patch-sum +++ b/japanese/canna-lib/files/patch-sum @@ -1,6 +1,7 @@ -$NetBSD: patch-sum,v 1.5 2000/07/15 11:57:06 itojun Exp $ +$NetBSD: patch-sum,v 1.6 2000/11/30 15:48:10 itojun Exp $ -MD5 (patch-aa) = aca638a5b0fa561dcacb27590ff9a70a +MD5 (patch-aa) = 657ef6604d96c24496e3d31de35aeff7 MD5 (patch-ab) = 9c308687cdc856ed489713dc2e929014 MD5 (patch-ac) = a1fd7fea8cc51e12336ab061a6e2a838 MD5 (patch-ad) = 9e09b258b32de008104a6654f6197f5d +MD5 (patch-ae) = ed5b1526b8c0b5b4f9ab9518d7e0aed8 diff --git a/japanese/canna-lib/patches/patch-aa b/japanese/canna-lib/patches/patch-aa index 1ef02c255a6..bde4505b64a 100644 --- a/japanese/canna-lib/patches/patch-aa +++ b/japanese/canna-lib/patches/patch-aa @@ -1,9 +1,8 @@ -$NetBSD: patch-aa,v 1.3 1999/12/08 08:24:44 rh Exp $ +$NetBSD: patch-aa,v 1.4 2000/11/30 15:48:10 itojun Exp $ ---- Canna.conf.orig Thu Nov 28 11:27:01 1996 -+++ Canna.conf Wed Dec 8 09:21:56 1999 -@@ -129,19 +129,19 @@ - */ +--- 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 @@ -11,17 +10,22 @@ $NetBSD: patch-aa,v 1.3 1999/12/08 08:24:44 rh Exp $ -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 = /usr/spool/canna ++ +ErrDir = ${CANNA_SPOOL} ++ ++/* INET6 related stuff */ ++INET6_DEFS = ${INET6} ++INET6_LIBS = #-L/usr/local/v6/lib -linet6 - wcharDefinition = -DCANNA_WCHAR +@@ -141,6 +145,6 @@ Wlib = -JapaneseLocale = japanese +JapaneseLocale = ja_JP.eucJP @@ -31,16 +35,12 @@ $NetBSD: patch-aa,v 1.3 1999/12/08 08:24:44 rh Exp $ +cannaOwner = ${CANNAOWNER} +cannaGroup = ${CANNAGROUP} - cannaOwnerGroup = -o $(cannaOwner) -g $(cannaGroup) -@@ -149,5 +149,5 @@ - pointerIntegerDef = +@@ -150,3 +154,3 @@ -cannaDsoRev = 1 +cannaDsoRev = 1.0 /* SunOS 4.x をお使いの方で shared object を利用する場合には - cannaDsoRev = 1.1 -@@ -202,8 +202,7 @@ - * コマンド類をリンクする時は、次を YES にしてくだい。 +@@ -203,6 +207,5 @@ */ -/* #define UseInstalledLibCanna YES */ -#define UseInstalledLibCanna NO @@ -49,9 +49,7 @@ $NetBSD: patch-aa,v 1.3 1999/12/08 08:24:44 rh Exp $ -DicDir = $(cannaLibDir)/dic +DicDir = ${DICT_DIR}/canna - #ifdef NeXT -@@ -240,16 +239,16 @@ - #endif +@@ -241,14 +244,14 @@ # endif - CANNALIB = -L$(libCannaDir) -lcanna $(DLLIB) + CANNALIB = -Wl,-rpath,$(libCannaDir) -L$(libCannaDir) -lcanna $(DLLIB) @@ -71,9 +69,7 @@ $NetBSD: patch-aa,v 1.3 1999/12/08 08:24:44 rh Exp $ - CANNALIB = -L$(CANNASRC) -lcanna $(DLLIB) + CANNALIB = -Wl,-rpath,$(libCannaDir) -L$(libCannaDir) -lcanna $(DLLIB) #endif /* UseInstalledLibCanna */ - -@@ -260,12 +259,12 @@ - DEPCANNALIB16 = $(libCannaDir)/libcanna16.a +@@ -261,10 +264,10 @@ # endif - CANNALIB16 = -L$(libCannaDir) -lcanna16 $(DLLIB) + CANNALIB16 = -Wl,-rpath,$(libCannaDir) -L$(libCannaDir) -lcanna16 $(DLLIB) @@ -88,4 +84,3 @@ $NetBSD: patch-aa,v 1.3 1999/12/08 08:24:44 rh Exp $ - CANNALIB16 = -L$(CANNASRC) -lcanna16 $(DLLIB) + CANNALIB16 = -Wl,-rpath,$(libCannaDir) -L$(libCannaDir) -lcanna16 $(DLLIB) #endif /* UseInstalledLibCanna */ - diff --git a/japanese/canna-lib/patches/patch-ae b/japanese/canna-lib/patches/patch-ae new file mode 100644 index 00000000000..ad5867cc3a3 --- /dev/null +++ b/japanese/canna-lib/patches/patch-ae @@ -0,0 +1,210 @@ +$NetBSD: patch-ae,v 1.1 2000/11/30 15:48:10 itojun 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 Jun 2 14:22:13 2000 +@@ -131,6 +131,67 @@ + #endif /* use_unix_socket */ + + #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 () + { + +@@ -198,6 +259,9 @@ + CreateWellKnownSockets() + { + int request; ++#if defined(USE_INET_SOCKET) && defined(INET6) ++ int inet6_ok = 0; ++#endif + + CLEARBITS(AllSockets); + CLEARBITS(AllClients); +@@ -220,6 +284,18 @@ + #endif /* use_unix_socket */ + + #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) + { + WellKnownConnections |= (1L << request); +@@ -227,7 +303,9 @@ + else + { + ir_debug( Dmsg(5,"Warning: INET domain not created.\n");) +- return 0; /* 作成に失敗 */ ++ if ( !inet6_ok ){ ++ return 0; /* 作成に失敗 */ ++ } + } + + ir_debug( Dmsg(3,"INETドメインはできた\n"); ) diff --git a/japanese/canna-server/Makefile b/japanese/canna-server/Makefile index 38582b179bd..ccde7aeb80c 100644 --- a/japanese/canna-server/Makefile +++ b/japanese/canna-server/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 1999/09/08 09:29:46 sakamoto Exp $ +# $NetBSD: Makefile,v 1.5 2000/11/30 15:48:10 itojun Exp $ DISTNAME= Canna35b2 PKGNAME= Canna-server-3.5b2 @@ -19,7 +19,14 @@ MASTERDIR= ${.CURDIR}/../../japanese/canna-lib FILESDIR= ${MASTERDIR}/files PATCHDIR= ${MASTERDIR}/patches +BUILD_DEFS+= USE_INET6 + .include "../../mk/bsd.prefs.mk" +.if ${USE_INET6} == "YES" +INET6= -DINET6 +.else +INET6= # empty +.endif CANNAOWNER?= daemon CANNAGROUP?= daemon CANNA_SPOOL= /var/spool/canna |