diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2008-10-26 19:35:08 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2008-10-26 19:35:08 +0000 |
commit | a8dc9708f71921040dac794d2959276c0c1c6c33 (patch) | |
tree | 20e028b6328a8660706b722f2c2c60efad8b43e7 /japanese/sj3-server | |
parent | 1f2d6cc5f1dac46898e753d0df4e312c19ad9ea4 (diff) | |
download | ports-a8dc9708f71921040dac794d2959276c0c1c6c33.tar.gz ports-a8dc9708f71921040dac794d2959276c0c1c6c33.zip |
Notes
Diffstat (limited to 'japanese/sj3-server')
-rw-r--r-- | japanese/sj3-server/Makefile | 44 | ||||
-rw-r--r-- | japanese/sj3-server/files/patch-sj3.tmpl | 25 | ||||
-rw-r--r-- | japanese/sj3-server/files/post-patch-Imakefile | 14 | ||||
-rw-r--r-- | japanese/sj3-server/files/post-patch-doc-doc-Imakefile.nodocports | 8 | ||||
-rw-r--r-- | japanese/sj3-server/files/post-patch-include-Const.h | 10 | ||||
-rw-r--r-- | japanese/sj3-server/files/post-patch-server-comuni.c | 21 | ||||
-rw-r--r-- | japanese/sj3-server/files/post-patch-server-serverrc | 39 | ||||
-rw-r--r-- | japanese/sj3-server/files/post-patch-server-setup.c | 27 | ||||
-rw-r--r-- | japanese/sj3-server/files/post-patch-server-sj3serv.h | 10 | ||||
-rw-r--r-- | japanese/sj3-server/files/post-patch-sj3lib-Imakefile | 10 | ||||
-rw-r--r-- | japanese/sj3-server/files/sj3.sh.in | 7 | ||||
-rw-r--r-- | japanese/sj3-server/files/sj3_freebsd.tmpl.in | 5 | ||||
-rw-r--r-- | japanese/sj3-server/pkg-descr | 23 | ||||
-rw-r--r-- | japanese/sj3-server/pkg-install | 3 | ||||
-rw-r--r-- | japanese/sj3-server/pkg-plist | 7 |
15 files changed, 194 insertions, 59 deletions
diff --git a/japanese/sj3-server/Makefile b/japanese/sj3-server/Makefile index c14870168960..6a5707f46513 100644 --- a/japanese/sj3-server/Makefile +++ b/japanese/sj3-server/Makefile @@ -1,4 +1,4 @@ -# New ports collection makefile for: SJ3 +# New ports collection makefile for: sj3-server # Date created: 18 Aug 1998 # Whom: Hidekazu Kuroki <hidekazu@cs.titech.ac.jp> # @@ -7,42 +7,52 @@ PORTNAME= sj3 PORTVERSION= 2.0.1.20 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= japanese -MASTER_SITES= ftp://ftp.sony.co.jp/pub/unsupported/src/ \ - ftp://ftp.cs.titech.ac.jp/pub/japanese/sj3/ -MASTER_SITES+= ${MASTER_SITE_LOCAL} -MASTER_SITE_SUBDIR= nork +MASTER_SITES= LOCAL/nork +PKGNAMESUFFIX= -server PATCH_SITES= http://quasiquote.org/files/ PATCHFILES= ${PORTNAME}-qq-2.0.1.21.diff.gz PATCH_DIST_STRIP= -p1 -MAINTAINER= hiroo+freebsd@oikumene.gcd.org -COMMENT= A Japanese input method +LIB_DEPENDS= sj3lib.1:${PORTSDIR}/japanese/sj3-lib + +MAINTAINER= hrs@FreeBSD.org +COMMENT= A Japanese input method, binary part USE_RC_SUBR= sj3.sh USE_IMAKE= yes +SUB_FILES= sj3_freebsd.tmpl +SUB_LIST= DESTDIR=${DESTDIR} MAN1= sj3.1 sj3dic.1 sj3mkdic.1 sj3serv.1 MANLANG= ja MANCOMPRESSED= no PORTDOCS= Nihongo.ps.Z hinsi.ms makedict.ms sj3lib.ms sj3serv.ms -# NOTE : You must not use 'xmkmf -a', because the running 'make depend' caused a error. +POSTPATCHES= ${FILESDIR}/post-patch-Imakefile \ + ${FILESDIR}/post-patch-sj3lib-Imakefile \ + ${FILESDIR}/post-patch-include-Const.h \ + ${FILESDIR}/post-patch-server-setup.c \ + ${FILESDIR}/post-patch-server-serverrc \ + ${FILESDIR}/post-patch-server-sj3serv.h \ + ${FILESDIR}/post-patch-server-comuni.c +POSTPATCHES.nodocports= \ + ${FILESDIR}/post-patch-doc-doc-Imakefile.nodocports .include <bsd.port.pre.mk> -pre-configure: - ${REINPLACE_CMD} -e "\#^SJ3TOP#s#=.*#= ${PREFIX}#" \ - -e "\#^SJ3DICTDIR#s#=.*#= \\$$\(SJ3LIBDIR)/sj3/dict#" \ - -e "\#^SJ3VARRUNDIR#s#=.*#= ${DESTDIR}\\$$\(VARDIR)/run/sj3#" \ - ${WRKSRC}/sj3.tmpl +post-patch: + cd ${WRKSRC} && ${CAT} ${POSTPATCHES} | ${PATCH} +.if defined(NODOCPORTS) + cd ${WRKSRC} && ${CAT} ${POSTPATCHES.nodocports} | ${PATCH} +.endif -do-configure: - ( cd $(WRKSRC) ; ${XMKMF} ; make Makefiles ) +pre-configure: apply-slist + ${INSTALL_DATA} ${WRKDIR}/sj3_freebsd.tmpl ${WRKSRC}/sj3_freebsd.tmpl -pre-install: +pre-su-install: @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL .include <bsd.port.post.mk> diff --git a/japanese/sj3-server/files/patch-sj3.tmpl b/japanese/sj3-server/files/patch-sj3.tmpl index e9e027128774..f88cb6988b3b 100644 --- a/japanese/sj3-server/files/patch-sj3.tmpl +++ b/japanese/sj3-server/files/patch-sj3.tmpl @@ -1,21 +1,12 @@ ---- ./sj3.tmpl.orig Sat Jun 9 23:22:10 2007 -+++ ./sj3.tmpl Sat Jun 9 23:22:45 2007 -@@ -56,18 +56,6 @@ +--- sj3.tmpl.orig 2008-09-07 16:44:07.000000000 +0900 ++++ sj3.tmpl 2008-09-07 16:47:04.000000000 +0900 +@@ -64,8 +64,7 @@ + */ + #if defined(FreeBSDArchitecture) - #define Sj3LibRev 1.21 - --/* -- * Change for FreeBSD. -- * Because When the LANG variable is EUC, setlocale function in library libc -- * return NULL, use it in library libxpg4 -- * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp) 1996/8/10 -- */ --#if defined(FreeBSDArchitecture) -- -CODE_LIBS = -lxpg4 - --#endif -- ++#include "sj3_freebsd.tmpl" + #endif + #if SystemV4 || SystemV - USETLI = -DTLI - #else diff --git a/japanese/sj3-server/files/post-patch-Imakefile b/japanese/sj3-server/files/post-patch-Imakefile new file mode 100644 index 000000000000..cc3514f08e89 --- /dev/null +++ b/japanese/sj3-server/files/post-patch-Imakefile @@ -0,0 +1,14 @@ +--- Imakefile.orig 2008-09-07 16:30:58.000000000 +0900 ++++ Imakefile 2008-09-07 16:34:36.000000000 +0900 +@@ -62,11 +62,6 @@ + echo "#define DEFKEYFILE \"$(SJ3CONFDIR)/cvtkey.\"") \ @@\ + >> include/Paths.h + +-install:: +- $(MKDIRHIER) $(SJ3VARRUNDIR) +- chown $(SJ3OWNER) $(SJ3VARRUNDIR) +- chgrp $(SJ3GROUP) $(SJ3VARRUNDIR) +- + clean:: + rm -f include/Paths.h + diff --git a/japanese/sj3-server/files/post-patch-doc-doc-Imakefile.nodocports b/japanese/sj3-server/files/post-patch-doc-doc-Imakefile.nodocports new file mode 100644 index 000000000000..bf1fe95a9ea5 --- /dev/null +++ b/japanese/sj3-server/files/post-patch-doc-doc-Imakefile.nodocports @@ -0,0 +1,8 @@ +--- doc/doc/Imakefile.orig 2008-09-07 17:04:18.000000000 +0900 ++++ doc/doc/Imakefile 2008-09-07 17:04:24.000000000 +0900 +@@ -45,5 +45,3 @@ + all:: + + depend:: +- +-InstallMultiple($(DOCLIST),$(SJ3DOCDIR)) diff --git a/japanese/sj3-server/files/post-patch-include-Const.h b/japanese/sj3-server/files/post-patch-include-Const.h new file mode 100644 index 000000000000..bbd801ab50c7 --- /dev/null +++ b/japanese/sj3-server/files/post-patch-include-Const.h @@ -0,0 +1,10 @@ +--- include/Const.h.orig 2008-10-26 23:35:29.000000000 +0900 ++++ include/Const.h 2008-10-26 23:35:44.000000000 +0900 +@@ -68,6 +68,7 @@ + #define MaxClientNum 512 + #define LogOutFile NULL + #define PortName "sj3" ++#define ServerName "localhost" + #ifdef TLI + #define LocalHost "localhost" + #define ProtoName "tcp" diff --git a/japanese/sj3-server/files/post-patch-server-comuni.c b/japanese/sj3-server/files/post-patch-server-comuni.c new file mode 100644 index 000000000000..19eb8747c378 --- /dev/null +++ b/japanese/sj3-server/files/post-patch-server-comuni.c @@ -0,0 +1,21 @@ +--- server/comuni.c.orig 2008-10-27 00:11:36.000000000 +0900 ++++ server/comuni.c 2008-10-27 00:14:22.000000000 +0900 +@@ -338,8 +338,16 @@ + memset((char *)&sin, '\0', sizeof(sin)); + sin.sin_family = AF_INET; + sin.sin_port = htons(port); +- sin.sin_addr.s_addr = htonl(INADDR_ANY); +- ++ if (!inet_aton(server_name, &sin.sin_addr)) { ++ struct hostent *hp; ++ struct in_addr **pptr; ++ if ((hp = gethostbyname(server_name)) == NULL) { ++ fprintf(stderr, "Can't resolve %s\n", server_name); ++ exit(1); ++ } ++ pptr = (struct in_addr **)hp->h_addr_list; ++ memcpy(&sin.sin_addr, pptr[0], sizeof(struct in_addr)); ++ } + if ((fd_inet = socket(AF_INET, SOCK_STREAM, 0)) == ERROR) { + fprintf(stderr, "Can't create AF_INET socket\n"); + exit(1); diff --git a/japanese/sj3-server/files/post-patch-server-serverrc b/japanese/sj3-server/files/post-patch-server-serverrc new file mode 100644 index 000000000000..785334366c7b --- /dev/null +++ b/japanese/sj3-server/files/post-patch-server-serverrc @@ -0,0 +1,39 @@ +--- server/serverrc.orig 2008-10-27 00:08:48.000000000 +0900 ++++ server/serverrc 2008-10-27 00:10:49.000000000 +0900 +@@ -75,24 +75,29 @@ + ## + #forkflag off + ++## servername: ++## listen address ++## Default: localhost ++#servername localhost ++ + ## + ## portname: +-## binding address +-## Default: localhost ++## binding port in name ++## Default: defined PortName in "include/Const.h" + ## +-#portname 0.0.0.0 ++#portname sj3 + + ## + ## portnumber: +-## binding portnumber +-## Default: defined PortNumber at "include/Const.h" ++## binding port in number used when portname is not valid ++## Default: defined PortNumber in "include/Const.h" + ## +-#portnumber 3000 ++#portnumber 3086 + + ## + ## socketname: + ## binding filename of unix domain socket +-## Default: defined SocketName at "include/Paths.h" ++## Default: defined SocketName in "include/Paths.h" + ## + #socketname /var/run/sj3/socket + diff --git a/japanese/sj3-server/files/post-patch-server-setup.c b/japanese/sj3-server/files/post-patch-server-setup.c new file mode 100644 index 000000000000..d48d2ff317bd --- /dev/null +++ b/japanese/sj3-server/files/post-patch-server-setup.c @@ -0,0 +1,27 @@ +--- server/setup.c.orig 2008-10-26 23:37:54.000000000 +0900 ++++ server/setup.c 2008-10-26 23:38:10.000000000 +0900 +@@ -71,6 +71,7 @@ + char *error_file = NULL; + char *log_file = NULL; + char *port_name = NULL; ++char *server_name = NULL; + #ifdef TLI + char *port_number = NULL; + #else +@@ -232,6 +233,8 @@ + "ProtoName", get_opt_str, &proto_name, + "protoname", get_opt_str, &proto_name, + #else ++ "ServerName", get_opt_str, &server_name, ++ "servername", get_opt_str, &server_name, + "PortNumber", get_opt_int, &port_number, + "portnumber", get_opt_int, &port_number, + #endif +@@ -409,6 +412,7 @@ + set_defstr(&dict_dir, DictRootDir); + set_defstr(&log_file, LogOutFile); + set_defstr(&port_name, PortName); ++ set_defstr(&server_name, ServerName); + set_defstr(&socket_name, SocketName); + #ifdef LOCK_FILE + set_defstr(&lock_file, LockFile); diff --git a/japanese/sj3-server/files/post-patch-server-sj3serv.h b/japanese/sj3-server/files/post-patch-server-sj3serv.h new file mode 100644 index 000000000000..d5a7a459e24b --- /dev/null +++ b/japanese/sj3-server/files/post-patch-server-sj3serv.h @@ -0,0 +1,10 @@ +--- server/sj3serv.h.orig 2008-10-26 23:43:14.000000000 +0900 ++++ server/sj3serv.h 2008-10-26 23:43:29.000000000 +0900 +@@ -126,6 +126,7 @@ + extern char *error_file; + extern char *log_file; + extern char *port_name; ++extern char *server_name; + #ifdef TLI + extern char *port_number; + #else diff --git a/japanese/sj3-server/files/post-patch-sj3lib-Imakefile b/japanese/sj3-server/files/post-patch-sj3lib-Imakefile new file mode 100644 index 000000000000..5b0f17687b25 --- /dev/null +++ b/japanese/sj3-server/files/post-patch-sj3lib-Imakefile @@ -0,0 +1,10 @@ +--- sj3lib/Imakefile.orig 2008-09-07 16:42:18.000000000 +0900 ++++ sj3lib/Imakefile 2008-09-07 16:42:39.000000000 +0900 +@@ -72,7 +72,5 @@ + + LibraryObjectRule() + +-InstallMultiple(sj3lib.h,$(SJ3HDRDIR)) +- + DependTarget() + diff --git a/japanese/sj3-server/files/sj3.sh.in b/japanese/sj3-server/files/sj3.sh.in index f39a18764ccd..c9d3db5e5ed8 100644 --- a/japanese/sj3-server/files/sj3.sh.in +++ b/japanese/sj3-server/files/sj3.sh.in @@ -23,6 +23,13 @@ sj3_enable=${sj3_enable:-"NO"} # Enable sj3 name="sj3" rcvar=`set_rcvar` command="%%PREFIX%%/sbin/sj3serv" +start_precmd="sj3serv_precmd" + +sj3serv_precmd() +{ + mkdir -p -m 0755 /var/run/sj3 + chown _sj3:_sj3 /var/run/sj3 +} load_rc_config $name run_rc_command "$1" diff --git a/japanese/sj3-server/files/sj3_freebsd.tmpl.in b/japanese/sj3-server/files/sj3_freebsd.tmpl.in new file mode 100644 index 000000000000..e1ec046639aa --- /dev/null +++ b/japanese/sj3-server/files/sj3_freebsd.tmpl.in @@ -0,0 +1,5 @@ +/* $FreeBSD$ */ + +SJ3TOP= %%PREFIX%% +SJ3DICTDIR= $(SJ3LIBDIR)/sj3/dict +SJ3VARRUNDIR= %%DESTDIR%%$(VARDIR)/run/sj3 diff --git a/japanese/sj3-server/pkg-descr b/japanese/sj3-server/pkg-descr index 3daaeb2d9b61..e0d1fba83a52 100644 --- a/japanese/sj3-server/pkg-descr +++ b/japanese/sj3-server/pkg-descr @@ -1,20 +1,3 @@ -This is SJ3 2.0.1.20, a Japanese input method. -This system developed by Sony Corporation. -SJ3 is composed of Kana-Kanji conversion server(sj3serv), -Kana-Kanji conversion client for terminal(sj3) and Kana-Kanji -conversion library(sj3lib). - -If you start up sj3serv, you must add a following entry into -/etc/services file or NIS/YP services map. - -sj3 3086/tcp - -This port number may be changed by the setup file(See manpages). - -This also include many patches for FreeBSD or others. -(Remove warning, support pseudo-terminal of FreeBSD, - some bug fix and change make rules.) If there are any problem -in this patches, please know me via E-mail. - -Hidekazu Kuroki -(hidekazu@cs.titech.ac.jp) +This is SJ3, a Japanese input method developed by Sony Corporation. +SJ3 is composed of Kana-Kanji conversion server(sj3serv), Kana-Kanji +conversion client for terminal(sj3) and Kana-Kanji conversion library(sj3lib). diff --git a/japanese/sj3-server/pkg-install b/japanese/sj3-server/pkg-install index 800be546af56..b253b2139168 100644 --- a/japanese/sj3-server/pkg-install +++ b/japanese/sj3-server/pkg-install @@ -1,4 +1,5 @@ #!/bin/sh +# $FreeBSD$ PATH=/bin:/usr/sbin @@ -24,7 +25,7 @@ case $2 in echo "You already have a user \"${USER}\", so I will use it." else if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d /nonexistent -s /sbin/nologin -c "SJ3 Daemon" + -d /nonexistent -s /usr/sbin/nologin -c "SJ3 Daemon" then echo "Added user \"${USER}\"." else diff --git a/japanese/sj3-server/pkg-plist b/japanese/sj3-server/pkg-plist index 2e7e1c6edf02..91907ddd9a1e 100644 --- a/japanese/sj3-server/pkg-plist +++ b/japanese/sj3-server/pkg-plist @@ -1,3 +1,4 @@ +@comment $FreeBSD$ bin/sj3 bin/sj3dic bin/sj3mkdic @@ -9,13 +10,11 @@ etc/sj3/cvtkey.xterm etc/sj3/serverrc etc/sj3/sjrc etc/sj3/sjrk -include/sj3lib.h -lib/libsj3lib.a -lib/libsj3lib.so -lib/libsj3lib.so.1 lib/sj3/dict/sj3main.dic sbin/sj3serv @dirrm lib/sj3/dict/user @dirrm lib/sj3/dict @dirrm lib/sj3 @dirrm etc/sj3 +@cwd /var/run +@dirrmtry sj3 |