diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2008-11-01 15:16:49 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2008-11-01 15:16:49 +0000 |
commit | 17ecdee7b3bd797deb0a4bdca2559ebb9894532a (patch) | |
tree | 7cfcbae72596105ccaae6b5915c05b35e75b087c /japanese/skkserv | |
parent | dac2da7f40d31b1f449654988f940900b3fdd0b2 (diff) | |
download | ports-17ecdee7b3bd797deb0a4bdca2559ebb9894532a.tar.gz ports-17ecdee7b3bd797deb0a4bdca2559ebb9894532a.zip |
Notes
Diffstat (limited to 'japanese/skkserv')
-rw-r--r-- | japanese/skkserv/Makefile | 33 | ||||
-rw-r--r-- | japanese/skkserv/files/patch-skkserv.c | 63 | ||||
-rw-r--r-- | japanese/skkserv/files/patch-skkserv.h | 4 | ||||
-rw-r--r-- | japanese/skkserv/files/skkserv.sh.in | 18 | ||||
-rw-r--r-- | japanese/skkserv/pkg-descr | 2 | ||||
-rw-r--r-- | japanese/skkserv/pkg-plist | 2 |
6 files changed, 89 insertions, 33 deletions
diff --git a/japanese/skkserv/Makefile b/japanese/skkserv/Makefile index 93b2333243d6..457013a63ace 100644 --- a/japanese/skkserv/Makefile +++ b/japanese/skkserv/Makefile @@ -7,44 +7,27 @@ PORTNAME= skkserv PORTVERSION= 9.6 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= japanese MASTER_SITES= ${MASTER_SITE_PORTS_JP} DISTNAME= skk${PORTVERSION} -MAINTAINER= ports@FreeBSD.org -COMMENT=Dictionary server for the SKK Japanese-input software +MAINTAINER= hrs@FreeBSD.org +COMMENT= Dictionary server for the SKK Japanese-input software RUN_DEPENDS= ${LOCALBASE}/share/skk/${SKKJISYO}:${PORTSDIR}/japanese/skk-jisyo -SKKJISYO_SIZE?= L -SKKJISYO?= SKK-JISYO.${SKKJISYO_SIZE} +USE_RC_SUBR= skkserv.sh WRKSRC= ${WRKDIR}/skk-${PORTVERSION} GNU_CONFIGURE= yes MAKE_ARGS= SUBDIRS='skkserv' CONFIGURE_ARGS+= --with-jisyo=${SKKJISYO} --libexecdir=${PREFIX}/sbin -STARTUP_SCRIPT= ${PREFIX}/etc/rc.d/skkserv.sh +PLIST_FILES= sbin/skkserv + +SKKJISYO_SIZE?= L +SKKJISYO?= SKK-JISYO.${SKKJISYO_SIZE} do-install: @${INSTALL_PROGRAM} ${WRKSRC}/skkserv/skkserv ${PREFIX}/sbin - @if [ ! -f ${STARTUP_SCRIPT} ]; then \ - ${ECHO} "Installing ${STARTUP_SCRIPT} file."; \ - ${ECHO_CMD} "#!/bin/sh" > ${STARTUP_SCRIPT}; \ - ${ECHO_CMD} 'case $$1 in' >> ${STARTUP_SCRIPT}; \ - ${ECHO_CMD} "start)" >> ${STARTUP_SCRIPT}; \ - ${ECHO_CMD} " if [ -f ${PREFIX}/sbin/skkserv ]; then" >> \ - ${STARTUP_SCRIPT}; \ - ${ECHO_CMD} " ${ECHO_CMD} -n ' skkserv'; ${PREFIX}/sbin/skkserv" >> \ - ${STARTUP_SCRIPT}; \ - ${ECHO_CMD} " fi" >> ${STARTUP_SCRIPT}; \ - ${ECHO_CMD} " ;;" >> ${STARTUP_SCRIPT}; \ - ${ECHO_CMD} "stop)" >> ${STARTUP_SCRIPT}; \ - ${ECHO_CMD} " ;;" >> ${STARTUP_SCRIPT}; \ - ${ECHO_CMD} "*)" >> ${STARTUP_SCRIPT}; \ - ${ECHO_CMD} ' ${ECHO_CMD} "usage: $$0 {start|stop}" 1>&2' >> ${STARTUP_SCRIPT}; \ - ${ECHO_CMD} " ;;" >> ${STARTUP_SCRIPT}; \ - ${ECHO_CMD} 'esac' >> ${STARTUP_SCRIPT}; \ - ${CHMOD} ${BINMODE} ${STARTUP_SCRIPT}; \ - fi .include <bsd.port.mk> diff --git a/japanese/skkserv/files/patch-skkserv.c b/japanese/skkserv/files/patch-skkserv.c index 901a4c14b6e0..0983a5d31cbb 100644 --- a/japanese/skkserv/files/patch-skkserv.c +++ b/japanese/skkserv/files/patch-skkserv.c @@ -1,6 +1,63 @@ ---- skkserv/skkserv.c.orig 2008-01-01 20:00:27.000000000 +0100 -+++ skkserv/skkserv.c 2008-01-01 20:01:01.000000000 +0100 -@@ -476,7 +476,7 @@ +--- skkserv/skkserv.c.orig 1997-01-21 04:16:36.000000000 +0900 ++++ skkserv/skkserv.c 2008-11-02 00:07:53.000000000 +0900 +@@ -124,6 +124,8 @@ + int clientsock[MAXCLNT]; /* socket for each client */ + int nclients; /* max index for active clients */ + ++char listenaddr[NI_MAXHOST]; ++ + main(argc, argv) + char *argv[]; + { +@@ -166,6 +168,12 @@ + case 'P': + if (parg +1 == argc) showusage(); + portnum = atoi(argv[++parg]); break; ++ case 'a': ++ case 'A': ++ if (parg +1 == argc) showusage(); ++ strncpy(listenaddr, argv[++parg], sizeof(listenaddr) - 1); ++ listenaddr[sizeof(listenaddr) - 1] = '\0'; ++ break; + default: showusage(); + } + } else if (setjisho == 0) { +@@ -232,9 +240,9 @@ + showusage() + { + fprintf(stderr, +- "Usage: %s [-d] [-l logfile] [-p port] \n", pgmnm); ++ "Usage: %s [-d] [-l logfile] [-p port] [-a listenaddr]\n", pgmnm); + fprintf(stderr, +- " %s [-d] [-l logfile] [-p port] skk-jisho\n", pgmnm); ++ " %s [-d] [-l logfile] [-p port] [-a listenaddr] skk-jisho\n", pgmnm); + exit(1); + } + +@@ -249,7 +257,21 @@ + + bzero((char*)&sin, sizeof(sin)); + sin.sin_family = AF_INET; +- sin.sin_addr.s_addr = htonl(INADDR_ANY); ++ if (listenaddr[0] == '\0') { ++ sin.sin_addr.s_addr = htonl(INADDR_ANY); ++ } else { ++ if (!inet_aton(listenaddr, &sin.sin_addr)) { ++ struct hostent *hp; ++ struct in_addr **pptr; ++ ++ if ((hp = gethostbyname(listenaddr)) == NULL) { ++ err("could not resolve the specified listen address"); ++ } ++ pptr = (struct in_addr **)hp->h_addr_list; ++ memcpy(&sin.sin_addr.s_addr, pptr[0], sizeof(struct in_addr)); ++ } ++ } ++ + if (portnum == 0) { + #ifdef PORTNUM + portnum = PORTNUM; +@@ -476,7 +498,7 @@ if (FD_ISSET(initsock, &readfds)) { len = sizeof(from); diff --git a/japanese/skkserv/files/patch-skkserv.h b/japanese/skkserv/files/patch-skkserv.h index c6c891559b2e..ae8375cca646 100644 --- a/japanese/skkserv/files/patch-skkserv.h +++ b/japanese/skkserv/files/patch-skkserv.h @@ -1,5 +1,5 @@ ---- skkserv/skkserv.h.orig 1997-01-20 20:16:36.000000000 +0100 -+++ skkserv/skkserv.h 2008-01-01 19:58:41.000000000 +0100 +--- skkserv/skkserv.h.orig 1997-01-21 04:16:36.000000000 +0900 ++++ skkserv/skkserv.h 2008-11-01 23:53:43.000000000 +0900 @@ -37,6 +37,8 @@ /* Necessary for SunOS 3.x and maybe other old systems */ diff --git a/japanese/skkserv/files/skkserv.sh.in b/japanese/skkserv/files/skkserv.sh.in new file mode 100644 index 000000000000..c8b364a7ca67 --- /dev/null +++ b/japanese/skkserv/files/skkserv.sh.in @@ -0,0 +1,18 @@ +#!/bin/sh +# $FreeBSD$ +# +# PROVIDE: skkserv +# REQUIRE: LOGIN +# KEYWORD: shutdown +# + +. %%RC_SUBR%% + +name=skkserv +rcvar=`set_rcvar` +command=%%PREFIX%%/sbin/skkserv + +: ${skkserv_flags:="-a 127.0.0.1"} + +load_rc_config ${name} +run_rc_command $1 diff --git a/japanese/skkserv/pkg-descr b/japanese/skkserv/pkg-descr index c17ddccfb64e..889d9aef32d0 100644 --- a/japanese/skkserv/pkg-descr +++ b/japanese/skkserv/pkg-descr @@ -2,6 +2,6 @@ SKK (Simple Kana Kanji Convertor) is a very fast and efficient Japanese input method system, written in emacs-lisp. SKK runs on NEmacs (Japanized Emacs18), Mule (MULtilingual Emacs), and Demacs (DOS version of Emacs18/NEmacs). -WWW: http://skk.kuis.kyoto-u.ac.jp/skk/ +WWW: http://openlab.ring.gr.jp/skk/index.html This package is the skk-jisyo server. diff --git a/japanese/skkserv/pkg-plist b/japanese/skkserv/pkg-plist deleted file mode 100644 index 76921486d03a..000000000000 --- a/japanese/skkserv/pkg-plist +++ /dev/null @@ -1,2 +0,0 @@ -sbin/skkserv -etc/rc.d/skkserv.sh |