summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMamoru Komachi <usata@gentoo.org>2004-06-21 15:51:56 +0000
committerMamoru Komachi <usata@gentoo.org>2004-06-21 15:51:56 +0000
commitefb983f7d16186b3d3ec75e2ba5e78e76f5ec003 (patch)
treefc6637acb747f072a111dd44260e800bd825f260 /app-i18n/xcin
parentclean unneeded things in a native-uclibc envionment. Added dep of gzip and glibc (diff)
downloadhistorical-efb983f7d16186b3d3ec75e2ba5e78e76f5ec003.tar.gz
historical-efb983f7d16186b3d3ec75e2ba5e78e76f5ec003.tar.bz2
historical-efb983f7d16186b3d3ec75e2ba5e78e76f5ec003.zip
Applied libchewing patch. Special thanks to Palatis <palatis@gentoo.org.tw> and Benny Chuang <bennyc@gentoo.org>, closing bug #52133
Diffstat (limited to 'app-i18n/xcin')
-rw-r--r--app-i18n/xcin/ChangeLog9
-rw-r--r--app-i18n/xcin/Manifest14
-rw-r--r--app-i18n/xcin/files/digest-xcin-2.5.3_pre31
-rw-r--r--app-i18n/xcin/files/xcin-2.5.2.3-gentoo.patch (renamed from app-i18n/xcin/files/xcin-gentoo.patch)0
-rw-r--r--app-i18n/xcin/files/xcin-2.5.3_pre2-gentoo.patch (renamed from app-i18n/xcin/files/xcin-2.5.3_pre2/gentoo-xcin.patch)0
-rw-r--r--app-i18n/xcin/files/xcin-chewing.diff517
-rw-r--r--app-i18n/xcin/files/xcin-db3.patch13
-rw-r--r--app-i18n/xcin/xcin-2.5.2.3.ebuild6
-rw-r--r--app-i18n/xcin/xcin-2.5.3_pre2.ebuild6
-rw-r--r--app-i18n/xcin/xcin-2.5.3_pre3.ebuild72
10 files changed, 627 insertions, 11 deletions
diff --git a/app-i18n/xcin/ChangeLog b/app-i18n/xcin/ChangeLog
index 3c1145e21528..6cea5e85e308 100644
--- a/app-i18n/xcin/ChangeLog
+++ b/app-i18n/xcin/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-i18n/xcin
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-i18n/xcin/ChangeLog,v 1.7 2004/05/03 10:23:14 dholm Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-i18n/xcin/ChangeLog,v 1.8 2004/06/21 15:51:56 usata Exp $
+
+*xcin-2.5.3_pre3 (22 Jun 2004)
+
+ 22 Jun 2004; Mamoru KOMACHI <usata@gentoo.org>
+ +files/xcin-chewing.diff, +xcin-2.5.3_pre3.ebuild:
+ Applied libchewing patch. Special thanks to Palatis <palatis@gentoo.org.tw>
+ and Benny Chuang <bennyc@gentoo.org>, closing bug #52133
03 May 2004; David Holm <dholm@gentoo.org> xcin-2.5.3_pre2.ebuild:
Added to ~ppc.
diff --git a/app-i18n/xcin/Manifest b/app-i18n/xcin/Manifest
index 5dc38d3fb131..6f6558193959 100644
--- a/app-i18n/xcin/Manifest
+++ b/app-i18n/xcin/Manifest
@@ -1,10 +1,14 @@
-MD5 e0ec0e56a4511cb3e222f8d88e5a4050 ChangeLog 1112
+MD5 e4262920fef8ace6336cbafd63e2fa4a xcin-2.5.3_pre2.ebuild 1538
+MD5 4237aaadc8c181c7b326d19c7239ff21 xcin-2.5.2.3.ebuild 1019
+MD5 e0783caa970677db1d03136ff793a533 ChangeLog 1383
MD5 e92a48548554c80cf90e18df17ff6a82 metadata.xml 156
-MD5 52f9ebc6b3a5515accd67612edf8c5a3 xcin-2.5.2.3.ebuild 1016
-MD5 c1f89641ba139e6cd4f11edc1fb6298e xcin-2.5.3_pre2.ebuild 1543
+MD5 831c57a3c09b7a2a01ca4c02b6fb1054 xcin-2.5.3_pre3.ebuild 1694
MD5 698d94bfd746092fb8e1eda636dba660 files/digest-xcin-2.5.2.3 65
MD5 5aced2b4a30907127ff8090d320e0f8e files/digest-xcin-2.5.3_pre2 147
+MD5 31ddfe2e1c6e6354ab2dec0a41d28bdf files/xcin-2.5.2.3-gentoo.patch 1535
MD5 ef91a9aa450278758e82e712b3296141 files/gentoo-xcinrc 7927
-MD5 31ddfe2e1c6e6354ab2dec0a41d28bdf files/xcin-gentoo.patch 1535
+MD5 aff10d274d928e8d522824906fed2cf1 files/xcin-chewing.diff 14766
+MD5 e7e5e0b30c75b104c2335d6d9c4c1729 files/digest-xcin-2.5.3_pre3 83
+MD5 6e5bc36880a6b30cee3b3670725cb85b files/xcin-db3.patch 439
+MD5 3cff29c7fef9ace734719fe5434e43c1 files/xcin-2.5.3_pre2-gentoo.patch 468
MD5 6e5bc36880a6b30cee3b3670725cb85b files/xcin-2.5.3_pre2-db3.patch 439
-MD5 3cff29c7fef9ace734719fe5434e43c1 files/xcin-2.5.3_pre2/gentoo-xcin.patch 468
diff --git a/app-i18n/xcin/files/digest-xcin-2.5.3_pre3 b/app-i18n/xcin/files/digest-xcin-2.5.3_pre3
new file mode 100644
index 000000000000..812d1f218707
--- /dev/null
+++ b/app-i18n/xcin/files/digest-xcin-2.5.3_pre3
@@ -0,0 +1 @@
+MD5 9afe2b49e46c4442b5fc7f58a3c72113 xcin-2.5.3.pre3-20.10.firefly.src.rpm 1731777
diff --git a/app-i18n/xcin/files/xcin-gentoo.patch b/app-i18n/xcin/files/xcin-2.5.2.3-gentoo.patch
index 1fe84f7664f5..1fe84f7664f5 100644
--- a/app-i18n/xcin/files/xcin-gentoo.patch
+++ b/app-i18n/xcin/files/xcin-2.5.2.3-gentoo.patch
diff --git a/app-i18n/xcin/files/xcin-2.5.3_pre2/gentoo-xcin.patch b/app-i18n/xcin/files/xcin-2.5.3_pre2-gentoo.patch
index 02001d33b594..02001d33b594 100644
--- a/app-i18n/xcin/files/xcin-2.5.3_pre2/gentoo-xcin.patch
+++ b/app-i18n/xcin/files/xcin-2.5.3_pre2-gentoo.patch
diff --git a/app-i18n/xcin/files/xcin-chewing.diff b/app-i18n/xcin/files/xcin-chewing.diff
new file mode 100644
index 000000000000..9bec1dc8c9f9
--- /dev/null
+++ b/app-i18n/xcin/files/xcin-chewing.diff
@@ -0,0 +1,517 @@
+diff -uNrBb xcin.bak/configure xcin/configure
+--- xcin.bak/configure 2004-05-27 19:19:22.000000000 +0800
++++ xcin/configure 2004-05-27 19:20:03.000000000 +0800
+@@ -8601,6 +8601,7 @@
+ src/Cinput/zh_hex/Makefile \
+ src/Cinput/gen_inp/Makefile \
+ src/Cinput/bimsphone/Makefile \
++ src/Cinput/chewing/Makefile \
+ src/util/Makefile \
+ src/util/cin2tab/Makefile \
+ src/util/testprog/Makefile \
+@@ -8751,6 +8752,7 @@
+ src/Cinput/zh_hex/Makefile \
+ src/Cinput/gen_inp/Makefile \
+ src/Cinput/bimsphone/Makefile \
++ src/Cinput/chewing/Makefile \
+ src/util/Makefile \
+ src/util/cin2tab/Makefile \
+ src/util/testprog/Makefile \
+diff -uNrBb xcin.bak/src/Cinput/Makefile.in xcin/src/Cinput/Makefile.in
+--- xcin.bak/src/Cinput/Makefile.in 2001-09-22 18:47:48.000000000 +0800
++++ xcin/src/Cinput/Makefile.in 2004-05-27 19:18:50.000000000 +0800
+@@ -1,4 +1,4 @@
+-SUBSYS = zh_hex gen_inp bimsphone
++SUBSYS = zh_hex gen_inp bimsphone chewing
+ OTHERS = im_comm
+
+ .PHONY: depend subdirs clean distclean install
+diff -uNrBb xcin.bak/src/Cinput/chewing/.depend xcin/src/Cinput/chewing/.depend
+--- xcin.bak/src/Cinput/chewing/.depend 1970-01-01 08:00:00.000000000 +0800
++++ xcin/src/Cinput/chewing/.depend 2004-05-27 19:18:50.000000000 +0800
+@@ -0,0 +1,9 @@
++#
++# PLEASE DON'T EDIT.
++#
++# This is automatically generated from "make depend".
++# You need GCC and perl to generate me.
++#
++
++xcin_chewing.lo: xcin_chewing.c ../../../config.h ../../../src/include/xcintool.h ../../../src/include/module.h
++ @$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(DEFS) $(INC) -c -o $@ xcin_chewing.c
+diff -uNrBb xcin.bak/src/Cinput/chewing/Makefile.in xcin/src/Cinput/chewing/Makefile.in
+--- xcin.bak/src/Cinput/chewing/Makefile.in 1970-01-01 08:00:00.000000000 +0800
++++ xcin/src/Cinput/chewing/Makefile.in 2004-05-27 19:18:50.000000000 +0800
+@@ -0,0 +1,29 @@
++srcdir = @srcdir@
++top_srcdir = @top_srcdir@
++include $(top_srcdir)/Rules
++
++INC = $(xcininc) $(intl_inc) $(x_includes) -I$(top_srcdir)
++LIB = $(xcinlib) -lchewing
++TARGET = chewing.la
++
++SRC = xcin_chewing.c
++OBJ = $(SRC:.c=.lo)
++
++.PHONY: depend clean distclean
++
++all: depend $(TARGET)
++
++$(TARGET): $(OBJ)
++ $(LIBTOOL) --mode=link $(CC) -module -avoid-version -o $(TARGET) \
++ $(OBJ) $(LIB) -rpath $(moddir)
++include .depend
++
++depend:
++ $(Dep_Rule) | $(PERL) $(makedep) $(rules) LC_Rule lo > .depend
++
++clean:
++ rm -f $(OBJ) *.o $(TARGET) core *.a
++distclean: clean
++ rm -rf Makefile .libs
++install: $(TARGET)
++ $(LIBTOOL) --mode=install $(INSTALL_DATA) $(TARGET) $(xcin_modp)
+diff -uNrBb xcin.bak/src/Cinput/chewing/xcin_chewing.c xcin/src/Cinput/chewing/xcin_chewing.c
+--- xcin.bak/src/Cinput/chewing/xcin_chewing.c 1970-01-01 08:00:00.000000000 +0800
++++ xcin/src/Cinput/chewing/xcin_chewing.c 2004-05-27 19:18:50.000000000 +0800
+@@ -0,0 +1,409 @@
++/*
++ this file is the interface between chewing and xcin
++*/
++
++#ifdef HAVE_CONFIG_H
++# include "config.h"
++#endif
++
++#include <chewing/chewingio.h>
++#include <chewing/hash.h>
++/* XXX: #include <chewing/console_chewing.h> */
++#include <chewing/dict.h>
++#include <chewing/zuin.h>
++#include <chewing/char.h>
++#include <string.h>
++
++#include <X11/Xlib.h>
++#include <X11/keysym.h>
++#include "xcintool.h"
++#include "module.h"
++
++#define DBG(msg) \
++ fprintf(stderr, "\033[44;37m" msg "\033[m\n")
++
++// the following keystate masks are defined by xcin
++#define CAPS_MASK (2)
++#define CTRL_MASK (4)
++
++/* statistics symbol required by chewing */
++int lifetime ;
++
++int MakeInpinfo(inpinfo_t *inpinfo, ChewingOutput *pgo) ;
++
++int CallSetConfig(inpinfo_t *inpinfo, ChewingData *pgdata)
++{
++ ConfigData config ;
++ int i ;
++
++ /* config.selectAreaLen = inpinfo->xcin_wlen ;
++ if (config.selectAreaLen == 0)
++ config.selectAreaLen = 80 ; */
++ config.selectAreaLen = 40;
++ // config.maxChiSymbolLen = 22 ;
++ config.maxChiSymbolLen = 16;
++
++ for(i=0; i<9; i++)
++ config.selKey[i] = i + '1' ;
++ config.selKey[9] = '0' ;
++ SetConfig(pgdata, &config) ;
++ return 0 ;
++}
++
++static int
++ChewingInit(void *conf, char *objname, xcin_rc_t *xc)
++{
++ char *cmd[2], kb_type_str[256];
++ ChewingConf *cf = (ChewingConf *)conf ;
++
++ char *prefix = "/usr/share/chewing";
++
++ cmd[0] = objname ;
++ cmd[1] = "KB_TYPE" ;
++ kb_type_str[0] = '\0' ;
++ get_resource(xc, cmd, kb_type_str, 200, 2) ;
++ cf->kb_type = KBStr2Num(kb_type_str) ;
++
++ cf->inp_cname = strdup("·s»Ĺ­µ") ;
++ cf->inp_ename = strdup("Chewing") ;
++
++ /* Initialize Chewing */
++ ReadTree(prefix) ;
++ InitChar(prefix) ;
++ InitDict(prefix) ;
++ ReadHash(prefix) ;
++
++ return True ;
++}
++
++static int
++ChewingXimInit(void *conf, inpinfo_t *inpinfo)
++{
++ static char cchBuffer[MAX_PHONE_SEQ_LEN] ;
++ ChewingConf *cf = (ChewingConf *)conf ;
++ int i;
++
++ inpinfo->iccf = (ChewingData *) calloc(1, sizeof(ChewingData)) ;
++
++ InitChewing(inpinfo->iccf, cf) ;
++ CallSetConfig(inpinfo, (ChewingData *) inpinfo->iccf) ;
++
++ inpinfo->lcch = (wch_t *) calloc(MAX_PHONE_SEQ_LEN, sizeof(wch_t)) ;
++ inpinfo->lcch_grouping = (ubyte_t *) calloc(MAX_PHONE_SEQ_LEN, sizeof(ubyte_t) );
++ inpinfo->cch = cchBuffer ; // 2000.6.30
++
++ inpinfo->inp_cname = cf->inp_cname;
++ inpinfo->inp_ename = cf->inp_ename;
++ inpinfo->area3_len = 2 * ZUIN_SIZE + 4;
++ inpinfo->guimode = GUIMOD_LISTCHAR | GUIMOD_SELKEYSPOT;
++ inpinfo->keystroke_len = 0;
++ inpinfo->s_keystroke = (wch_t *) calloc(3 + MAX_PHRASE_LEN, sizeof(wch_t)) ;
++
++ inpinfo->mcch = (wch_t *) calloc( MAX_CHOICE_BUF, sizeof(wch_t) );
++ inpinfo->mcch_grouping = (ubyte_t *) calloc( MAX_SELKEY, sizeof(ubyte_t) );
++ inpinfo->n_mcch = 0;
++
++ inpinfo->n_lcch = 0;
++ inpinfo->edit_pos = 0;
++ inpinfo->cch_publish.wch = (wchar_t)0;
++
++ // check_winsize(inpinfo, iccf);
++ // [yet] check winsize is under construction.
++
++ inpinfo->n_selkey = 10;
++ inpinfo->s_selkey = (wch_t *) calloc( MAX_SELKEY, sizeof(wch_t) );
++
++ for (i=0; i<9; i++) {
++ inpinfo->s_selkey[i].wch = (wchar_t)0;
++ inpinfo->s_selkey[i].s[0] = i + '1';
++ }
++ inpinfo->s_selkey[9].wch = (wchar_t)0;
++ inpinfo->s_selkey[9].s[0] = '0';
++
++ return True ;
++}
++
++void CommitString(inpinfo_t *inpinfo, ChewingOutput *pgo)
++{
++ int i ;
++
++ memset(inpinfo->cch, 0, sizeof(wch_t)*MAX_PHONE_SEQ_LEN) ;
++ for(i=0; i<pgo->nCommitStr; i++)
++ strcat(inpinfo->cch, (const char *)pgo->commitStr[i].s) ;
++}
++
++static unsigned int
++ChewingXimEnd(void *conf, inpinfo_t *inpinfo)
++{
++ ChewingOutput gOut ;
++ int rtn ;
++
++ /* if preedit exists, commit the string */
++ OnKeyEnter(inpinfo->iccf, &gOut) ;
++
++ rtn = MakeInpinfo(inpinfo, &gOut) ;
++ free(inpinfo->iccf);
++ free(inpinfo->s_keystroke);
++ free(inpinfo->lcch);
++ free(inpinfo->mcch);
++ free(inpinfo->mcch_grouping);
++
++ inpinfo->iccf = NULL;
++ inpinfo->s_keystroke = NULL;
++ inpinfo->lcch = NULL;
++
++ // under construction
++ return rtn ;
++}
++
++void ShowChoose(inpinfo_t *inpinfo, ChoiceInfo *pci, ChewingOutput *pgo)
++{
++ int i,no,k,len;
++
++ // for new xcin, there is no need to modify the lcch buffer
++ // instead, we put phrase to choose in mcch
++ no = pci->pageNo * pci->nChoicePerPage;
++ len = 0;
++
++ for(i=0;i<pci->nChoicePerPage; no++,i++) {
++
++ // in the last page, no will exceed nTotalChoice
++ if( no >= pci->nTotalChoice )
++ break;
++ // for each char in the phrase, copy to mcch
++ for(k=0; pci->totalChoiceStr[no][k]!='\0'; k+=2)
++ memcpy(inpinfo->mcch[len++].s, &(pci->totalChoiceStr[no][k]), 2) ;
++ // set grouping to the length of the phrase
++ inpinfo->mcch_grouping[i+1] = k/2;
++ }
++ // i stores how many choices are available
++ inpinfo->mcch_grouping[0] = i;
++
++ // set pgstate according to pci->pageNo & pci->nPage
++ if( pci->nPage == 1) {
++ inpinfo->mcch_pgstate = MCCH_ONEPG;
++ }
++ else {
++ if( pci->pageNo == 0 )
++ inpinfo->mcch_pgstate = MCCH_BEGIN;
++ else if( pci->pageNo == pci->nPage - 1)
++ inpinfo->mcch_pgstate = MCCH_END;
++ else
++ inpinfo->mcch_pgstate = MCCH_MIDDLE;
++ }
++
++ inpinfo->n_mcch = len ;
++}
++
++void ShowText(inpinfo_t *inpinfo, ChewingOutput *pgo)
++{
++ memset(inpinfo->lcch, 0, sizeof(wch_t)*MAX_PHONE_SEQ_LEN) ;
++ memcpy(inpinfo->lcch, pgo->chiSymbolBuf, sizeof(wch_t) * pgo->chiSymbolBufLen) ;
++ inpinfo->n_lcch = pgo->chiSymbolBufLen ;
++}
++
++void ShowInterval(inpinfo_t *inpinfo, ChewingOutput *pgo)
++{
++ int i, k, begin, len, count, nGroup ;
++ int label[MAX_PHONE_SEQ_LEN] ;
++
++ if( pgo->chiSymbolBufLen == 0) {
++ inpinfo->lcch_grouping[0] = 0 ;
++ return ;
++ }
++
++ // set label
++ for(count=0; count<pgo->chiSymbolBufLen; count++)
++ label[count] = count ;
++
++ for(i=0; i<pgo->nDispInterval; i++) {
++ len = pgo->dispInterval[i].to - pgo->dispInterval[i].from ;
++
++ if( len > 1) {
++ for(k=pgo->dispInterval[i].from; k<pgo->dispInterval[i].to; k++)
++ label[k] = count ;
++ count++ ;
++ }
++ }
++
++ // begin to set lcch_grouping by the label
++ nGroup = 0 ;
++ begin = 0 ;
++ for(i=1; i<pgo->chiSymbolBufLen; i++) {
++ if( label[i] != label[begin] ) {
++ inpinfo->lcch_grouping[++nGroup] = ( i - begin ) ;
++ begin = i ;
++ }
++ }
++ inpinfo->lcch_grouping[++nGroup] = ( i - begin ) ;
++ inpinfo->lcch_grouping[0] = nGroup ;
++}
++
++void ShowStateAndZuin(inpinfo_t *inpinfo, ChewingOutput *pgo)
++{
++ int i, a , len = 0;
++ memset( inpinfo->s_keystroke, 0, sizeof(wch_t)*(3 + MAX_PHRASE_LEN)) ;
++ if(pgo->bShowMsg) {
++ memcpy( inpinfo->s_keystroke, pgo->showMsg, sizeof(wch_t)*pgo->showMsgLen) ;
++ inpinfo->keystroke_len = pgo->showMsgLen ;
++ }
++ else {
++ if(pgo->bChiSym)
++ strcpy( (char *)inpinfo->s_keystroke[0].s, "¤¤") ;
++ else
++ strcpy( (char *)inpinfo->s_keystroke[0].s, "­^") ;
++
++ inpinfo->s_keystroke[1].s[0] = ' ' ;
++ for(i=0,a=2; i<ZUIN_SIZE; i++)
++ if(pgo->zuinBuf[i].s[0] != '\0') {
++ inpinfo->s_keystroke[a++].wch = pgo->zuinBuf[i].wch ;
++ ++ len;
++ }
++ inpinfo->keystroke_len = len;
++ }
++}
++
++void SetCursor(inpinfo_t *inpinfo, ChewingOutput *pgo)
++{
++ inpinfo->edit_pos = pgo->chiSymbolCursor;
++}
++
++int MakeInpinfo(inpinfo_t *inpinfo, ChewingOutput *pgo)
++{
++ int rtnValue = 0 ;
++
++ if(pgo->keystrokeRtn & KEYSTROKE_ABSORB)
++ rtnValue |= IMKEY_ABSORB ;
++ if(pgo->keystrokeRtn & KEYSTROKE_IGNORE)
++ rtnValue |= IMKEY_IGNORE ;
++ if(pgo->keystrokeRtn & KEYSTROKE_BELL)
++ rtnValue |= IMKEY_BELL ;
++ if(pgo->keystrokeRtn & KEYSTROKE_COMMIT) {
++ rtnValue |= IMKEY_COMMIT ;
++ CommitString(inpinfo, pgo) ;
++ }
++
++ if(pgo->pci->nPage != 0) { // in selection mode
++ ShowChoose(inpinfo,pgo->pci,pgo) ;
++ inpinfo->guimode &= ~GUIMOD_LISTCHAR;
++ }
++ else { // not in selection mode
++ ShowText(inpinfo, pgo) ;
++ ShowInterval(inpinfo, pgo) ; // kpchen 2000.2.9
++ inpinfo->guimode |= GUIMOD_LISTCHAR;
++ }
++ ShowStateAndZuin(inpinfo, pgo) ;
++ SetCursor(inpinfo, pgo) ;
++ return rtnValue ;
++}
++
++static unsigned int
++ChewingKeystroke(void *conf, inpinfo_t *inpinfo, keyinfo_t *keyinfo)
++{
++ KeySym keysym = keyinfo->keysym;
++ ChewingOutput gOut ;
++ int rtn ;
++ static KeySym last_key = 0;
++
++ // set Chinese / English mode by keystate
++ if( keyinfo->keystate & CAPS_MASK ) { // uppercase
++ SetChiEngMode( inpinfo->iccf, SYMBOL_MODE);
++ }
++ else { // lower case
++ SetChiEngMode( inpinfo->iccf, CHINESE_MODE);
++ }
++
++
++ // check no ctrl key was pressed
++ if(keyinfo->keystate >= 0 && !(keyinfo->keystate & CTRL_MASK) ) {
++ switch(keysym) {
++ case XK_Escape:
++ OnKeyEsc(inpinfo->iccf, &gOut) ;
++ break ;
++ case XK_Return:
++ OnKeyEnter(inpinfo->iccf, &gOut) ;
++ inpinfo->n_mcch = 0;
++ break ;
++ case XK_Delete:
++ OnKeyDel(inpinfo->iccf, &gOut) ;
++ break ;
++ case XK_BackSpace:
++ OnKeyBackspace(inpinfo->iccf, &gOut) ;
++ break ;
++ case XK_Up:
++ OnKeyUp(inpinfo->iccf, &gOut);
++ break ;
++ case XK_Down:
++ OnKeyDown(inpinfo->iccf, &gOut) ;
++ break ;
++ case XK_Left:
++ OnKeyLeft(inpinfo->iccf, &gOut) ;
++ break ;
++ case XK_Right:
++ OnKeyRight(inpinfo->iccf, &gOut) ;
++ break ;
++ case XK_Home:
++ OnKeyHome(inpinfo->iccf, &gOut);
++ break;
++ case XK_End:
++ OnKeyEnd(inpinfo->iccf, &gOut);
++ break;
++
++ case XK_Tab:
++ if( last_key == XK_Tab) // double click TAB
++ OnKeyDblTab(inpinfo->iccf, &gOut);
++ else
++ OnKeyTab(inpinfo->iccf, &gOut) ;
++ break ;
++ case XK_Caps_Lock:
++ OnKeyCapslock(inpinfo->iccf, &gOut) ;
++ break ;
++ default:
++ OnKeyDefault(inpinfo->iccf,keysym,&gOut ) ;
++ break ;
++ }
++ }
++
++ else if(keyinfo->keystate & CTRL_MASK) { // Ctrl-key Mask
++ // We need to fill the 'gOut' variable for output.
++ if(keysym <= '9' && keysym >= '0')
++ OnKeyCtrlNum(inpinfo->iccf,keysym,&gOut) ;
++ else
++ OnKeyCtrlDefault(inpinfo->iccf,&gOut) ;
++ }
++
++
++ last_key = keysym;
++ rtn = MakeInpinfo(inpinfo, &gOut) ;
++ return rtn ;
++}
++
++static int
++ChewingShowKeystroke(void *conf, simdinfo_t *simdinfo)
++{
++ simdinfo->s_keystroke = NULL;
++ return False;
++}
++
++static char zh_chewing_comments[] =
++"This is a very smart phonetic input method module.\n"
++"By Lu-chuan Kung <lckung@iis.sinica.edu.tw> and\n"
++"And Kang-pen Chen <kpchen@iis.sinica.edu.tw>.\n";
++
++static char *zh_chewing_valid_objname[] = { "chewing", NULL };
++
++module_t module_ptr = {
++ { MTYPE_IM,
++ "zh_chewing", /* name */
++ MODULE_VERSION, /* version */
++ zh_chewing_comments }, /* comments */
++ zh_chewing_valid_objname, /* valid_objname */
++ sizeof(ChewingConf), /* conf_size */
++ ChewingInit, /* init */
++ ChewingXimInit, /* xim_init */
++ ChewingXimEnd, /* xim_end */
++ ChewingKeystroke, /* keystroke */
++ ChewingShowKeystroke, /* show_keystroke */
++ NULL
++};
++
+diff -uNrBb xcin.bak/src/include/module.h xcin/src/include/module.h
+--- xcin.bak/src/include/module.h 2001-10-16 00:21:14.000000000 +0800
++++ xcin/src/include/module.h 2004-05-27 19:18:50.000000000 +0800
+@@ -278,7 +278,7 @@
+
+ /* Quick key phrase: %trigger, %shift, %ctrl, %alt */
+ extern void qphrase_init(xcin_rc_t *xrc, char *phrase_fn);
+-extern char *qphrase_str(int ch, int class);
++extern char *qphrase_str(int ch, int _class);
+ extern char *get_qphrase_list(void);
+
+ /* GUI Request registration */
+diff -uNrBb xcin.bak/src/include/xcintool.h xcin/src/include/xcintool.h
+--- xcin.bak/src/include/xcintool.h 2001-11-11 20:50:48.000000000 +0800
++++ xcin/src/include/xcintool.h 2004-05-27 19:18:50.000000000 +0800
+@@ -197,12 +197,14 @@
+ };
+
+ /* XCIN global resources. */
++#ifndef __USE_GNU
+ typedef struct {
+ char *lc_ctype;
+ char *lc_messages;
+ char *encoding;
+ int encid, locid;
+ } locale_t;
++#endif
+
+ typedef struct {
+ int argc; /* Command line arguement list */
diff --git a/app-i18n/xcin/files/xcin-db3.patch b/app-i18n/xcin/files/xcin-db3.patch
new file mode 100644
index 000000000000..416e737df281
--- /dev/null
+++ b/app-i18n/xcin/files/xcin-db3.patch
@@ -0,0 +1,13 @@
+diff -uNrbB xcin.bak/configure xcin/configure
+--- xcin.bak/configure 2003-09-21 01:20:50.000000000 +0800
++++ xcin/configure 2003-09-21 01:21:01.000000000 +0800
+@@ -7869,7 +7869,7 @@
+ fi
+
+ LIBS="$OLD_LIBS"
+-for f in db db3; do
++for f in db db3 db-3; do
+ echo $ac_n "checking for db_create in -l$f""... $ac_c" 1>&6
+ echo "configure:7875: checking for db_create in -l$f" >&5
+ ac_lib_var=`echo $f'_'db_create | sed 'y%./+-%__p_%'`
+
diff --git a/app-i18n/xcin/xcin-2.5.2.3.ebuild b/app-i18n/xcin/xcin-2.5.2.3.ebuild
index 01e1063b944e..55d53428b6be 100644
--- a/app-i18n/xcin/xcin-2.5.2.3.ebuild
+++ b/app-i18n/xcin/xcin-2.5.2.3.ebuild
@@ -1,6 +1,8 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-i18n/xcin/xcin-2.5.2.3.ebuild,v 1.6 2004/05/03 10:23:14 dholm Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-i18n/xcin/xcin-2.5.2.3.ebuild,v 1.7 2004/06/21 15:51:56 usata Exp $
+
+inherit eutils
IUSE="nls"
@@ -17,7 +19,7 @@ S=${WORKDIR}/${PN}
src_unpack () {
unpack ${A}
cd ${S}/po
- patch -p0 < ${FILESDIR}/xcin-gentoo.patch || die
+ epatch ${FILESDIR}/${P}-gentoo.patch
}
src_compile() {
diff --git a/app-i18n/xcin/xcin-2.5.3_pre2.ebuild b/app-i18n/xcin/xcin-2.5.3_pre2.ebuild
index 71ccccd575da..86da96c9db33 100644
--- a/app-i18n/xcin/xcin-2.5.3_pre2.ebuild
+++ b/app-i18n/xcin/xcin-2.5.3_pre2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-i18n/xcin/xcin-2.5.3_pre2.ebuild,v 1.9 2004/05/03 10:23:14 dholm Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-i18n/xcin/xcin-2.5.3_pre2.ebuild,v 1.10 2004/06/21 15:51:56 usata Exp $
inherit eutils
@@ -32,8 +32,8 @@ src_unpack() {
# gcc3.2 changed the way we deal with -I. So until the configure script
# is updated we need this hack as a work around.
- EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${PF}/gentoo-xcin.patch
- EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${P}-db3.patch
+ EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${P}-gentoo.patch
+ EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${PN}-db3.patch
}
src_compile() {
diff --git a/app-i18n/xcin/xcin-2.5.3_pre3.ebuild b/app-i18n/xcin/xcin-2.5.3_pre3.ebuild
new file mode 100644
index 000000000000..7f4100f9b356
--- /dev/null
+++ b/app-i18n/xcin/xcin-2.5.3_pre3.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-i18n/xcin/xcin-2.5.3_pre3.ebuild,v 1.1 2004/06/21 15:51:56 usata Exp $
+
+inherit rpm eutils
+
+XCINRPMSRC="${P/_/.}-20.10.firefly.src.rpm"
+
+DESCRIPTION="Chinese X Input Method"
+HOMEPAGE="http://xcin.linux.org.tw/
+ http://firefly.idv.tw/test/Forum.php?Board=1"
+SRC_URI="http://firefly.idv.tw/setfont-xft/Fedora/Core_1/SRPMS/${XCINRPMSRC}"
+
+LICENSE="XCIN"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="nls unicode"
+
+DEPEND="dev-libs/libchewing
+ nls? ( sys-devel/gettext )
+ >=app-i18n/libtabe-0.2.5
+ unicode? ( media-fonts/hkscs-ming )"
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ rpm_src_unpack
+
+ cd ${S}
+ epatch ${FILESDIR}/xcin-chewing.diff
+
+ # gcc3.2 changed the way we deal with -I. So until the configure script
+ # is updated we need this hack as a work around.
+ EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${P/pre3/pre2}-gentoo.patch
+ EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${PN}-db3.patch
+
+ # begin firefly unicode patches
+ cd ${S}
+ for I in ${WORKDIR}/*.patch;do
+ epatch ${I}
+ done
+
+ # paar's fix
+ mv ${S}/xcin/cin/big5/* ${S}/cin/big5/
+}
+
+src_compile() {
+ econf \
+ --with-xcin-rcdir=/etc \
+ --with-xcin-dir=/usr/lib/X11/xcin25 \
+ --with-db-lib=/usr/lib \
+ --with-tabe-inc=/usr/include/tabe \
+ --with-tabe-lib=/usr/lib || die "./configure failed"
+ emake -j1 || die
+}
+
+src_install() {
+ make \
+ prefix=${D}/usr \
+ program_prefix=${D} \
+ install || die
+ dodir /etc
+
+ insinto /etc
+ doins ${FILESDIR}/xcinrc
+ dodoc doc/*
+
+ for docdir in doc/En doc/En/internal doc/history doc/internal doc/modules; do
+ docinto ${docdir#doc/}
+ dodoc ${docdir}/*
+ done
+}