diff options
Diffstat (limited to 'chinese/xsim')
-rw-r--r-- | chinese/xsim/Makefile | 11 | ||||
-rw-r--r-- | chinese/xsim/files/xsim.sh | 13 | ||||
-rw-r--r-- | chinese/xsim/pkg-message | 2 |
3 files changed, 22 insertions, 4 deletions
diff --git a/chinese/xsim/Makefile b/chinese/xsim/Makefile index 3e3ccdf76449..94bddda38423 100644 --- a/chinese/xsim/Makefile +++ b/chinese/xsim/Makefile @@ -16,12 +16,12 @@ DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.gz \ MAINTAINER= ports@FreeBSD.org COMMENT= A simple and fast GBK Chinese XIM server -LIB_DEPENDS= db3.3:${PORTSDIR}/databases/db3 +LIB_DEPENDS= db4:${PORTSDIR}/databases/db4 USE_REINPLACE= yes USE_XLIB= yes GNU_CONFIGURE= yes -CONFIGURE_ARGS= --with-cn-locale=EUC +CONFIGURE_ARGS= --with-cn-locale=eucCN .include <bsd.port.pre.mk> @@ -34,9 +34,14 @@ post-patch: ${WRKSRC}/xsim/IMdkit/IMConn.c @${FIND} ${WRKSRC} -name xsimrc.in -or -name Makefile.in | ${XARGS} \ ${REINPLACE_CMD} -Ee 's,@prefix@/(plugins|dat|bin),${DATADIR}/\1,g' + @${FIND} ${WRKSRC} ! -type d \ + -exec ${GREP} -q _CPP_BITS_IOSBASE_H '{}' \; \ + -exec ${REINPLACE_CMD} 's/#ifdef _CPP_BITS_IOSBASE_H/#if defined(_IOS_BASE_H) || defined(_CPP_BITS_IOSBASE_H)/g' '{}' \; + @${REINPLACE_CMD} "s/-O2/${CFLAGS}/g" ${WRKSRC}/configure post-install: - @${LN} -s ${DATADIR}/bin/xsim ${PREFIX}/bin/xsim + @${SED} "s|%%PREFIX%%|${PREFIX}|g" <${FILESDIR}/xsim.sh \ + >${PREFIX}/bin/xsim && ${CHMOD} 555 ${PREFIX}/bin/xsim @${MKDIR} ${DATADIR}/dat @${CP} -R ${WRKDIR}/usr/local/xsim/dat/* ${DATADIR}/dat @${SED} -e 's,%%X11BASE%%,${X11BASE},g' < ${PKGMESSAGE} diff --git a/chinese/xsim/files/xsim.sh b/chinese/xsim/files/xsim.sh new file mode 100644 index 000000000000..115ec73f9ce0 --- /dev/null +++ b/chinese/xsim/files/xsim.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Install user settings directory if it does not exist +if [ ! -d ${HOME}/.xsim ] +then + mkdir ${HOME}/.xsim + cp %%PREFIX%%/share/xsim/dat/* ${HOME}/.xsim/ + sed "/^DICT_LOCAL/s|%%PREFIX%%/share/xsim/dat|${HOME}/.xsim|g" \ + %%PREFIX%%/etc/xsimrc > ${HOME}/.xsim/xsimrc +fi + +# Start xsim +exec %%PREFIX%%/share/xsim/bin/xsim $* diff --git a/chinese/xsim/pkg-message b/chinese/xsim/pkg-message index 8057bbca0254..2962664fe98c 100644 --- a/chinese/xsim/pkg-message +++ b/chinese/xsim/pkg-message @@ -12,5 +12,5 @@ in %%X11BASE%%/lib/X11/locale/zh_CN/XI18N_OBJS Remember to set environment varible XMODIFIERS: csh/tcsh: setenv XMODIFIERS @im=XSIM sh/bash: export XMODIFIERS='@im=XSIM' -and set LANG, LC_CTYPE to zh_CN.EUC. +and set LANG, LC_CTYPE to zh_CN.eucCN. ------------------------------------------------------------------------------- |