diff options
author | hrs <hrs@FreeBSD.org> | 2008-11-01 23:16:49 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2008-11-01 23:16:49 +0800 |
commit | cbcb95c04fe70c97f604d125e7c26c550aa408f2 (patch) | |
tree | 1d3281f97172226ff3821fb7dd6d0fd3ad48debd /japanese | |
parent | b70e29e7f80d3a6be7640712691720324f2bfc2d (diff) | |
download | freebsd-ports-gnome-cbcb95c04fe70c97f604d125e7c26c550aa408f2.tar.gz freebsd-ports-gnome-cbcb95c04fe70c97f604d125e7c26c550aa408f2.tar.zst freebsd-ports-gnome-cbcb95c04fe70c97f604d125e7c26c550aa408f2.zip |
- Add "-a" option to specify the listen address.
- Add rcNG startup script.
- $skkserv_flags="-a 127.0.0.1" is set by default.
- Update WWW: line in pkg-plist.
- Take maintainership.
Diffstat (limited to 'japanese')
-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 |