summaryrefslogtreecommitdiff
path: root/inputmethod
diff options
context:
space:
mode:
authorshell <shell>2002-06-15 09:31:38 +0000
committershell <shell>2002-06-15 09:31:38 +0000
commitf9f356aaca433622982f851e663721887e807750 (patch)
tree8867bbf86f48c9bcd4927b2c92d23284eae164ad /inputmethod
parent0db1a5804864740af9a9e9a13470efa9bc365cb4 (diff)
downloadpkgsrc-f9f356aaca433622982f851e663721887e807750.tar.gz
Initial import of Chinput-3.0
(PR#17231 by Rui-Xiang Guo <rxg@netbsd.org>) Chinese input server --- Chinput is a Chinese input server. It supports XIM(X Input Method) Protocol and its own protocol for Chinese platform. XIM is the standard input protocol for DBCS input in X11. All the clients can use it if they support XIM. Chinput now use the input engine(IME) from Unicon, and it can support both GB and Big5 charset.
Diffstat (limited to 'inputmethod')
-rw-r--r--inputmethod/Chinput/DESCR5
-rw-r--r--inputmethod/Chinput/Makefile38
-rw-r--r--inputmethod/Chinput/PLIST12
-rw-r--r--inputmethod/Chinput/distinfo10
-rw-r--r--inputmethod/Chinput/patches/patch-aa36
-rw-r--r--inputmethod/Chinput/patches/patch-ab13
-rw-r--r--inputmethod/Chinput/patches/patch-ac13
-rw-r--r--inputmethod/Chinput/patches/patch-ad31
-rw-r--r--inputmethod/Chinput/patches/patch-ae22
-rw-r--r--inputmethod/Chinput/patches/patch-af15
10 files changed, 195 insertions, 0 deletions
diff --git a/inputmethod/Chinput/DESCR b/inputmethod/Chinput/DESCR
new file mode 100644
index 00000000000..b95786025cf
--- /dev/null
+++ b/inputmethod/Chinput/DESCR
@@ -0,0 +1,5 @@
+Chinput is a Chinese input server. It supports XIM(X Input Method)
+Protocol and its own protocol for Chinese platform. XIM is the
+standard input protocol for DBCS input in X11. All the clients can
+use it if they support XIM. Chinput now use the input engine(IME)
+from Unicon, and it can support both GB and Big5 charset.
diff --git a/inputmethod/Chinput/Makefile b/inputmethod/Chinput/Makefile
new file mode 100644
index 00000000000..c4f3dc1ef92
--- /dev/null
+++ b/inputmethod/Chinput/Makefile
@@ -0,0 +1,38 @@
+# $NetBSD: Makefile,v 1.1.1.1 2002/06/15 09:31:38 shell Exp $
+
+DISTNAME= Chinput-3.0
+CATEGORIES= inputmethod
+MASTER_SITES= http://download.linuxbyte.net/Chinese/Input/
+
+MAINTAINER= rxg@netbsd.org
+HOMEPAGE= http://www.opencjk.org/~yumj/project-chinput.html
+COMMENT= Chinese input server
+
+DEPENDS+= unicon-im>=1.2:../../inputmethod/unicon-im
+
+USE_PTHREAD= native pth
+USE_X11BASE= yes
+
+ALL_TARGET= chinput
+
+post-patch:
+ ${SED} -e 's:/usr/dict:'${LOCALBASE}/lib/unicon':g' < \
+ ${WRKSRC}/src/init.c > ${WRKSRC}/src/init.c.tmp
+ ${SED} -e 's:/usr/lib/ZWinPro:'${PREFIX}/etc':g' < \
+ ${WRKSRC}/src/init.c.tmp > ${WRKSRC}/src/init.c
+ ${MV} ${WRKSRC}/resource/Chinput.ad ${WRKSRC}/resource/Chinput.ad.tmp
+ ${SED} -e 's:/usr/lib/unicon2:'${LOCALBASE}/lib/unicon':g' < \
+ ${WRKSRC}/resource/Chinput.ad.tmp > \
+ ${WRKSRC}/resource/Chinput.ad
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/chinput ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/resource/Chinput.ad ${PREFIX}/etc
+
+post-install:
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/Chinput
+ ${INSTALL_DATA} ${WRKSRC}/doc/* ${PREFIX}/share/doc/Chinput
+
+.include "../../mk/pthread.buildlink.mk"
+.include "../../mk/x11.buildlink.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/inputmethod/Chinput/PLIST b/inputmethod/Chinput/PLIST
new file mode 100644
index 00000000000..8cb24c64f7c
--- /dev/null
+++ b/inputmethod/Chinput/PLIST
@@ -0,0 +1,12 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2002/06/15 09:31:39 shell Exp $
+bin/chinput
+etc/Chinput.ad
+share/doc/Chinput/API
+share/doc/Chinput/BUGS
+share/doc/Chinput/CHANGES
+share/doc/Chinput/COPYING
+share/doc/Chinput/FAQ
+share/doc/Chinput/INSTALL
+share/doc/Chinput/README
+share/doc/Chinput/USAGE
+@dirrm share/doc/Chinput
diff --git a/inputmethod/Chinput/distinfo b/inputmethod/Chinput/distinfo
new file mode 100644
index 00000000000..58e0da4502d
--- /dev/null
+++ b/inputmethod/Chinput/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1.1.1 2002/06/15 09:31:39 shell Exp $
+
+SHA1 (Chinput-3.0.tar.gz) = de6da2c8c53b38c1b23aee73c1aced90628e57d8
+Size (Chinput-3.0.tar.gz) = 484374 bytes
+SHA1 (patch-aa) = c014ab66c2e6f32d66b55dec073ad9fccc1c5df0
+SHA1 (patch-ab) = e2b98ae50ddc28c986e3235345a67af964f02a60
+SHA1 (patch-ac) = f4d45c2ea45e3e8288cdb0363dc9dba127288990
+SHA1 (patch-ad) = 8a9fb407307bcd823e6050ab65e9e20bb512e367
+SHA1 (patch-ae) = f3854f86cb2780bf710db84e2bc38b51671dd4b1
+SHA1 (patch-af) = db621ebb06d22d948513451c4b5b670494dd5d46
diff --git a/inputmethod/Chinput/patches/patch-aa b/inputmethod/Chinput/patches/patch-aa
new file mode 100644
index 00000000000..0dd1e85c4fd
--- /dev/null
+++ b/inputmethod/Chinput/patches/patch-aa
@@ -0,0 +1,36 @@
+$NetBSD: patch-aa,v 1.1.1.1 2002/06/15 09:31:39 shell Exp $
+
+--- src/Makefile.orig Mon Jun 10 21:05:56 2002
++++ src/Makefile
+@@ -1,20 +1,16 @@
+
+-CC = gcc
+
+ # do you have imlib?
+ #No, I don't have that strange library
+ #IMLIB =
+ #LIBIMLIB =
+-#Yes I have
+-IMLIB = -DIMLIB
+-LIBIMLIB = -lImlib
+
+ #CFLAGS = -Wall -g -DFOR_PILOT_COMPAT -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
+-CFLAGS = -Wall -g -DFOR_PILOT_COMPAT -O2 -fno-strength-reduce
++CFLAGS += -Wall -DFOR_PILOT_COMPAT -O2 -fno-strength-reduce
+
+ INC = -I./include -I./IMdkit/include -I/usr/include -I/usr/X11R6/include
+
+-LIB = -L/usr/X11R6/lib -lXext -lX11 ./IMdkit/lib/libXimd.a -L/usr/lib/unicon2 -limmclient -Wl,-rpath=/usr/lib/unicon2 -limm_server -lpth -ldl
++LIB = -lXext -lX11 ./IMdkit/lib/libXimd.a -limmclient -limm_server -lpth
+
+ SRC = chinput.c init.c server.c config.c color.c util.c convert.c IC.c XIM.c focus.c root.c overspot.c onspot.c offspot.c voice.c keyboard.c handw.c hwengine.c loop.c
+
+@@ -23,7 +19,7 @@
+ all: chinput
+
+ chinput: IMdkit/lib/libXimd.a $(OBJ)
+- g++ -o chinput $(OBJ) $(LIB) $(LIBIMLIB)
++ $(CC) -o chinput $(OBJ) $(LDFLAGS) $(LIB) $(LIBIMLIB)
+
+ .c.o:
+ $(CC) -c $(CFLAGS) $(IMLIB) $(INC) $<
diff --git a/inputmethod/Chinput/patches/patch-ab b/inputmethod/Chinput/patches/patch-ab
new file mode 100644
index 00000000000..95ffe37e58d
--- /dev/null
+++ b/inputmethod/Chinput/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1.1.1 2002/06/15 09:31:39 shell Exp $
+
+--- src/XIM.h.orig Mon Jun 10 21:19:55 2002
++++ src/XIM.h
+@@ -25,7 +25,7 @@
+ //setenv XMODIFIERS @im=Chinput (csh, tcsh)
+ #define DEFAULT_IMNAME "Chinput"
+
+-#define LOCALE_GB "zh_CN.GBK"
++#define LOCALE_GB "zh_CN.eucCN"
+ #define LOCALE_BIG5 "zh_TW.Big5"
+
+ //This input server support CJK by default
diff --git a/inputmethod/Chinput/patches/patch-ac b/inputmethod/Chinput/patches/patch-ac
new file mode 100644
index 00000000000..5b5cece2002
--- /dev/null
+++ b/inputmethod/Chinput/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2002/06/15 09:31:39 shell Exp $
+
+--- src/chinput.c.orig Mon Jun 10 21:16:56 2002
++++ src/chinput.c
+@@ -75,7 +75,7 @@
+ HZloadRCFile(); //resource file
+ HZloadRCIME(); //IME lists from Chinput.ad
+ HZparseParameters(argc, argv); //parse parameters
+- setlocale(LC_ALL, deflocale); //locale set
++ setlocale(LC_CTYPE, deflocale); //locale set
+ HZinitDisplay(); //display init
+ HZinitServerFont(); //font init
+ HZinitWindows(); //windows geometry init
diff --git a/inputmethod/Chinput/patches/patch-ad b/inputmethod/Chinput/patches/patch-ad
new file mode 100644
index 00000000000..88b3844f261
--- /dev/null
+++ b/inputmethod/Chinput/patches/patch-ad
@@ -0,0 +1,31 @@
+$NetBSD: patch-ad,v 1.1.1.1 2002/06/15 09:31:39 shell Exp $
+
+--- src/config.c.orig Mon Jun 10 22:53:45 2002
++++ src/config.c
+@@ -388,7 +388,7 @@
+ if(method == cur_inputmethod) return;
+
+ //change the encoding for later use
+- if(!strcmp(chinputime[method].encoding, "GB"))
++ if(!strcmp(chinputime[method].encoding, "eucCN"))
+ HZServer.encoding = HZSERVER_ENCODING_GB;
+ else
+ HZServer.encoding = HZSERVER_ENCODING_BIG5;
+@@ -681,7 +681,7 @@
+ if(HZServer.encoding == HZSERVER_ENCODING_GB){
+ for(i=0; i<index_ime; i++){
+ if(!strcmp(chinputime[i].name, imd) &&
+- !strcmp(chinputime[i].encoding, "GB")){
++ !strcmp(chinputime[i].encoding, "eucCN")){
+ return i;
+ }
+ }
+@@ -738,7 +738,7 @@
+ //chinput_imserver = IMM_OpenClient("127.0.0.1", 9010);
+
+ cur_inputmethod = id;
+- if(!strcmp(chinputime[cur_inputmethod].encoding, "GB"))
++ if(!strcmp(chinputime[cur_inputmethod].encoding, "eucCN"))
+ HZServer.encoding = HZSERVER_ENCODING_GB;
+ else
+ HZServer.encoding = HZSERVER_ENCODING_BIG5;
diff --git a/inputmethod/Chinput/patches/patch-ae b/inputmethod/Chinput/patches/patch-ae
new file mode 100644
index 00000000000..bc5dd39a801
--- /dev/null
+++ b/inputmethod/Chinput/patches/patch-ae
@@ -0,0 +1,22 @@
+$NetBSD: patch-ae,v 1.1.1.1 2002/06/15 09:31:39 shell Exp $
+
+--- src/init.c.orig Mon Jun 10 21:23:44 2002
++++ src/init.c
+@@ -342,7 +342,7 @@
+ //enable two locales at the same time
+ strcpy(imlocale, IMLOCALE);
+
+- if(getenv("LC_ALL") && strstr(getenv("LC_ALL"), "zh_TW")){
++ if(getenv("LC_CTYPE") && strstr(getenv("LC_CTYPE"), "zh_TW.Big5")){
+ strcpy(deflocale, LOCALE_BIG5);
+ //strcpy(imlocale, "zh_TW");
+ flag_encoding = HZSERVER_ENCODING_BIG5;
+@@ -567,7 +567,7 @@
+ }
+ fclose(fp);
+
+- if(strstr(getenv("LC_ALL"), "zh_TW"))
++ if(strstr(getenv("LC_CTYPE"), "zh_TW.Big5"))
+ cur_inputmethod = HZgetInputMethod(input_method_big5);
+ else
+ cur_inputmethod = HZgetInputMethod(input_method_gb);
diff --git a/inputmethod/Chinput/patches/patch-af b/inputmethod/Chinput/patches/patch-af
new file mode 100644
index 00000000000..0eaefda5501
--- /dev/null
+++ b/inputmethod/Chinput/patches/patch-af
@@ -0,0 +1,15 @@
+$NetBSD: patch-af,v 1.1.1.1 2002/06/15 09:31:39 shell Exp $
+
+--- resource/Chinput.ad.orig Mon Jun 10 21:55:02 2002
++++ resource/Chinput.ad
+@@ -55,8 +55,8 @@
+ ! 16 point font set
+ !
+ chinput.font = 8x16
+-chinput.gbfont = -*-song-medium-r-normal--16-*-*-*-*-*-gbk-0
+-chinput.big5font = -*-song-medium-r-normal--16-*-*-*-*-*-big5-0
++chinput.gbfont = -*-medium-r-normal--16-*-*-*-*-*-gb2312.1980-0
++chinput.big5font = -*-medium-r-normal--16-*-*-*-*-*-big5-0
+ !
+ !
+ ! inputbar width in chars