diff options
author | pav <pav@FreeBSD.org> | 2004-01-10 04:43:27 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-01-10 04:43:27 +0800 |
commit | 06d7423a402e609a36d40b4fc19aa2d91bd38491 (patch) | |
tree | 4aff4f835f6ffc17e62de4a0192b0e56c02c6a36 | |
parent | a3e7e0cb35827742c8344c7729edd6ee29136e17 (diff) | |
download | freebsd-ports-gnome-06d7423a402e609a36d40b4fc19aa2d91bd38491.tar.gz freebsd-ports-gnome-06d7423a402e609a36d40b4fc19aa2d91bd38491.tar.zst freebsd-ports-gnome-06d7423a402e609a36d40b4fc19aa2d91bd38491.zip |
- Update to 2.0.1
PR: ports/61135
Submitted by: Dryice Liu <dryice@liu.com.cn> (maintainer)
-rw-r--r-- | chinese/fcitx/Makefile | 12 | ||||
-rw-r--r-- | chinese/fcitx/distinfo | 2 | ||||
-rw-r--r-- | chinese/fcitx/files/patch-IMdkit::lib::Makefile | 11 | ||||
-rw-r--r-- | chinese/fcitx/files/patch-Makefile | 17 | ||||
-rw-r--r-- | chinese/fcitx/files/patch-MyErrorsHandlers.c | 11 | ||||
-rw-r--r-- | chinese/fcitx/files/patch-ime.c | 17 | ||||
-rw-r--r-- | chinese/fcitx/files/patch-punc.c | 16 | ||||
-rw-r--r-- | chinese/fcitx/files/patch-py.c | 190 | ||||
-rw-r--r-- | chinese/fcitx/files/patch-wbx.c | 127 | ||||
-rw-r--r-- | chinese/fcitx/pkg-plist | 2 |
10 files changed, 377 insertions, 28 deletions
diff --git a/chinese/fcitx/Makefile b/chinese/fcitx/Makefile index 01191e686ad4..a0d23e459901 100644 --- a/chinese/fcitx/Makefile +++ b/chinese/fcitx/Makefile @@ -6,9 +6,9 @@ # PORTNAME= fcitx -PORTVERSION= 1.8.5 +PORTVERSION= 2.0.1 CATEGORIES= chinese x11 -MASTER_SITES= http://www.fcitx.org/ +MASTER_SITES= http://www.fcitx.org/download/ EXTRACT_SUFX= .tar.bz2 MAINTAINER= dryice@liu.com.cn @@ -20,13 +20,15 @@ USE_BZIP2= yes USE_XLIB= yes USE_REINPLACE= yes +post-extract: + cd ${BUILD_WRKSRC}; ${MAKE} clean + 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.EUC#g' ${WRKSRC}/window.c + @${REINPLACE_CMD} -e 's#zh_CN.GB2312#zh_CN.EUC#g' ${WRKSRC}/ui.c @${REINPLACE_CMD} -e 's#zh_CN.gb2312#zh_CN.EUC#g' ${WRKSRC}/xim.c - @${REINPLACE_CMD} -e 's#zh_CN.GBK#zh_CN.EUC#g' ${WRKSRC}/tools.c - @${REINPLACE_CMD} -e 's,<malloc.h>,<stdlib.h>,' ${WRKSRC}/IMdkit/lib/IMConn.c + @${REINPLACE_CMD} -e 's,<malloc.h>,<stdlib.h>,' ${WRKSRC}/IMdkit/lib/IMConn.c ${WRKSRC}/ui.c post-install: @${CAT} ${PKGMESSAGE} diff --git a/chinese/fcitx/distinfo b/chinese/fcitx/distinfo index 5fde9feeafe7..d6631327703d 100644 --- a/chinese/fcitx/distinfo +++ b/chinese/fcitx/distinfo @@ -1 +1 @@ -MD5 (fcitx-1.8.5.tar.bz2) = c2b7c48b906c4812f305fc9f5a605458 +MD5 (fcitx-2.0.1.tar.bz2) = 2f1c710d60e25364ed36223adfc9e7d2 diff --git a/chinese/fcitx/files/patch-IMdkit::lib::Makefile b/chinese/fcitx/files/patch-IMdkit::lib::Makefile deleted file mode 100644 index 694327c9a908..000000000000 --- a/chinese/fcitx/files/patch-IMdkit::lib::Makefile +++ /dev/null @@ -1,11 +0,0 @@ ---- IMdkit/lib/Makefile.orig Sun Apr 13 03:49:17 2003 -+++ IMdkit/lib/Makefile Sun Apr 13 03:49:28 2003 -@@ -2,7 +2,7 @@ - CC = gcc - #CFLAGS = -c -O2 -fno-strength-reduce -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE=500L -D_BSD_SOURCE -D_SVID_SOURCE -DFUNCPROTO=15 -DNARROWPROTO -DUNIXCONN -DTCPCONN -DXIM_t -DTRANS_SERVER - CFLAGS = -c -O2 -fno-strength-reduce -DXIM_t -DTRANS_SERVER --INC = -I../include -I/usr/X11R6/include -+INC = -I../include -I${X11BASE}/include - - - SRC = IMConn.c IMValues.c IMMethod.c FrameMgr.c i18nIMProto.c i18nAttr.c i18nMethod.c i18nUtil.c i18nPtHdr.c i18nIc.c i18nClbk.c i18nX.c diff --git a/chinese/fcitx/files/patch-Makefile b/chinese/fcitx/files/patch-Makefile index 759a32fd0ab2..84d41071199e 100644 --- a/chinese/fcitx/files/patch-Makefile +++ b/chinese/fcitx/files/patch-Makefile @@ -1,18 +1,17 @@ ---- Makefile.orig Thu Jan 1 21:11:24 2004 -+++ Makefile Thu Jan 1 21:14:40 2004 +--- 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 -+CFLAGS= -O2 -fno-strength-reduce -DSIGUNUSED=32 +-CFLAGS= -O2 -fno-strength-reduce -Wall -D_USE_XFT ++CFLAGS= -O2 -fno-strength-reduce -DSIGUNUSED=32 -Wall -D_USE_XFT --INC = -I/usr/X11R6/include -I. -+INC = -I${LOCALBASE}/include -I${X11BASE}/include -I. + INC = `xft-config --cflags` - SRC = main.c ime.c KeyList.c AddPhraseWindow.c IC.c InputWindow.c MainWindow.c MyErrorsHandlers.c punc.c py.c PYFA.c pyParser.c pyMapTable.c SetLocale.c tools.c wbx.c window.c xim.c qw.c sp.c py-2.c + 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 = -L/usr/X11R6/lib -lX11 -+LIB = -L${LOCALBASE}/lib -L${X11BASE}/lib -lX11 -liconv +-LIB = `xft-config --libs` ++LIB = `xft-config --libs` -liconv OBJ = $(SRC:.c=.o) diff --git a/chinese/fcitx/files/patch-MyErrorsHandlers.c b/chinese/fcitx/files/patch-MyErrorsHandlers.c new file mode 100644 index 000000000000..d03358bca634 --- /dev/null +++ b/chinese/fcitx/files/patch-MyErrorsHandlers.c @@ -0,0 +1,11 @@ +--- MyErrorsHandlers.c.orig Wed Jan 7 11:29:34 2004 ++++ MyErrorsHandlers.c Thu Jan 8 23:36:16 2004 +@@ -3,7 +3,7 @@ + #include <stdio.h> + #include <signal.h> + #include <stdlib.h> +-#include <wait.h> ++#include <sys/wait.h> + + #include "wbx.h" + #include "py.h" diff --git a/chinese/fcitx/files/patch-ime.c b/chinese/fcitx/files/patch-ime.c new file mode 100644 index 000000000000..b30ba814e04d --- /dev/null +++ b/chinese/fcitx/files/patch-ime.c @@ -0,0 +1,17 @@ +--- 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++) diff --git a/chinese/fcitx/files/patch-punc.c b/chinese/fcitx/files/patch-punc.c new file mode 100644 index 000000000000..714bde76eb48 --- /dev/null +++ b/chinese/fcitx/files/patch-punc.c @@ -0,0 +1,16 @@ +--- 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; diff --git a/chinese/fcitx/files/patch-py.c b/chinese/fcitx/files/patch-py.c new file mode 100644 index 000000000000..749568b062b5 --- /dev/null +++ b/chinese/fcitx/files/patch-py.c @@ -0,0 +1,190 @@ +--- 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, "联想:"); diff --git a/chinese/fcitx/files/patch-wbx.c b/chinese/fcitx/files/patch-wbx.c new file mode 100644 index 000000000000..b8ab2370bcc6 --- /dev/null +++ b/chinese/fcitx/files/patch-wbx.c @@ -0,0 +1,127 @@ +--- 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; diff --git a/chinese/fcitx/pkg-plist b/chinese/fcitx/pkg-plist index ccecd328acc9..9f19e21232f0 100644 --- a/chinese/fcitx/pkg-plist +++ b/chinese/fcitx/pkg-plist @@ -1,8 +1,6 @@ bin/fcitx share/fcitx/punc.mb -share/fcitx/pySym.mb share/fcitx/pybase.mb share/fcitx/pyphrase.mb -share/fcitx/sp.dat share/fcitx/wbx.mb @dirrm share/fcitx |