summaryrefslogtreecommitdiff
path: root/chinese/oxim
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2006-09-09 16:36:59 +0000
committerRong-En Fan <rafan@FreeBSD.org>2006-09-09 16:36:59 +0000
commit3698e511fc92879c3cf9cc95e4ddecfe6ae76ff7 (patch)
treeba0f7097bec95a0e9f0ac90369e7a9578a6ab634 /chinese/oxim
parent- Update to version 0.4.0 RC4 (compatible with current allegro: version 4.2.0). (diff)
- Update to 1.1.0
As noted in Makefile, I disabled Qt module and GUI setup tool due to oxim uses some files that only exist in Debian package. - Add few mirrors and correct the path
Notes
Notes: svn path=/head/; revision=172643
Diffstat (limited to 'chinese/oxim')
-rw-r--r--chinese/oxim/Makefile16
-rw-r--r--chinese/oxim/distinfo6
-rw-r--r--chinese/oxim/files/patch-Makefile.in11
-rw-r--r--chinese/oxim/files/patch-src-modules-chewing-chewing.c105
-rw-r--r--chinese/oxim/pkg-plist11
5 files changed, 75 insertions, 74 deletions
diff --git a/chinese/oxim/Makefile b/chinese/oxim/Makefile
index 2a74e842c1c9..e79640695914 100644
--- a/chinese/oxim/Makefile
+++ b/chinese/oxim/Makefile
@@ -6,11 +6,12 @@
#
PORTNAME= oxim
-PORTVERSION= 1.0.3
-PORTREVISION= 1
+PORTVERSION= 1.1.0
CATEGORIES= chinese textproc
-MASTER_SITES= ftp://apt.nc.hcc.edu.tw/pub/mirror/opendesktop.org.tw/OXIM/Source/ \
- ftp://ftp4.tnc.edu.tw/pub3/opendesktop-tw/odp/ \
+MASTER_SITES= ftp://ftp.opendesktop.org.tw/odp/OXIM/Source/ \
+ ftp://apt.nc.hcc.edu.tw/pub/mirror/opendesktop.org.tw/OXIM/Source/ \
+ ftp://ftp4.tnc.edu.tw/pub3/opendesktop-tw/odp/OXIM/Source/ \
+ ftp://140.111.66.34/odp/OXIM/Source/ \
ftp://140.111.128.66/odp/OXIM/Source/
MAINTAINER= rafan@FreeBSD.org
@@ -37,6 +38,9 @@ CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" \
CONFIGURE_ARGS+=--disable-bimsphone-module \
--disable-static \
--with-conf-dir=${TARGETDIR}/etc/${PORTNAME}
+# oxim requires qinputcontextplugin.h which only exists in Debian package
+CONFIGURE_ARGS+=--disable-qt-immodule \
+ --disable-setup-tool
.include <bsd.port.pre.mk>
@@ -80,6 +84,10 @@ PLIST_SUB+= NLS=""
#PLIST_SUB+= NLS="@comment "
#.endif
+.if ${OSVERSION} < 500000
+BROKEN= lack of stdint.h
+.endif
+
post-patch:
${REINPLACE_CMD} 's|%%PREFIX%%|${TARGETDIR}|' \
${WRKSRC}/src/gtk-immodule/gtkintl.h
diff --git a/chinese/oxim/distinfo b/chinese/oxim/distinfo
index 95fc4223230d..56b942f71b13 100644
--- a/chinese/oxim/distinfo
+++ b/chinese/oxim/distinfo
@@ -1,3 +1,3 @@
-MD5 (oxim-1.0.3.tar.gz) = bb4e2956d5103296d0d7ca583a8578ec
-SHA256 (oxim-1.0.3.tar.gz) = 848c19b159ea9fe2206bdcb0cb69af6ed01e1fe49b19d5cd532c5bf1c27616da
-SIZE (oxim-1.0.3.tar.gz) = 3053931
+MD5 (oxim-1.1.0.tar.gz) = 9a3a9eacb3a990a99ceedf1f11438be3
+SHA256 (oxim-1.1.0.tar.gz) = 920cea2badf5dc8254fa11bbfef77c0542c3a5e976673b4d8422690856e45863
+SIZE (oxim-1.1.0.tar.gz) = 1868865
diff --git a/chinese/oxim/files/patch-Makefile.in b/chinese/oxim/files/patch-Makefile.in
new file mode 100644
index 000000000000..a2ae28c47d01
--- /dev/null
+++ b/chinese/oxim/files/patch-Makefile.in
@@ -0,0 +1,11 @@
+--- Makefile.in.orig Fri Sep 8 05:15:45 2006
++++ Makefile.in Fri Sep 8 05:16:05 2006
+@@ -672,8 +672,6 @@
+
+
+ install-exec-local:
+- $(mkinstalldirs) $(DESTDIR)/$(input_d_dir)
+- sed 's|@OXIM_IM_MODULE_DIR@|$(IM_MODULES_DIR)|' oxim-start.sh.in > $(DESTDIR)/$(input_d_dir)/oxim
+
+ uninstall-local:
+ rm -f $(DESTDIR)/$(input_d_dir)/oxim
diff --git a/chinese/oxim/files/patch-src-modules-chewing-chewing.c b/chinese/oxim/files/patch-src-modules-chewing-chewing.c
index f481d76cd687..f0a35f9f8856 100644
--- a/chinese/oxim/files/patch-src-modules-chewing-chewing.c
+++ b/chinese/oxim/files/patch-src-modules-chewing-chewing.c
@@ -1,5 +1,5 @@
---- src/modules/chewing/chewing.c.orig Sun Apr 23 06:11:30 2006
-+++ src/modules/chewing/chewing.c Sat May 20 22:09:19 2006
+--- src/modules/chewing/chewing.c.orig Mon Jun 12 00:02:39 2006
++++ src/modules/chewing/chewing.c Thu Sep 7 17:45:14 2006
@@ -14,7 +14,9 @@
#include "oximtool.h"
#include "module.h"
@@ -10,16 +10,15 @@
/* the following keystate masks are defined by oxim */
#define CAPS_MASK (2)
-@@ -24,18 +26,20 @@
- #define OXIM_BYTE_UTF8 3
+@@ -28,17 +30,19 @@
+ static int CapsLockMode = 0; /* 0:小寫, 1:大寫 */
+ static char *selKey_define = "1234567890";
- static int chewing_codeset;
+#if 0
void preconvert(char *input, char *output, int n_char);
wchar_t convert(wchar_t input);
+#endif
- static char selKey_define[11] = "1234567890\0"; /* Default */
static int bAddPhraseForward = 0;
static uch_t etymon_list[N_KEYCODE];
@@ -34,7 +33,7 @@
int i;
config.selectAreaLen = 100;
-@@ -45,15 +49,15 @@
+@@ -48,14 +52,14 @@
for (i = 0; i < 10;i++)
config.selKey[i] = selKey_define[i];
@@ -44,42 +43,31 @@
}
static int
--ChewingInit(void *conf, char *objname, oxim_rc_t *xc)
-+ChewingInit(void *context, char *objname, oxim_rc_t *xc)
+-ChewingInit(void *conf, char *objname)
++ChewingInit(void *context, char *objname)
{
- char *cmd[2], kb_type_str[256];
- ChewingConf *cf = (ChewingConf *)conf ;
+ ChewingContext *ctx = (ChewingContext *)context ;
/* TODO : 這裡要改為偵測新酷音詞庫存放路徑 */
char *prefix = CHEWING_DATA_DIR;
-@@ -68,7 +72,6 @@
- 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->kb_type = KBStr2Num("KB_HANYU_PINYING");
-
- /* Support selection key definitions */
-@@ -90,17 +93,6 @@
- }
+@@ -95,14 +99,12 @@
+
+ if (oxim_setting_GetInteger(im_settings, "KeyMap", &KeyMap))
+ {
+- if (KeyMap < KB_DEFAULT && KeyMap > KB_HANYU_PINYING)
++ if (KeyMap < KB_DEFAULT && KeyMap > KB_HANYU_PINYIN)
+ {
+ KeyMap = KB_DEFAULT;
+ }
}
-- if (cf->kb_type == KB_HANYU_PINYING)
-- {
-- cf->inp_cname = "漢語拼音";
-- cf->inp_ename = "HanYu";
-- }
-- else
-- {
-- cf->inp_cname = "新酷音";
-- cf->inp_ename = "Chewing";
-- }
+- cf->kb_type = KeyMap;
-
char *pho_key = "1qaz2wsxedcrfv5tgbyhnujm8ik,9ol.0p;/-7634";
char *pho_name[41] = {"ㄅ","ㄆ","ㄇ","ㄈ","ㄉ","ㄊ","ㄋ","ㄌ","ㄍ","ㄎ","ㄏ","ㄐ","ㄑ","ㄒ","ㄓ","ㄔ","ㄕ","ㄖ","ㄗ","ㄘ","ㄙ","ㄧ","ㄨ","ㄩ","ㄚ","ㄛ","ㄜ","ㄝ","ㄞ","ㄟ","ㄠ","ㄡ","ㄢ","ㄣ","ㄤ","ㄥ","ㄦ","˙","ˊ","ˇ","ˋ"};
int keylen = strlen(pho_key), i, idx;
-@@ -112,10 +104,7 @@
+@@ -114,10 +116,7 @@
}
/* Initialize Chewing */
@@ -89,9 +77,9 @@
- ReadHash(prefix);
+ chewing_Init(prefix, prefix);
+ oxim_settings_destroy(im_settings);
return True;
- }
-@@ -124,21 +113,22 @@
+@@ -127,14 +126,15 @@
ChewingXimInit(void *conf, inpinfo_t *inpinfo)
{
static char cchBuffer[MAX_PHONE_SEQ_LEN];
@@ -102,26 +90,17 @@
- inpinfo->iccf = (ChewingData *) calloc(1, sizeof(ChewingData));
- inpinfo->etymon_list = (cf->kb_type == KB_HANYU_PINYING) ? NULL : etymon_list;
+ inpinfo->iccf = chewing_new();
++
++ CallSetConfig(inpinfo, (ChewingContext *) inpinfo->iccf);
- InitChewing(inpinfo->iccf, cf);
- CallSetConfig(inpinfo, (ChewingData *) inpinfo->iccf);
-+ CallSetConfig(inpinfo, (ChewingContext *) inpinfo->iccf);
++ chewing_set_KBType( inpinfo->iccf, KeyMap );
++ inpinfo->etymon_list = (KeyMap == KB_HANYU_PINYIN) ? NULL : etymon_list;
-+ chewing_set_KBType( inpinfo->iccf, chewing_KBStr2Num( "KB_DEFAULT" ) );
inpinfo->lcch = (uch_t *) calloc(MAX_PHONE_SEQ_LEN, sizeof(uch_t));
inpinfo->lcch_grouping = (ubyte_t *) calloc(MAX_PHONE_SEQ_LEN, sizeof(ubyte_t));
- inpinfo->cch = cchBuffer;
-
-- inpinfo->inp_cname = cf->inp_cname;
-- inpinfo->inp_ename = cf->inp_ename;
-+ inpinfo->inp_cname = "新酷音";
-+ inpinfo->inp_ename = "Chewing";
-+ inpinfo->etymon_list = etymon_list;
-+
- inpinfo->guimode = GUIMOD_LISTCHAR | GUIMOD_SELKEYSPOT;
- inpinfo->keystroke_len = 0;
- inpinfo->s_keystroke = (uch_t *) calloc(3 + MAX_PHRASE_LEN, sizeof(uch_t));
-@@ -162,33 +152,29 @@
+@@ -163,33 +163,29 @@
return True;
}
@@ -161,7 +140,7 @@
free(inpinfo->s_keystroke);
free(inpinfo->lcch);
free(inpinfo->mcch);
-@@ -201,7 +187,7 @@
+@@ -202,7 +198,7 @@
return rtn ;
}
@@ -170,7 +149,7 @@
{
int i,no,k,len, kk;
char *output;
-@@ -217,16 +203,12 @@
+@@ -218,16 +214,12 @@
// in the last page, no will exceed nTotalChoice
if( no >= pci->nTotalChoice )
break;
@@ -188,7 +167,7 @@
// set grouping to the length of the phrase
inpinfo->mcch_grouping[i+1] = kk;
-@@ -250,22 +232,23 @@
+@@ -251,22 +243,23 @@
inpinfo->n_mcch = len ;
}
@@ -215,7 +194,7 @@
if( pgo->chiSymbolBufLen == 0) {
inpinfo->lcch_grouping[0] = 0 ;
-@@ -304,34 +287,35 @@
+@@ -305,34 +298,35 @@
inpinfo->lcch_grouping[0] = nGroup ;
}
@@ -259,7 +238,7 @@
}
else
{
-@@ -339,7 +323,7 @@
+@@ -340,7 +334,7 @@
{
if(pgo->zuinBuf[i].s[0] != '\0')
{
@@ -268,7 +247,7 @@
++ len;
}
}
-@@ -348,13 +332,15 @@
+@@ -349,13 +343,15 @@
}
}
@@ -286,8 +265,8 @@
int rtnValue = 0 ;
if(pgo->keystrokeRtn & KEYSTROKE_ABSORB)
-@@ -365,20 +351,20 @@
- rtnValue |= IMKEY_BELL;
+@@ -364,20 +360,20 @@
+ rtnValue |= IMKEY_IGNORE;
if(pgo->keystrokeRtn & KEYSTROKE_COMMIT) {
rtnValue |= IMKEY_COMMIT;
- CommitString(inpinfo, pgo);
@@ -313,7 +292,7 @@
return rtnValue;
}
-@@ -386,67 +372,63 @@
+@@ -385,7 +381,6 @@
ChewingKeystroke(void *conf, inpinfo_t *inpinfo, keyinfo_t *keyinfo)
{
KeySym keysym = keyinfo->keysym;
@@ -321,6 +300,8 @@
int rtn ;
static KeySym last_key = 0;
+@@ -406,61 +401,58 @@
+
// set Chinese / English mode by keystate
if( keyinfo->keystate & CAPS_MASK ) { // uppercase
- SetChiEngMode( inpinfo->iccf, SYMBOL_MODE);
@@ -397,7 +378,7 @@
inpinfo->n_mcch = 0;
break;
}
-@@ -454,26 +436,26 @@
+@@ -468,26 +460,26 @@
else if (keyinfo->keystate & ShiftMask) {
switch ( keysym ) {
case XK_Left:
@@ -430,7 +411,7 @@
return rtn ;
}
-@@ -484,6 +466,7 @@
+@@ -498,6 +490,7 @@
return False;
}
@@ -438,15 +419,15 @@
/* UTF-8 support */
void
preconvert(char *input, char *output, int n_char)
-@@ -519,6 +502,7 @@
+@@ -533,6 +526,7 @@
iconv_close(cd);
return output.wch;
}
+#endif
- static char zh_chewing_comments[] =
- "Chewing : a smart phonetic input method module for OXIM.\n"
-@@ -535,7 +519,7 @@
+ static int ChewingTerminate(void *conf)
+ {
+@@ -554,7 +548,7 @@
zh_chewing_comments
}, /* comments */
zh_chewing_valid_objname, /* valid_objname */
diff --git a/chinese/oxim/pkg-plist b/chinese/oxim/pkg-plist
index 4cff7e4efe26..5c994b4193f5 100644
--- a/chinese/oxim/pkg-plist
+++ b/chinese/oxim/pkg-plist
@@ -1,29 +1,30 @@
bin/oxim
+bin/oxim-conv
bin/oxim2tab
etc/oxim/locale.list
etc/oxim/oxim.conf
lib/liboxim.la
lib/liboxim.so
lib/liboxim.so.0
-%%GTK2%%lib/gtk-2.0/immodules/gtk-im-oxim.la
%%GTK2%%lib/gtk-2.0/immodules/gtk-im-oxim.so
%%CHEWING%%lib/oxim/modules/chewing.la
%%CHEWING%%lib/oxim/modules/chewing.so
+%%GTK2%%lib/oxim/immodules/gtk-im-oxim.la
+%%GTK2%%lib/oxim/immodules/gtk-im-oxim.so
lib/oxim/modules/gen-inp.la
lib/oxim/modules/gen-inp.so
+lib/oxim/modules/gen-inp-v1.la
+lib/oxim/modules/gen-inp-v1.so
%%UNICODE%%lib/oxim/modules/unicode.la
%%UNICODE%%lib/oxim/modules/unicode.so
lib/oxim/panels/defaultkeyboard.conf
lib/oxim/panels/defaultkeyboard.xpm
-lib/oxim/tables/array30.tab
-lib/oxim/tables/cns11643.tab
lib/oxim/tables/cnscj.tab
-lib/oxim/tables/cnsimplex.tab
lib/oxim/tables/cnsphone.tab
lib/oxim/tables/default.phr
-lib/oxim/tables/ez.tab
lib/oxim/tables/symbol.list
@dirrm etc/oxim
+@dirrm lib/oxim/immodules
@dirrm lib/oxim/modules
@dirrm lib/oxim/panels
@dirrm lib/oxim/tables