diff options
author | hrs <hrs@FreeBSD.org> | 2008-10-27 03:35:08 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2008-10-27 03:35:08 +0800 |
commit | ea7159c637894a46d01fdb20e91418b3f53f6a6d (patch) | |
tree | 614fbe1d28e3b34366f554771e774bb083789905 /japanese | |
parent | 7350048c2c181ea9648232fd1246c638a68affad (diff) | |
download | freebsd-ports-gnome-ea7159c637894a46d01fdb20e91418b3f53f6a6d.tar.gz freebsd-ports-gnome-ea7159c637894a46d01fdb20e91418b3f53f6a6d.tar.zst freebsd-ports-gnome-ea7159c637894a46d01fdb20e91418b3f53f6a6d.zip |
- Separate the server part and the library part from japanese/sj3, and
remove japanese/sj3.
- Use localhost as the default listen address instead of INADDR_ANY.
- Add "servername" directive to serverrc.
- Fix incorrect descriptions in serverrc.
- Take maintainership.
Diffstat (limited to 'japanese')
24 files changed, 252 insertions, 206 deletions
diff --git a/japanese/Makefile b/japanese/Makefile index c255de749e65..f067537ac5cf 100644 --- a/japanese/Makefile +++ b/japanese/Makefile @@ -329,7 +329,8 @@ SUBDIR += seaside SUBDIR += sed SUBDIR += shinonome - SUBDIR += sj3 + SUBDIR += sj3-lib + SUBDIR += sj3-server SUBDIR += skk SUBDIR += skk-jisyo SUBDIR += skk-jisyo-cdb diff --git a/japanese/sj3-lib/Makefile b/japanese/sj3-lib/Makefile index c14870168960..e0f63967fb0c 100644 --- a/japanese/sj3-lib/Makefile +++ b/japanese/sj3-lib/Makefile @@ -1,4 +1,4 @@ -# New ports collection makefile for: SJ3 +# New ports collection makefile for: sj3-lib # Date created: 18 Aug 1998 # Whom: Hidekazu Kuroki <hidekazu@cs.titech.ac.jp> # @@ -7,42 +7,33 @@ 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= -lib 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 +MAINTAINER= hrs@FreeBSD.org +COMMENT= A Japanese input method, library part -USE_RC_SUBR= sj3.sh USE_IMAKE= yes +USE_LDCONFIG= yes +NO_INSTALL_MANPAGES= 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-include-Const.h .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 - -do-configure: - ( cd $(WRKSRC) ; ${XMKMF} ; make Makefiles ) +post-patch: + cd ${WRKSRC} && ${CAT} ${POSTPATCHES} | ${PATCH} -pre-install: - @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL +pre-configure: apply-slist + ${INSTALL_DATA} ${WRKDIR}/sj3_freebsd.tmpl ${WRKSRC}/sj3_freebsd.tmpl .include <bsd.port.post.mk> diff --git a/japanese/sj3-lib/files/patch-sj3.tmpl b/japanese/sj3-lib/files/patch-sj3.tmpl index e9e027128774..4efe7b5082ba 100644 --- a/japanese/sj3-lib/files/patch-sj3.tmpl +++ b/japanese/sj3-lib/files/patch-sj3.tmpl @@ -1,21 +1,9 @@ ---- ./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 1997-01-23 20:20:58.000000000 +0900 ++++ sj3.tmpl 2008-09-07 16:07:19.000000000 +0900 +@@ -62,3 +62,5 @@ + #endif - #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 -- - #if SystemV4 || SystemV - USETLI = -DTLI - #else + #endif ++ ++#include "sj3_freebsd.tmpl" +\ No newline at end of file diff --git a/japanese/sj3-lib/files/post-patch-Imakefile b/japanese/sj3-lib/files/post-patch-Imakefile new file mode 100644 index 000000000000..bda7bb5b226f --- /dev/null +++ b/japanese/sj3-lib/files/post-patch-Imakefile @@ -0,0 +1,23 @@ +--- Imakefile.orig 2008-09-07 16:20:03.000000000 +0900 ++++ Imakefile 2008-09-07 16:20:51.000000000 +0900 +@@ -42,7 +42,7 @@ + * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp) 1996/8/10 + */ + +-SUBDIRS = sjcompat dict doc kanakan server sj3rkcv sj3lib sj3 sj3dic sj3stat demo ++SUBDIRS = sjcompat sj3lib + + AllTarget(includes) + MakeSubdirs($(SUBDIRS)) +@@ -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-lib/files/sj3.sh.in b/japanese/sj3-lib/files/sj3.sh.in deleted file mode 100644 index f39a18764ccd..000000000000 --- a/japanese/sj3-lib/files/sj3.sh.in +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: sj3 -# REQUIRE: DAEMON -# BEFORE: LOGIN -# KEYWORD: shutdown - -# Define these sj3_* variables in one of these files: -# /etc/rc.conf -# /etc/rc.conf.local -# /etc/rc.conf.d/sj3 -# -# DO NOT CHANGE THESE DEFAULT VALUES HERE -# -sj3_enable=${sj3_enable:-"NO"} # Enable sj3 -#sj3_program="%%PREFIX%%/sbin/sj3serv" # Location of sj3 - -. %%RC_SUBR%% - -name="sj3" -rcvar=`set_rcvar` -command="%%PREFIX%%/sbin/sj3serv" - -load_rc_config $name -run_rc_command "$1" diff --git a/japanese/sj3-lib/files/sj3_freebsd.tmpl.in b/japanese/sj3-lib/files/sj3_freebsd.tmpl.in new file mode 100644 index 000000000000..09e56d6c344c --- /dev/null +++ b/japanese/sj3-lib/files/sj3_freebsd.tmpl.in @@ -0,0 +1,5 @@ +/* $FreeBSD$ */ + +SJ3TOP= %%PREFIX%% +SJ3DICTDIR= $(SJ3LIBDIR)/sh3/dict +SJ3VARRUNDIR= %%DESTDIR%%$(VARDIR)/run/sj3 diff --git a/japanese/sj3-lib/pkg-descr b/japanese/sj3-lib/pkg-descr index 3daaeb2d9b61..e0d1fba83a52 100644 --- a/japanese/sj3-lib/pkg-descr +++ b/japanese/sj3-lib/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-lib/pkg-install b/japanese/sj3-lib/pkg-install deleted file mode 100644 index 800be546af56..000000000000 --- a/japanese/sj3-lib/pkg-install +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -PATH=/bin:/usr/sbin - -case $2 in - PRE-INSTALL) - USER=_sj3 - GROUP=${USER} - UID=912 - GID=${UID} - - if pw group show "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if pw groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi - fi - - if pw user show "${USER}" 2>/dev/null; then - 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" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi - ;; -esac diff --git a/japanese/sj3-lib/pkg-plist b/japanese/sj3-lib/pkg-plist index 2e7e1c6edf02..eb09f85044ad 100644 --- a/japanese/sj3-lib/pkg-plist +++ b/japanese/sj3-lib/pkg-plist @@ -1,21 +1,5 @@ -bin/sj3 -bin/sj3dic -bin/sj3mkdic -bin/sj3stat -etc/sj3/cvtkey.news -etc/sj3/cvtkey.nwp511 -etc/sj3/cvtkey.nwp517 -etc/sj3/cvtkey.xterm -etc/sj3/serverrc -etc/sj3/sjrc -etc/sj3/sjrk +@comment $FreeBSD$ 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 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 |