--- fcitx/Makefile Fri Oct 15 16:08:01 2004 +++ fcitx/Makefile Wed Oct 27 11:53:21 2004 @@ -6,8 +6,7 @@ # PORTNAME= fcitx -PORTVERSION= 2.0.1 -PORTREVISION= 2 +PORTVERSION= 3.0.2 CATEGORIES= chinese x11 MASTER_SITES= http://www.fcitx.org/download/ EXTRACT_SUFX= .tar.bz2 @@ -21,37 +20,13 @@ USE_XLIB= yes USE_REINPLACE= yes USE_ICONV= yes - -post-extract: - cd ${BUILD_WRKSRC}; ${MAKE} clean - -pre-patch:: - @${ECHO_MSG} -.if !defined(FCITX_WITH_CTRL_RSHIFT) - @${ECHO_MSG} "If you don't want to use CTRL+SPACE to active/deactive fcitx," - @${ECHO_MSG} "hit Ctrl-C right now and use \"make FCITX_WITH_CTRL_RSHIFT=yes\"." - @${ECHO_MSG} "Then you can use CTRL+RIGHT_SHIFT to active/deactive fcitx." - @${ECHO_MSG} -.endif - @${ECHO_MSG} +GNU_CONFIGURE= yes post-patch: - @${REINPLACE_CMD} -e 's#usr/share#${LOCALBASE}/share#g' ${WRKSRC}/Makefile ${WRKSRC}/ime.h - @${REINPLACE_CMD} -e 's#usr/bin#${LOCALBASE}/bin#g' ${WRKSRC}/Makefile - @${REINPLACE_CMD} -e 's#zh_CN.GB2312#zh_CN.eucCN#g' ${WRKSRC}/ui.c - @${REINPLACE_CMD} -e 's#zh_CN.gb2312#zh_CN.eucCN#g' ${WRKSRC}/xim.c - @${REINPLACE_CMD} -e 's,,,' ${WRKSRC}/IMdkit/lib/IMConn.c ${WRKSRC}/ui.c -.if defined(FCITX_WITH_CTRL_RSHIFT) - @${REINPLACE_CMD} -e 's/XK_space/XK_Shift_R/g' ${WRKSRC}/xim.c -.endif + @${REINPLACE_CMD} -e 's#zh_CN.GB2312#zh_CN.eucCN#g' ${WRKSRC}/src/xim.c + @${REINPLACE_CMD} -e 's#zh_CN.gb2312#zh_CN.eucCN#g' ${WRKSRC}/src/ui.c ${WRKSRC}/src/tools.c post-install: -.if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR} -.for i in cjkvinput.txt hf_wb98.txt readme.html wb_fh.htm - ${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DOCSDIR} -.endfor -.endif @${CAT} ${PKGMESSAGE} .include --- fcitx/distinfo Tue Feb 17 02:35:10 2004 +++ fcitx/distinfo Wed Oct 27 11:54:08 2004 @@ -1,2 +1,2 @@ -MD5 (fcitx-2.0.1.tar.bz2) = 2f1c710d60e25364ed36223adfc9e7d2 -SIZE (fcitx-2.0.1.tar.bz2) = 1133775 +MD5 (fcitx-3.0.2.tar.bz2) = 506bc9b9366013b4f59ec3b6ee8b4a5e +SIZE (fcitx-3.0.2.tar.bz2) = 2302801 --- fcitx/files/patch-InputWindow.c Fri Oct 15 16:08:01 2004 +++ fcitx/files/patch-InputWindow.c Thu Jan 1 08:00:00 1970 @@ -1,20 +0,0 @@ ---- InputWindow.c.orig Tue Dec 30 15:54:47 2003 -+++ InputWindow.c Thu Oct 14 23:18:49 2004 -@@ -110,7 +110,7 @@ - char str1[] = "Ay中"; - char str2[10]; - char *ps1, *ps2; -- int l1, l2; -+ size_t l1, l2; - - if (!xftFont) - return; -@@ -120,7 +120,7 @@ - ps2 = str2; - ps1 = str1; - -- l1 = iconv (convUTF8, (char **) &ps1, &l1, &ps2, &l2); -+ l1 = iconv (convUTF8, (const char **) &ps1, &l1, &ps2, &l2); - - XftTextExtentsUtf8 (dpy, xftFont, str2, strlen (str2), &extents); - iInputWindowHeight = extents.height * 2 + extents.height / 2 + 8; --- fcitx/files/patch-Makefile Sat Jan 10 04:43:27 2004 +++ fcitx/files/patch-Makefile Thu Jan 1 08:00:00 1970 @@ -1,17 +0,0 @@ ---- Makefile.orig Mon Dec 29 09:10:25 2003 -+++ Makefile Thu Jan 8 23:49:23 2004 -@@ -1,12 +1,12 @@ - CC = gcc - --CFLAGS= -O2 -fno-strength-reduce -Wall -D_USE_XFT -+CFLAGS= -O2 -fno-strength-reduce -DSIGUNUSED=32 -Wall -D_USE_XFT - - INC = `xft-config --cflags` - - SRC = IC.c py.c ime.c InputWindow.c KeyList.c main.c MainWindow.c MyErrorsHandlers.c punc.c pyMapTable.c pyParser.c PYFA.c sp.c SetLocale.c tools.c ui.c wbx.c xim.c - --LIB = `xft-config --libs` -+LIB = `xft-config --libs` -liconv - - OBJ = $(SRC:.c=.o) - --- fcitx/files/patch-MyErrorsHandlers.c Sat Jan 10 04:43:27 2004 +++ fcitx/files/patch-MyErrorsHandlers.c Thu Jan 1 08:00:00 1970 @@ -1,11 +0,0 @@ ---- MyErrorsHandlers.c.orig Wed Jan 7 11:29:34 2004 -+++ MyErrorsHandlers.c Thu Jan 8 23:36:16 2004 -@@ -3,7 +3,7 @@ - #include - #include - #include --#include -+#include - - #include "wbx.h" - #include "py.h" --- fcitx/files/patch-ime.c Sat Jan 10 04:43:27 2004 +++ fcitx/files/patch-ime.c Thu Jan 1 08:00:00 1970 @@ -1,17 +0,0 @@ ---- ime.c.orig Fri Jan 9 21:37:21 2004 -+++ ime.c Fri Jan 9 21:36:57 2004 -@@ -682,11 +682,11 @@ - - void DoPhraseTips (void) - { -- if (!PhraseTips) -- return; -- - char strTemp[MAX_HZ_SAVED * 2 + 1]; - INT8 count; -+ -+ if (!PhraseTips) -+ return; - - strTemp[0] = '\0'; - for (count = 0; count < iHZLastInputCount; count++) --- fcitx/files/patch-punc.c Sat Jan 10 04:43:27 2004 +++ fcitx/files/patch-punc.c Thu Jan 1 08:00:00 1970 @@ -1,16 +0,0 @@ ---- punc.c.orig Mon Dec 29 02:10:25 2003 -+++ punc.c Fri Jan 9 21:37:48 2004 -@@ -85,11 +85,11 @@ - */ - int IsPunc (int iKey) - { -+ int iIndex = 0; -+ - if ( !chnPunc ) - return -1; - -- int iIndex = 0; -- - while (chnPunc[iIndex].ASCII) { - if (chnPunc[iIndex].ASCII == iKey) - return iIndex; --- fcitx/files/patch-py.c Sat Jan 10 04:43:27 2004 +++ fcitx/files/patch-py.c Thu Jan 1 08:00:00 1970 @@ -1,190 +0,0 @@ ---- py.c.orig Thu Jan 8 10:45:51 2004 -+++ py.c Fri Jan 9 21:36:21 2004 -@@ -465,11 +465,11 @@ - iPYInsertPoint--; - - if (!strlen (strFindString)) { -+ char strTemp[MAX_USER_INPUT + 1]; -+ - if (!iPYSelected) - return IRV_CLEAN; - -- char strTemp[MAX_USER_INPUT + 1]; -- - val = strlen (strFindString); - strcpy (strTemp, pySelected[iPYSelected - 1].strPY); - strcat (strTemp, strFindString); -@@ -816,6 +816,9 @@ - char str[2]; - int iVal; - -+ char *pBase = NULL, *pPhrase; -+ int iType; -+ - if (findMap.iMode == PARSE_ERROR || (bSingleHZMode && findMap.iHZCount > 1)) { - uMessageDown = 0; - iCandPageCount = 0; -@@ -886,9 +889,6 @@ - else - PYGetCandWordsBackward (); - -- char *pBase = NULL, *pPhrase; -- int iType; -- - str[1] = '\0'; - uMessageDown = 0; - -@@ -981,11 +981,6 @@ - */ - void PYCreateAuto (void) - { -- strPYAuto[0] = '\0'; -- -- if (findMap.iHZCount == 1) -- return; -- - PYCandIndex candPos; - int val; - int iMatchedLength; -@@ -997,6 +992,11 @@ - char strMap[MAX_WORDS_USER_INPUT * 2 + 1]; - int iCount; - -+ strPYAuto[0] = '\0'; -+ -+ if (findMap.iHZCount == 1) -+ return; -+ - strPYAutoMap[0] = '\0'; - str[2] = '\0'; - -@@ -1126,15 +1126,19 @@ - - char *PYGetCandWord (int iIndex) - { -- if (!iCandWordCount) -- return NULL; -- - char *pBase = NULL, *pPhrase = NULL; - char *pBaseMap = NULL, *pPhraseMap = NULL; - uint *pIndex = NULL; - Bool bAddNewPhrase = True; - int i; - -+ char strHZString[MAX_WORDS_USER_INPUT * 2 + 1]; -+ -+ int iLen; -+ -+ if (!iCandWordCount) -+ return NULL; -+ - if (iIndex > (iCandWordCount - 1)) - iIndex = iCandWordCount - 1; - -@@ -1190,14 +1194,10 @@ - if (pPhrase) - strcat (messageDown[uMessageDown].strMsg, pPhrase); - -- char strHZString[MAX_WORDS_USER_INPUT * 2 + 1]; -- - strcpy (strHZString, pBase); - if (pPhrase) - strcat (strHZString, pPhrase); - -- int iLen; -- - iLen = strlen (strHZString) / 2; - if (iLen == findMap.iHZCount || PYCandWords[iIndex].iWhich == PY_CAND_SYMBOL) { - strPYAuto[0] = '\0'; -@@ -1374,15 +1374,15 @@ - - void PYGetPhraseCandWords (SEARCH_MODE mode) - { -- if (findMap.iHZCount == 1) -- return; -- - PYCandIndex candPos; - char str[3]; - int val, iMatchedLength; - char strMap[MAX_WORDS_USER_INPUT * 2 + 1]; - PyPhrase *phrase; - -+ if (findMap.iHZCount == 1) -+ return; -+ - str[0] = findMap.strMap[0][0]; - str[1] = findMap.strMap[0][1]; - str[2] = '\0'; -@@ -1446,6 +1446,8 @@ - { - char str[MAX_WORDS_USER_INPUT * 2 + 1]; - -+ int i = 0, j, iStart = 0; -+ - strcpy (str, PYFAList[pos.iPYFA].pyBase[pos.iBase].strHZ); - strcat (str, phrase->strPhrase); - if (strPYAuto[0]) { -@@ -1455,8 +1457,6 @@ - } - } - -- int i = 0, j, iStart = 0; -- - switch (phraseOrder) { - case AD_NO: - if (mode == SM_PREV) { -@@ -2111,14 +2111,14 @@ - */ - Bool PYAddUserPhrase (char *phrase, char *map) - { -- //如果短于两个汉字,则不能组成词组 -- if (strlen (phrase) < 4) -- return False; -- - PyPhrase *userPhrase, *newPhrase, *temp; - char str[3]; - int i, j, k, iTemp; - -+ //如果短于两个汉字,则不能组成词组 -+ if (strlen (phrase) < 4) -+ return False; -+ - str[0] = map[0]; - str[1] = map[1]; - str[2] = '\0'; -@@ -2510,11 +2510,15 @@ - */ - INPUT_RETURN_VALUE PYGetLegendCandWords (SEARCH_MODE mode) - { -+ int i, j; -+ -+ PyPhrase *phrase; -+ -+ char strTemp[2]; -+ - if (!strPYLegendSource[0]) - return IRV_TO_PROCESS; - -- int i, j; -- - if (mode == SM_FIRST) { - iLegendCandPageCount = 0; - iLegendCandWordCount = 0; -@@ -2575,8 +2579,6 @@ - } - } - -- PyPhrase *phrase; -- - phrase = pyBaseForLengend->userPhrase->next; - for (i = 0; i < pyBaseForLengend->iUserPhrase; i++) { - if (strlen (strPYLegendSource) == 2) { -@@ -2632,8 +2634,6 @@ - _NEWPAGE: - ; - } -- -- char strTemp[2]; - - uMessageUp = 2; - strcpy (messageUp[0].strMsg, "联想:"); --- fcitx/files/patch-tools-createPYMB.c Wed Oct 20 18:45:41 2004 +++ fcitx/files/patch-tools-createPYMB.c Thu Jan 1 08:00:00 1970 @@ -1,20 +0,0 @@ ---- tools/createPYMB.c.orig Fri Jul 16 15:46:08 2004 -+++ tools/createPYMB.c Wed Oct 20 18:44:54 2004 -@@ -211,6 +211,8 @@ - char strPY[7], strHZ[3], strMap[3]; - int iIndex, iCount, i; - int iBaseCount; -+ int s = 0; -+ int tt = 0; - - head = (_PyStruct *) malloc (sizeof (_PyStruct)); - head->prev = head; -@@ -267,8 +269,6 @@ - strcpy (strPY, pyList->strPY); - iCount = 0; - t = pyList; -- int s = 0; -- int tt = 0; - - while (pyList != head) { - if (!strcmp (strPY, pyList->strPY)) { --- fcitx/files/patch-ui.c Fri Oct 15 16:08:01 2004 +++ fcitx/files/patch-ui.c Thu Jan 1 08:00:00 1970 @@ -1,38 +0,0 @@ ---- ui.c.orig Sun Jan 4 15:42:01 2004 -+++ ui.c Thu Oct 14 23:20:27 2004 -@@ -284,7 +284,7 @@ - XGlyphInfo extents; - char str1[100]; - char *ps, *ps1; -- int l1, l2; -+ size_t l1, l2; - - if (!xftFont) - return 0; -@@ -294,7 +294,7 @@ - ps = str1; - ps1 = str; - -- l1 = iconv (convUTF8, (char **) &str, &l1, &ps, &l2); -+ l1 = iconv (convUTF8, (const char **) &str, &l1, &ps, &l2); - *ps = '\0'; - XftTextExtentsUtf8 (dpy, xftFont, str1, strlen (str1), &extents); - return extents.width; -@@ -323,7 +323,7 @@ - void OutputString (Window window, char *str, int x, int y, XColor color) - { - char strOutput[100] = ""; //该长度应该够用了 -- int l1, l2; -+ size_t l1, l2; - char *ps; - XftColor xftColor; - XRenderColor renderColor; -@@ -339,7 +339,7 @@ - l2 = 99; - ps = strOutput; - -- l1 = iconv (convUTF8, (char **) (&str), &l1, &ps, &l2); -+ l1 = iconv (convUTF8, (const char **) (&str), &l1, &ps, &l2); - - renderColor.red = color.red; - renderColor.green = color.green; --- fcitx/files/patch-wbx.c Sat Jan 10 04:43:27 2004 +++ fcitx/files/patch-wbx.c Thu Jan 1 08:00:00 1970 @@ -1,127 +0,0 @@ ---- wbx.c.orig Thu Jan 8 07:47:50 2004 -+++ wbx.c Fri Jan 9 21:39:35 2004 -@@ -147,11 +147,11 @@ - - fpDict = fopen (strPath, "rt"); - if (fpDict) { -+ int i = 0; -+ - iWBFH = CalculateRecordNumber (fpDict); - wbfh = (WBFH *) malloc (sizeof (WBFH) * iWBFH); - -- int i = 0; -- - for (i = 0; i < iWBFH; i++) { - if (EOF == fscanf (fpDict, "%s\n", wbfh[i].strWBFH)) - break; -@@ -469,11 +469,11 @@ - - char *WBGetCandWord (int iIndex) - { -+ char *pCandWord; -+ - if (!strcmp (strCodeInput, "zzzz")) - return WBGetFHCandWord (iIndex); - -- char *pCandWord; -- - bIsInLegend = False; - - if (iCandWordCount) { -@@ -502,6 +502,10 @@ - - INPUT_RETURN_VALUE WBGetPinyinCandWords (SEARCH_MODE mode) - { -+ //下面将拼音的候选字表转换为五笔的样式 -+ int i; -+ WBRECORD *pWB; -+ - if (mode == SM_FIRST) { - bSingleHZMode = True; - strcpy (strFindString, strCodeInput + 1); -@@ -517,10 +521,6 @@ - else - PYGetCandWords (mode); - -- //下面将拼音的候选字表转换为五笔的样式 -- int i; -- WBRECORD *pWB; -- - for (i = 0; i < iCandWordCount; i++) { - pWB = FindWuBiCode (PYFAList[PYCandWords[i].cand.base.iPYFA].pyBase[PYCandWords[i].cand.base.iBase].strHZ, False); - if (pWB) -@@ -718,11 +718,11 @@ - - int WBFindFirstMatchCode (void) - { -+ int i = 0; -+ - if (!wubiDictHead) - return -1; - -- int i = 0; -- - wubiDictCurrent = wubiDictHead->next; - while (wubiDictCurrent != wubiDictHead) { - if (!CompareWBCode (strCodeInput, wubiDictCurrent->strCode)) { -@@ -742,11 +742,11 @@ - */ - WBRECORD *FindWuBiCode (char *strHZ, Bool bMode) - { -+ WBRECORD *recTemp; -+ - if (!wubiDictHead) - return NULL; - -- WBRECORD *recTemp; -- - recTemp = wubiDictHead->next; - while (recTemp != wubiDictHead) { - if (!strcmp (recTemp->strHZ, strHZ)) { -@@ -1063,11 +1063,13 @@ - - INPUT_RETURN_VALUE WBGetFHCandWords (SEARCH_MODE mode) - { -+ char strTemp[2]; -+ -+ int i; -+ - if (!iWBFH) - return IRV_DO_NOTHING; - -- char strTemp[2]; -- - strTemp[1] = '\0'; - uMessageDown = 0; - -@@ -1093,8 +1095,6 @@ - } - } - -- int i; -- - for (i = 0; i < iMaxCandWord; i++) { - strTemp[0] = i + 1 + '0'; - if (i == 9) -@@ -1139,6 +1139,10 @@ - - Bool WBPhraseTips (char *strPhrase) - { -+ //首先要判断是不是已经在词库中 -+ WBRECORD *recTemp = NULL; -+ INT8 i; -+ - if (!wubiDictHead) - return False; - -@@ -1149,10 +1153,6 @@ - //如果strPhrase只有一个汉字,这个工作也不需要了 - if (strlen (strPhrase) < 4) - return False; -- -- //首先要判断是不是已经在词库中 -- WBRECORD *recTemp = NULL; -- INT8 i; - - for (i = 0; i < (strlen (strPhrase) - 2); i += 2) { - recTemp = wubiDictHead->next; --- fcitx/files/patch-xim.c Fri Oct 15 16:08:01 2004 +++ fcitx/files/patch-xim.c Thu Jan 1 08:00:00 1970 @@ -1,11 +0,0 @@ ---- xim.c.orig Tue Jan 6 14:12:11 2004 -+++ xim.c Thu Oct 14 23:21:07 2004 -@@ -336,7 +336,7 @@ - char *ps; - - if (bIsUtf8) { -- int l1, l2; -+ size_t l1, l2; - - ps = strOutput; - l1 = strlen (strHZ); --- fcitx/pkg-message Tue Feb 17 02:35:10 2004 +++ fcitx/pkg-message Wed Oct 20 11:06:23 2004 @@ -1,6 +1,6 @@ ------------------------------------------------ -Remember to set environment varible XMODIFIERS: - csh/tcsh: setenv XMODIFIERS @im=fcitx - sh/bash: export XMODIFIERS='@im=fcitx' -and set LANG, LC_CTYPE to zh_CN.eucCN. ------------------------------------------------ +****************************************************** +* Remember to set environment varible XMODIFIERS: * +* csh/tcsh: setenv XMODIFIERS @im=fcitx * +* sh/bash: export XMODIFIERS='@im=fcitx' * +* and set LANG, LC_CTYPE to zh_CN.eucCN. * +****************************************************** --- fcitx/pkg-plist Tue Feb 17 02:35:10 2004 +++ fcitx/pkg-plist Wed Oct 27 12:44:35 2004 @@ -1,11 +1,20 @@ +bin/createPYMB bin/fcitx -share/fcitx/punc.mb -share/fcitx/pybase.mb -share/fcitx/pyphrase.mb -share/fcitx/wbx.mb -@dirrm share/fcitx -%%PORTDOCS%%%%DOCSDIR%%/cjkvinput.txt -%%PORTDOCS%%%%DOCSDIR%%/hf_wb98.txt -%%PORTDOCS%%%%DOCSDIR%%/readme.html -%%PORTDOCS%%%%DOCSDIR%%/wb_fh.htm -%%PORTDOCS%%@dirrm %%DOCSDIR%% +bin/mb2txt +bin/txt2mb +%%DATADIR%%/data/cj.mb +%%DATADIR%%/data/erbi.mb +%%DATADIR%%/data/punc.mb +%%DATADIR%%/data/py.mb +%%DATADIR%%/data/pySym.mb +%%DATADIR%%/data/pybase.mb +%%DATADIR%%/data/pyphrase.mb +%%DATADIR%%/data/sp.dat +%%DATADIR%%/data/tables.conf +%%DATADIR%%/data/wbx.mb +@dirrm %%DATADIR%%/data +@dirrm %%DATADIR%% +%%DOCSDIR%%/cjkvinput.txt +%%DOCSDIR%%/fcitx3.pdf +%%DOCSDIR%%/wb_fh.htm +@dirrm %%DOCSDIR%%