Date: Mon, 5 Jul 2004 13:39:41 +0800 From: hamigua@hotpop.com To: FreeBSD-gnats-submit@FreeBSD.org Cc: yuking_net@sohu.com Subject: ports/68674: New port:chinese/gWuBi Message-ID: <20040705060319.E8246FE14C7@smtp-3.hotpop.com> Resent-Message-ID: <200407050630.i656UJgj002941@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 68674 >Category: ports >Synopsis: New port:chinese/gWuBi >Confidential: yes >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jul 05 06:30:19 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Hamigua >Release: FreeBSD 4.10-STABLE i386 >Organization: >Environment: System: FreeBSD localhost.hamigua.org 4.10-STABLE FreeBSD 4.10-STABLE #0: Fri Jun 11 14:30:28 CST 2004 root@localhost.hamigua.org:/usr/src/sys/compile/hamigua i386 >Description: A collection of Simplified Chinese input methods based on XIM (X Input Method), including "WuBi", "PinYin", and "QuWei". http://www.fcitx.org/ >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # gWuBi/ # gWuBi/Makefile # gWuBi/distinfo # gWuBi/files # gWuBi/pkg-descr # gWuBi/pkg-message # gWuBi/pkg-plist # gWuBi/files/ # gWuBi/files/patch-IMdkit-lib-IMConn.c # gWuBi/files/patch-Makefile # gWuBi/files/patch-SetLocale.c # gWuBi/files/patch-window.c # gWuBi/files/patch-xim.c # echo c - gWuBi/ mkdir -p gWuBi/ > /dev/null 2>&1 echo x - gWuBi/Makefile sed 's/^X//' >gWuBi/Makefile << 'END-of-gWuBi/Makefile' X# New ports collection makefile for: zh-gWuBi X# Date created: 5 Jul 2004 X# Whom: hamigua <hamigua@hotpop.com> X# X# $FreeBSD$ X# X XPORTNAME= gWuBi XPORTVERSION= 1.6 XPORTREVISION= 1 XCATEGORIES= chinese x11 XMASTER_SITES= http://www.fcitx.org/download/ XEXTRACT_SUFX= .tar.gz X XMAINTAINER= hamigua@hotpop.com XCOMMENT= A simple and fast GBK Chinese XIM server X XUSE_XLIB= yes XUSE_REINPLACE= yes X X.include <bsd.port.pre.mk> X X.if ${XFREE86_VERSION} == 4 XRUN_DEPENDS= mkfontdir:${PORTSDIR}/x11/XFree86-4-clients X.endif X XCONFIGURE_ENV= X11BASE=${X11BASE} Xpost-extract: X cd ${BUILD_WRKSRC}; ${MAKE} clean X Xpost-patch: X @${REINPLACE_CMD} -e 's#/usr/share#${LOCALBASE}/share#g' ${WRKSRC}/Makefile ${WRKSRC}/punc.h ${WRKSRC}/py.h ${WRKSRC}/wbx.h X @${REINPLACE_CMD} -e 's#/usr/bin#${LOCALBASE}/bin#g' ${WRKSRC}/Makefile X @${REINPLACE_CMD} -e 's#/usr/X11R6/lib/X11/fonts/misc#${LOCALBASE}/share/fonts#g' ${WRKSRC}/Makefile X Xpost-install: X.if !defined(NOPORTDOCS) X ${MKDIR} ${DOCSDIR} X.for i in README wb_fh.htm X ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} X.endfor X.endif X @${CAT} ${PKGMESSAGE} X X.include <bsd.port.post.mk> END-of-gWuBi/Makefile echo x - gWuBi/distinfo sed 's/^X//' >gWuBi/distinfo << 'END-of-gWuBi/distinfo' XMD5 (gWuBi-1.6.tar.gz) = c61a93d9bfc87463630247007cdb696f XSIZE (fcitx-2.0.1.tar.bz2) = 966595 END-of-gWuBi/distinfo echo c - gWuBi/files mkdir -p gWuBi/files > /dev/null 2>&1 echo x - gWuBi/pkg-descr sed 's/^X//' >gWuBi/pkg-descr << 'END-of-gWuBi/pkg-descr' XA simple and fast GBK Chinese XIM server X XWWW: http://www.fcitx.org/ END-of-gWuBi/pkg-descr echo x - gWuBi/pkg-message sed 's/^X//' >gWuBi/pkg-message << 'END-of-gWuBi/pkg-message' X-------------------------------------------------- XRemember to set environment varible XMODIFIERS: X csh/tcsh: setenv XMODIFIERS @im=gWuBi X sh/bash: export XMODIFIERS='@im=gWuBi' Xand set LANG, LC_CTYPE to zh_CN.eucCN or zh_CN.GBK. X-------------------------------------------------- END-of-gWuBi/pkg-message echo x - gWuBi/pkg-plist sed 's/^X//' >gWuBi/pkg-plist << 'END-of-gWuBi/pkg-plist' Xbin/gWuBi Xshare/fonts/studio-song14.pcf.gz Xshare/gWuBi/punc.mb Xshare/gWuBi/pybase.mb Xshare/gWuBi/pyphrase.mb Xshare/gWuBi/wbx.mb X@dirrm share/gWuBi X%%PORTDOCS%%%%DOCSDIR%%/README X%%PORTDOCS%%%%DOCSDIR%%/wb_fh.htm X%%PORTDOCS%%@dirrm %%DOCSDIR%% END-of-gWuBi/pkg-plist echo c - gWuBi/files/ mkdir -p gWuBi/files/ > /dev/null 2>&1 echo x - gWuBi/files/patch-IMdkit-lib-IMConn.c sed 's/^X//' >gWuBi/files/patch-IMdkit-lib-IMConn.c << 'END-of-gWuBi/files/patch-IMdkit-lib-IMConn.c' X--- IMdkit/lib/IMConn.c.orig Wed Jul 17 11:15:59 2002 X+++ IMdkit/lib/IMConn.c Mon Jul 5 06:25:24 2004 X@@ -30,7 +30,7 @@ X ******************************************************************/ X X #include <X11/Xlib.h> X-#include <malloc.h> X+#include <stdlib.h> X #include <string.h> X #include "IMdkit.h" X #include <stdarg.h> END-of-gWuBi/files/patch-IMdkit-lib-IMConn.c echo x - gWuBi/files/patch-Makefile sed 's/^X//' >gWuBi/files/patch-Makefile << 'END-of-gWuBi/files/patch-Makefile' X--- Makefile.orig Sat Nov 16 09:42:03 2002 X+++ Makefile Mon Jul 5 13:15:35 2004 X@@ -1,5 +1,5 @@ X CC = gcc X-CFLAGS = -O2 -fno-strength-reduce X+CFLAGS = -O2 -fno-strength-reduce -DSIGUNUSED=32 X INC = -I../include -I/usr/X11R6/include X X SRC = main.c ime.c AddPhraseWindow.c IC.c InputWindow.c MainWindow.c MyErrorsHandlers.c punc.c py.c MH_PY.c PYFA.c pyParser.c pyMapTable.c SetLocale.c tools.c wbx.c window.c xim.c qw.c X@@ -25,6 +25,7 @@ X install: X strip gWuBi X mkdir -p /usr/share/gWuBi X+ mkdir -p /usr/X11R6/lib/X11/fonts/misc/ X cp -f gWuBi /usr/bin/ X cp -f punc.mb /usr/share/gWuBi/ X cp -f wbx.mb /usr/share/gWuBi/ END-of-gWuBi/files/patch-Makefile echo x - gWuBi/files/patch-SetLocale.c sed 's/^X//' >gWuBi/files/patch-SetLocale.c << 'END-of-gWuBi/files/patch-SetLocale.c' X--- SetLocale.c.orig Sun Sep 1 15:15:00 2002 X+++ SetLocale.c Mon Jul 5 07:58:03 2004 X@@ -14,8 +14,8 @@ X X void SetLocale (void) X { X- if (strcasecmp (strDefaultLocale, "zh_CN.gb2312")) X- setlocale (LC_ALL, strDefaultLocale); X+ if (strcasecmp (strDefaultLocale, "zh_CN")) X+ setlocale (LC_CTYPE, strDefaultLocale); X else X- setlocale (LC_ALL, "zh_CN"); X+ setlocale (LC_CTYPE, "zh_CN"); X } END-of-gWuBi/files/patch-SetLocale.c echo x - gWuBi/files/patch-window.c sed 's/^X//' >gWuBi/files/patch-window.c << 'END-of-gWuBi/files/patch-window.c' X--- window.c.orig Mon Nov 11 10:36:21 2002 X+++ window.c Mon Jul 5 06:51:22 2004 X@@ -89,12 +89,12 @@ X int num_missing_charsets = 0; X char *default_string; X X- setlocale (LC_ALL, strFontLocale); X+ setlocale (LC_CTYPE, strFontLocale); X fontset = XCreateFontSet (dpy, strFontName, &missing_charsets, &num_missing_charsets, &default_string); X X if (num_missing_charsets > 0) { X fprintf (stderr, "Font locale not supported! Using zh_CN\n"); X- setlocale (LC_ALL, "zh_CN"); X+ setlocale (LC_CTYPE, "zh_CN"); X fontset = XCreateFontSet (dpy, "-*-*-medium-r-normal--14-*-*-*-*-*-*-*", &missing_charsets, &num_missing_charsets, &default_string); X if (num_missing_charsets > 0) { X fprintf (stderr, "The following charsets are missing:\n"); END-of-gWuBi/files/patch-window.c echo x - gWuBi/files/patch-xim.c sed 's/^X//' >gWuBi/files/patch-xim.c << 'END-of-gWuBi/files/patch-xim.c' X--- xim.c.orig Sat Nov 16 21:52:43 2002 X+++ xim.c Mon Jul 5 06:43:21 2004 X@@ -671,7 +671,7 @@ X encodings->supported_encodings = zhEncodings; X strcpy (transport, "X/"); X X- ims = IMOpenIM (dpy, IMModifiers, "Xi18n", IMServerWindow, im_window, IMServerName, imname, IMLocale, (strcasecmp (strDefaultLocale, "zh_CN.gb2312")) ? strDefaultLocale : "zh_CN", IMServerTransport, transport, IMInputStyles, input_styles, NULL); X+ ims = IMOpenIM (dpy, IMModifiers, "Xi18n", IMServerWindow, im_window, IMServerName, imname, IMLocale, (strcasecmp (strDefaultLocale, "zh_CN.eucCN")) ? strDefaultLocale : "zh_CN", IMServerTransport, transport, IMInputStyles, input_styles, NULL); X if (ims == (XIMS) NULL) { X fprintf (stderr, "已经存在另一个同名服务程序,因而无法启动输入服务 %s\n", imname); X return False; END-of-gWuBi/files/patch-xim.c exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040705060319.E8246FE14C7>