diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2008-10-26 20:00:25 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2008-10-26 20:00:25 +0000 |
commit | 7157a16e821c71257af1bb45456165df9c1e17cd (patch) | |
tree | dcc47891eac01bfa3295595ad1993c84f41accfb /japanese/kinput2 | |
parent | 1f997d2be886359f6912449935fafda7ae335012 (diff) | |
download | ports-7157a16e821c71257af1bb45456165df9c1e17cd.tar.gz ports-7157a16e821c71257af1bb45456165df9c1e17cd.zip |
- Simplify japanese/kinput2-* variants into a single japanese/kinput2.
The japanese/kinput2 port supports Canna, FreeWnn, and SJ3 by default.
- OPTIONify backend support selection.
- Take maintainership.
Notes
Notes:
svn path=/head/; revision=222106
Diffstat (limited to 'japanese/kinput2')
-rw-r--r-- | japanese/kinput2/Makefile | 123 | ||||
-rw-r--r-- | japanese/kinput2/files/Kinput2.conf | 22 | ||||
-rw-r--r-- | japanese/kinput2/files/Kinput2.conf.in | 7 | ||||
-rw-r--r-- | japanese/kinput2/pkg-descr | 15 | ||||
-rw-r--r-- | japanese/kinput2/pkg-plist | 6 |
5 files changed, 70 insertions, 103 deletions
diff --git a/japanese/kinput2/Makefile b/japanese/kinput2/Makefile index 94a37933b61a..379833b160b6 100644 --- a/japanese/kinput2/Makefile +++ b/japanese/kinput2/Makefile @@ -1,4 +1,4 @@ -# New ports collection makefile for: kinput2-freewnn +# New ports collection makefile for: kinput2 # Date created: 19 Dec 1997 # Whom: Satoshi TAOKA <taoka@FreeBSD.org> # @@ -7,80 +7,67 @@ PORTNAME= kinput2 PORTVERSION= 3.1 -PORTREVISION= 3 -PKGNAMESUFFIX= ${INPUT_METHOD} +PORTREVISION= 4 CATEGORIES= japanese x11 -MASTER_SITES= ftp://ftp.sra.co.jp/pub/x11/kinput2/ -DISTNAME= kinput2-v3.1 +MASTER_SITES= ftp://ftp.sra.co.jp/pub/x11/kinput2/ +DISTNAME= ${PORTNAME}-v${PORTVERSION} -MAINTAINER= ports@FreeBSD.org -COMMENT?= Input server of Japanese text (FreeWnn) +MAINTAINER= hrs@FreeBSD.org +COMMENT= A Japanese text input server for X11 applications -LIB_DEPENDS= ${LIB_INPUT_METHOD} -BUILD_DEPENDS= ${BUILD_INPUT_METHOD} - -PATCHDIR= ${.CURDIR}/../kinput2-freewnn/files -FILESDIR= ${.CURDIR}/../kinput2-freewnn/files USE_IMAKE= yes +SUB_FILES= Kinput2.conf + MAN1= kinput2.1 -.if !defined(CANNA) && !defined(SJ3) && !defined(FREEWNN) && !defined(WNN6) && !defined(WNN7) -# For this port -FREEWNN= yes -.endif -# -# Specifying a velue INPUT_METHOD, and seting values BUILD_DEPENDS, -# LIB_DEPENDS, etc. -.if defined(CANNA) -INPUT_METHOD+= canna -LIB_INPUT_METHOD+= canna16.1:${PORTSDIR}/japanese/Canna -KINPUT2_DEF+= -DUseCanna -Dport_CANNASRC=${LOCALBASE}/include \ - -Dport_CANNALIB="-L${LOCALBASE}/lib -lcanna16" -.endif -.if defined(SJ3) -INPUT_METHOD+= sj3 -BUILD_INPUT_METHOD+= sj3serv:${PORTSDIR}/japanese/sj3 -KINPUT2_DEF+= -DUseSj3 -Dport_SJ3SRC=${LOCALBASE}/include \ - -Dport_SJ3LIB="-L${LOCALBASE}/lib -lsj3lib" -.endif -.if defined(FREEWNN) -INPUT_METHOD+= freewnn -LIB_INPUT_METHOD+= wnn.0:${PORTSDIR}/japanese/FreeWnn-lib -KINPUT2_DEF+= -DUseWnn -Dport_WNNINCDIR=$(LOCALBASE)/include/wnn \ - -Dport_WNNLIB="-L$(LOCALBASE)/lib -lwnn -lcrypt" -.elif defined(WNN6) -INPUT_METHOD+= wnn6 -LIB_INPUT_METHOD+= wnn6.2:${PORTSDIR}/japanese/Wnn6-lib -KINPUT2_DEF+= -DUseWnn -DUseWnn6 -Dport_WNNINCDIR=$(LOCALBASE)/include/wnn6/wnn \ - -Dport_WNNLIB="-L$(LOCALBASE)/lib -lwnn6 -lcrypt" -.elif defined(WNN7) -INPUT_METHOD+= wnn7 -LIB_INPUT_METHOD+= wnn7.1:${PORTSDIR}/japanese/Wnn7-lib -KINPUT2_DEF+= -DUseWnn -DUseWnn6 -Dport_WNNINCDIR=$(LOCALBASE)/include/wnn7/wnn \ - -Dport_WNNLIB="-L$(LOCALBASE)/lib -lwnn7 -lcrypt" -.endif -# -# Make a value of INPUT_METHOD -.if defined(INPUT_METHOD) -INPUT_METHOD!= echo ${INPUT_METHOD} | sed -e 's/^/-/' -e 's/ /+/g' -.endif -# -# Redefine $(IMAKE_CMD) with $(PORT_IMAKE_DEFINES) in ${WRKSRC}/Kinput2.conf -MAKE_ENV+= PORT_IMAKE_DEFINES='${KINPUT2_DEF}' +OPTIONS= CANNA "Canna support" on \ + FREEWNN "FreeWnn support " on \ + WNN6 "Wnn6 support" off \ + WNN7 "Wnn7 support" off \ + SJ3 "SJ3 support" on + +LIB_DEPENDS.CANNA= canna16.1:${PORTSDIR}/japanese/canna-lib +CONF.CANNA= '\#define UseCanna' \ + CANNASRC=${LOCALBASE}/include \ + CANNALIB="-L${LOCALBASE}/lib -lcanna16" + +LIB_DEPENDS.WNN6= wnn6.2:${PORTSDIR}/japanese/Wnn6-lib +CONF.WNN6= '\#define UseWnn' \ + '\#define UseWnn6' \ + WNNINCDIR=$(LOCALBASE)/include/wnn6/wnn \ + WNNLIB="-L$(LOCALBASE)/lib -lwnn6 -lcrypt" -pre-configure: - if [ -f ${WRKSRC}/Kinput2.conf ]; then \ - ${MV} -f ${WRKSRC}/Kinput2.conf ${WRKSRC}/Kinput2.conf.org; \ - fi - ${CP} ${FILESDIR}/Kinput2.conf ${WRKSRC}/Kinput2.conf +LIB_DEPENDS.WNN7= wnn7.1:${PORTSDIR}/japanese/Wnn7-lib +CONF.WNN7= '\#define UseWnn' \ + '\#define UseWnn6' \ + WNNINCDIR=$(LOCALBASE)/include/wnn7/wnn \ + WNNLIB="-L$(LOCALBASE)/lib -lwnn6 -lcrypt" -do-configure: - cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${XMKMF} +LIB_DEPENDS.FREEWNN= wnn.0:${PORTSDIR}/japanese/FreeWnn-lib +CONF.FREEWNN+= '\#define UseWnn' \ + WNNINCDIR=$(LOCALBASE)/include/wnn \ + WNNLIB="-L$(LOCALBASE)/lib -lwnn -lcrypt" +LIB_DEPENDS.SJ3= sj3lib.1:${PORTSDIR}/japanese/sj3-lib +CONF.SJ3+= '\#define UseSj3' \ + SJ3SRC=${LOCALBASE}/include \ + SJ3LIB="-L${LOCALBASE}/lib -lsj3lib" \ + SJ3DEF_DIR=\$${LIBDIR}/ccdef + +.include <bsd.port.pre.mk> + +.for I in WITH_CANNA WITH_FREEWNN WITH_WNN6 WITH_WNN7 WITH_SJ3 +.if defined(${I}) +LIB_DEPENDS+= ${LIB_DEPENDS.${I:S/^WITH_//}} +BUILD_DEPENDS+= ${BUILD_DEPENDS.${I:S/^WITH_//}} +CONF+= ${CONF.${I:S/^WITH_//}} +PLIST_SUB+= ${I:S/^WITH_//}="" +.else +PLIST_SUB+= ${I:S/^WITH_//}="@comment " +.endif +.endfor -post-install: -# For FreeWnn or Wnn6 - @if [ -e ${PKGMESSAGE} ]; then \ - ${CAT} ${PKGMESSAGE}; \ - fi +pre-configure: apply-slist + ${INSTALL_DATA} ${WRKDIR}/Kinput2.conf ${WRKSRC}/Kinput2.conf + ${PRINTF} "%s\n" ${CONF} > ${WRKSRC}/Kinput2_im.conf -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/japanese/kinput2/files/Kinput2.conf b/japanese/kinput2/files/Kinput2.conf deleted file mode 100644 index c7c714ad1dae..000000000000 --- a/japanese/kinput2/files/Kinput2.conf +++ /dev/null @@ -1,22 +0,0 @@ -XCOMM Each parameter in this file is explained in the original -XCOMM Kinput2.conf (probably Kinput2.conf.org) - -XCOMM Redefine $(IMAKE_CMD) for FreeBSD ports (by S. Taoka) - -IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) $(PORT_IMAKE_DEFINES) - -CCDEF_DIR = $(LIBDIR)/ccdef - -WNNSRC = port_WNNSRC -WNNINCDIR = port_WNNINCDIR -WNNLIB = port_WNNLIB - -CANNAINSTDIR = port_CANNAINSTDIR -CANNASRC = port_CANNASRC -CANNALIB = port_CANNALIB - -SJ3DEF_DIR = $(LIBDIR)/sj3def -SJ3SRC = port_SJ3SRC -SJ3LIB = port_SJ3LIB - -TRANSPORTDEFS = diff --git a/japanese/kinput2/files/Kinput2.conf.in b/japanese/kinput2/files/Kinput2.conf.in new file mode 100644 index 000000000000..5090590e0f34 --- /dev/null +++ b/japanese/kinput2/files/Kinput2.conf.in @@ -0,0 +1,7 @@ +XCOMM $FreeBSD$ + +CCDEF_DIR = $(LIBDIR)/ccdef + +#include "Kinput2_im.conf" + +TRANSPORTDEFS = diff --git a/japanese/kinput2/pkg-descr b/japanese/kinput2/pkg-descr index 79685f615bf3..6d6a0c81e38f 100644 --- a/japanese/kinput2/pkg-descr +++ b/japanese/kinput2/pkg-descr @@ -1,16 +1,5 @@ -Kinput2 is an Japanese text input server for X11 applications. - -A client that require kana-kanji conversion service for Japanese text +Kinput2 is an Japanese text input server for X11 applications. A +client that require kana-kanji conversion service for Japanese text sends a request to kinput2. Kinput2 receives the request, does kana-kanji conversion, and sends the converted text back to the client. - -The port supports FreeWnn. - -(NOTICE) -Default key-binding is changed to "egg" key-binding by defining -*CcWnn.ccdef: ccdef.kinput2.egg -in ${LOCALBASE}/lib/X11/app-defaults/Kinput2. - --- S. Taoka -<taoka@FreeBSD.org> diff --git a/japanese/kinput2/pkg-plist b/japanese/kinput2/pkg-plist index 89a0c6be133d..87665a48dc1b 100644 --- a/japanese/kinput2/pkg-plist +++ b/japanese/kinput2/pkg-plist @@ -1,3 +1,4 @@ +@comment $FreeBSD$ bin/kinput2 lib/X11/app-defaults/Kinput2 lib/X11/ccdef/ccdef.kinput2 @@ -13,4 +14,9 @@ lib/X11/ccdef/ccdef.kinput2.egg lib/X11/ccdef/rule.hiragana.egg lib/X11/ccdef/rule.katakana.egg lib/X11/ccdef/rule.kigou.egg +%%SJ3%%lib/X11/ccdef/sjhk +%%SJ3%%lib/X11/ccdef/sjrc +%%SJ3%%lib/X11/ccdef/sjrk +%%SJ3%%lib/X11/ccdef/sjsb +%%SJ3%%lib/X11/ccdef/sjzh @dirrm lib/X11/ccdef |