diff options
author | Vanilla I. Shu <vanilla@FreeBSD.org> | 2004-08-01 17:41:50 +0000 |
---|---|---|
committer | Vanilla I. Shu <vanilla@FreeBSD.org> | 2004-08-01 17:41:50 +0000 |
commit | b4e7eef7bd071b5bf06b834d5375415e5f5e069e (patch) | |
tree | 0d9f13dd01516be4751fb719e8ae426cbc566a7a /chinese | |
parent | Unbreak 'make readme' (diff) |
Add gcin 0.1.9, a triditional chinese input utility in X.
PR: ports/69530
Submitted by: Shen Chuan-Hsing
Notes
Notes:
svn path=/head/; revision=115212
Diffstat (limited to 'chinese')
29 files changed, 617 insertions, 0 deletions
diff --git a/chinese/Makefile b/chinese/Makefile index adef5be6b25d..06ce874e7c4b 100644 --- a/chinese/Makefile +++ b/chinese/Makefile @@ -44,6 +44,7 @@ SUBDIR += gb2ps SUBDIR += gbfs SUBDIR += gbscript + SUBDIR += gcin SUBDIR += gnumeric SUBDIR += gugod-clean SUBDIR += hanzim diff --git a/chinese/gcin-devel/Makefile b/chinese/gcin-devel/Makefile new file mode 100644 index 000000000000..c53973961adf --- /dev/null +++ b/chinese/gcin-devel/Makefile @@ -0,0 +1,27 @@ +# New ports collection makefile for: gcin +# Date created: Feb 18 2004 +# Whom: Shen Chuan-Hsing +# +# $FreeBSD$ +# + +PORTNAME= gcin +PORTVERSION= 0.1.9 +CATEGORIES= chinese +MASTER_SITES= http://www.csie.nctu.edu.tw/~cp76/gcin/download/ + +MAINTAINER= ports@FreeBSD.org +COMMENT= A triditional chinese input utility in X + +USE_BZIP2= YES +HAS_CONFIGURE= YES +USE_GNOME= gtk20 +USE_GMAKE= YES + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500041 +USE_GCC= 3.3 +.endif + +.include <bsd.port.post.mk> diff --git a/chinese/gcin-devel/distinfo b/chinese/gcin-devel/distinfo new file mode 100644 index 000000000000..9c4eb15a4f3d --- /dev/null +++ b/chinese/gcin-devel/distinfo @@ -0,0 +1,2 @@ +MD5 (gcin-0.1.9.tar.bz2) = bd382f4d818061c7d2e20eff7fb43f73 +SIZE (gcin-0.1.9.tar.bz2) = 385011 diff --git a/chinese/gcin-devel/files/patch-IMConn.c b/chinese/gcin-devel/files/patch-IMConn.c new file mode 100644 index 000000000000..9fd32888d1aa --- /dev/null +++ b/chinese/gcin-devel/files/patch-IMConn.c @@ -0,0 +1,11 @@ +--- IMdkit/lib/IMConn.c.orig Sun Jul 2 10:01:01 2000 ++++ IMdkit/lib/IMConn.c Sun Jul 25 19:45:46 2004 +@@ -30,7 +30,7 @@ + ******************************************************************/ + + #include <X11/Xlib.h> +-#include <malloc.h> ++#include <stdlib.h> + #include "IMdkit.h" + #include <stdarg.h> + diff --git a/chinese/gcin-devel/files/patch-IMdkit::Makefile b/chinese/gcin-devel/files/patch-IMdkit::Makefile new file mode 100644 index 000000000000..f4ababa81f90 --- /dev/null +++ b/chinese/gcin-devel/files/patch-IMdkit::Makefile @@ -0,0 +1,22 @@ +--- IMdkit/Makefile.orig Sat Jul 24 19:18:15 2004 ++++ IMdkit/Makefile Sat Jul 24 19:18:30 2004 +@@ -2,15 +2,15 @@ + all: libXimd.a Xi18n_sample/sampleIM + + libXimd.a: +- make -C lib ++ gmake -C lib + + Xi18n_sample/sampleIM: +- cd Xi18n_sample; make ++ cd Xi18n_sample; gmake + + clean: + rm -f *.bak *~ +- make -C lib clean +- make -C Xi18n_sample clean ++ gmake -C lib clean ++ gmake -C Xi18n_sample clean + + install: + @echo nothing to be installed. diff --git a/chinese/gcin-devel/files/patch-IMdkit::lib::Makefile b/chinese/gcin-devel/files/patch-IMdkit::lib::Makefile new file mode 100644 index 000000000000..53127bb43d19 --- /dev/null +++ b/chinese/gcin-devel/files/patch-IMdkit::lib::Makefile @@ -0,0 +1,9 @@ +--- IMdkit/lib/Makefile.orig Sun Aug 1 00:51:25 2004 ++++ IMdkit/lib/Makefile Sun Aug 1 00:51:29 2004 +@@ -1,6 +1,5 @@ + include ../../config.mak + +-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 $(OPTFLAGS) -fno-strength-reduce -DXIM_t -DTRANS_SERVER + INC = -I../include -I/usr/X11R6/include diff --git a/chinese/gcin-devel/files/patch-Makefile b/chinese/gcin-devel/files/patch-Makefile new file mode 100644 index 000000000000..7ca06d232983 --- /dev/null +++ b/chinese/gcin-devel/files/patch-Makefile @@ -0,0 +1,88 @@ +--- Makefile.orig Tue Jul 20 13:01:30 2004 ++++ Makefile Thu Jul 29 03:09:13 2004 +@@ -1,5 +1,3 @@ +-OPTFLAGS=-g +- + include config.mak + + .SUFFIXES: .c .o .E +@@ -7,9 +5,9 @@ + OBJS=gcin.o IC.o eve.o win0.o pho.o tsin.o win1.o util.o pho-util.o gcin-conf.o tsin-util.o \ + win-sym.o intcode.o pho-sym.o win-int.o win-pho.o gcin-settings.o + OBJS_TSLEARN=tslearn.o util.o gcin-conf.o pho-util.o tsin-util.o gcin-send.o pho-sym.o +-OBJS_phod2a=phod2a.o pho-util.o gcin-conf.o pho-sym.o +-OBJS_tsa2d=tsa2d.o gcin-send.o util.o pho-sym.o gcin-conf.o +-OBJS_phoa2d=phoa2d.o pho-sym.o gcin-send.o gcin-conf.o ++OBJS_phod2a=phod2a.o pho-util.o pho-sym.o ++OBJS_tsa2d=tsa2d.o util.o pho-sym.o ++OBJS_phoa2d=phoa2d.o pho-sym.o + OBJS_kbmcv=kbmcv.o pho-sym.o + OBJS_tsd2a=tsd2a.o pho-sym.o + OBJS_gcin_steup=gcin-setup.o gcin-conf.o util.o gcin-send.o gcin-settings.o +@@ -26,7 +24,7 @@ + PROGS_CV=kbmcv + + all: $(PROGS) $(DATA) $(PROGS_CV) gcin.spec +- make -C data ++ gmake -C data + + gcin: $(OBJS) $(IMdkitLIB) + $(CC) -o $@ $(OBJS) $(IMdkitLIB) $(LDFLAGS) +@@ -34,28 +32,28 @@ + ln -sf $@ $@.test + + tslearn: $(OBJS_TSLEARN) +- cc -o $@ $(OBJS_TSLEARN) $(LDFLAGS) ++ $(CC) -o $@ $(OBJS_TSLEARN) $(LDFLAGS) + + gcin-setup: $(OBJS_gcin_steup) +- cc -o $@ $(OBJS_gcin_steup) $(LDFLAGS) ++ $(CC) -o $@ $(OBJS_gcin_steup) $(LDFLAGS) + + phoa2d: $(OBJS_phoa2d) +- cc -o $@ $(OBJS_phoa2d) $(LDFLAGS) ++ $(CC) -o $@ $(OBJS_phoa2d) + + phod2a: $(OBJS_phod2a) +- cc -o $@ $(OBJS_phod2a) $(LDFLAGS) ++ $(CC) -o $@ $(OBJS_phod2a) + + tsa2d: $(OBJS_tsa2d) +- cc -o $@ $(OBJS_tsa2d) $(LDFLAGS) ++ $(CC) -o $@ $(OBJS_tsa2d) + + tsd2a: $(OBJS_tsd2a) +- cc -o $@ $(OBJS_tsd2a) $(LDFLAGS) ++ $(CC) -o $@ $(OBJS_tsd2a) + + kbmcv: $(OBJS_kbmcv) + $(CC) -o $@ $(OBJS_kbmcv) + + $(IMdkitLIB): +- make -C IMdkit/lib ++ gmake -C IMdkit/lib + + install: + install -d $(GCIN_TABLE_DIR) +@@ -67,8 +65,8 @@ + install -s $(PROGS) $(bindir) + install -d $(libdir)/menu + install -m 644 menu/* $(libdir)/menu +- make -C data install +- if [ $(prefix) = /usr/local ]; then \ ++ gmake -C data install ++ if [ $(prefix) != /usr/local ]; then \ + install -m 644 menu/* /usr/lib/menu; \ + which update-menus >& /dev/null && update-menus; \ + sh modify-XIM; \ +@@ -78,8 +76,8 @@ + install -m 644 menu/* $(libdir)/menu; \ + fi + clean: +- make -C IMdkit clean +- make -C data clean ++ gmake -C IMdkit clean ++ gmake -C data clean + rm -f *.o *~ *.E config.mak tags core.* $(PROGS) $(PROGS_CV) $(DATA) .depend gcin.spec menu/*~ + cd ..; tar cvfj gcin.tbz gcin + diff --git a/chinese/gcin-devel/files/patch-configure b/chinese/gcin-devel/files/patch-configure new file mode 100644 index 000000000000..ee5e48eda4ab --- /dev/null +++ b/chinese/gcin-devel/files/patch-configure @@ -0,0 +1,11 @@ +--- configure.orig Sat Jul 17 16:26:48 2004 ++++ configure Sun Jul 25 19:48:05 2004 +@@ -38,7 +38,7 @@ + GCIN_VERSION=`cat VERSION.gcin` + sed -e "s/__gcin_version__/$GCIN_VERSION/" < gcin.spec.in > gcin.spec + +-OPTFLAGS="-g" ++OPTFLAGS=$CFLAGS + if [ $prefix = /usr ]; then + OPTFLAGS="-O" + fi diff --git a/chinese/gcin-devel/files/patch-pho-util.c b/chinese/gcin-devel/files/patch-pho-util.c new file mode 100644 index 000000000000..493ef26a135d --- /dev/null +++ b/chinese/gcin-devel/files/patch-pho-util.c @@ -0,0 +1,59 @@ +--- pho-util.c.orig Thu Jul 29 03:08:38 2004 ++++ pho-util.c Thu Jul 29 03:11:44 2004 +@@ -2,34 +2,51 @@ + #include "pho.h" + #include <sys/stat.h> + #include <stdlib.h> ++#include <dirent.h> + +- ++char *fTableDir=GCIN_TABLE_DIR; + char phofname[128]=""; +-extern char *TableDir; + u_short idxnum_pho; + PHO_IDX idx_pho[1403]; + int ch_pho_ofs; + PHO_ITEM *ch_pho; + int ch_phoN; + ++void get_dir(char *tt) ++{ ++ strcpy(tt,(char *)getenv("HOME")); ++ strcat(tt,"/.gcin"); ++ ++ DIR *dir; ++ if ((dir=opendir(tt))==NULL) { ++ char vv[128]; ++ ++ mkdir(tt,0755); ++ sprintf(vv,"cp %s/* %s", fTableDir, tt); ++ system(vv); ++ } ++ else ++ closedir(dir); ++} ++ + void pho_load() + { + #ifndef NO_PRIVATE_TSIN + if (!phofname[0]) { + char tt[128]; + +- get_gcin_dir(tt); ++ get_dir(tt); + strcat(tt,"/pho.tab"); + strcpy(phofname,tt); + + char vv[128]; + if (access(phofname, W_OK) < 0){ +- sprintf(vv,"cp %s/pho.tab %s\n", TableDir, tt); ++ sprintf(vv,"cp %s/pho.tab %s\n", fTableDir, tt); + system(vv); + } + + #else +- strcat(strcpy(phofname, TableDir), "pho.tab"); ++ strcat(strcpy(phofname, fTableDir), "pho.tab"); + #endif + } + diff --git a/chinese/gcin-devel/files/patch-phoa2d.c b/chinese/gcin-devel/files/patch-phoa2d.c new file mode 100644 index 000000000000..fd443312ffd7 --- /dev/null +++ b/chinese/gcin-devel/files/patch-phoa2d.c @@ -0,0 +1,18 @@ +--- phoa2d.c.orig Thu Jul 29 03:15:13 2004 ++++ phoa2d.c Thu Jul 29 03:15:20 2004 +@@ -77,8 +77,6 @@ + FILE *fp; + char s[64]; + +- gtk_init(&argc, &argv); +- + if ((fp=fopen(fname,"r"))==NULL) + p_err("cannot open %s\n", fname); + +@@ -159,6 +157,5 @@ + + fclose(fp); + +- send_gcin_message(GDK_DISPLAY(), "reload"); + return 0; + } diff --git a/chinese/gcin-devel/files/patch-tsa2d.c b/chinese/gcin-devel/files/patch-tsa2d.c new file mode 100644 index 000000000000..5da9c1225c09 --- /dev/null +++ b/chinese/gcin-devel/files/patch-tsa2d.c @@ -0,0 +1,18 @@ +--- tsa2d.c.orig Thu Jul 29 03:14:34 2004 ++++ tsa2d.c Thu Jul 29 03:14:46 2004 +@@ -106,8 +106,6 @@ + int hashidx[256]; + u_char clen, llen; + +- gtk_init(&argc, &argv); +- + if (argc > 1) { + if ((fp=fopen(argv[1], "r"))==NULL) { + printf("Cannot open %s\n", argv[1]); +@@ -300,6 +298,5 @@ + + fclose(fw); + +- send_gcin_message(GDK_DISPLAY(), "reload"); + exit(0); + } diff --git a/chinese/gcin-devel/files/patch-tsin-util.c b/chinese/gcin-devel/files/patch-tsin-util.c new file mode 100644 index 000000000000..d6899f223a3f --- /dev/null +++ b/chinese/gcin-devel/files/patch-tsin-util.c @@ -0,0 +1,11 @@ +--- tsin-util.c.orig Sat Jul 24 19:34:37 2004 ++++ tsin-util.c Sat Jul 24 19:34:55 2004 +@@ -149,7 +149,7 @@ + for(;hashno<256;hashno++) hashidx[hashno]++; + + if ((fw=fopen(tsidxfname,"w"))==NULL) { +- error("%s create err", tsidxfname); ++ p_err("%s create err", tsidxfname); + return FALSE; + } + diff --git a/chinese/gcin-devel/files/patch-tsin.c b/chinese/gcin-devel/files/patch-tsin.c new file mode 100644 index 000000000000..13d4a9b54015 --- /dev/null +++ b/chinese/gcin-devel/files/patch-tsin.c @@ -0,0 +1,11 @@ +--- tsin.c.orig Sat Jul 24 19:33:14 2004 ++++ tsin.c Sat Jul 24 19:34:11 2004 +@@ -722,7 +722,7 @@ + selidx[0]=tmp; + + if ((fp=fopen(tsidxfname,"r+"))==NULL) { +- error("%s modify err", tsidxfname); ++ p_err("%s modify err", tsidxfname); + return; + } + diff --git a/chinese/gcin-devel/pkg-descr b/chinese/gcin-devel/pkg-descr new file mode 100644 index 000000000000..a4f4aaff2860 --- /dev/null +++ b/chinese/gcin-devel/pkg-descr @@ -0,0 +1,4 @@ +gcin is a Gtk Chinese INput application in X, well support in Traditional +Chinese(Big5) charsets. + +WWW: http://www.csie.nctu.edu.tw/~cp76/gcin/ diff --git a/chinese/gcin-devel/pkg-plist b/chinese/gcin-devel/pkg-plist new file mode 100644 index 000000000000..f85f39c48489 --- /dev/null +++ b/chinese/gcin-devel/pkg-plist @@ -0,0 +1,17 @@ +bin/gcin +lib/menu/gcin +lib/menu/gcin-setup +share/gcin/table/pho.tab +share/gcin/table/et.kbm +share/gcin/table/zo.kbm +share/gcin/table/tsin +share/gcin/table/tsin.idx +share/gcin/table/symbol-table +share/icons/gcin.png +share/icons/gcin/pin-fixed24.png +share/icons/gcin/pin-float16.png +@dirrm lib/menu +@dirrm share/icons/gcin +@dirrm share/icons +@dirrm share/gcin/table +@dirrm share/gcin diff --git a/chinese/gcin/Makefile b/chinese/gcin/Makefile new file mode 100644 index 000000000000..c53973961adf --- /dev/null +++ b/chinese/gcin/Makefile @@ -0,0 +1,27 @@ +# New ports collection makefile for: gcin +# Date created: Feb 18 2004 +# Whom: Shen Chuan-Hsing +# +# $FreeBSD$ +# + +PORTNAME= gcin +PORTVERSION= 0.1.9 +CATEGORIES= chinese +MASTER_SITES= http://www.csie.nctu.edu.tw/~cp76/gcin/download/ + +MAINTAINER= ports@FreeBSD.org +COMMENT= A triditional chinese input utility in X + +USE_BZIP2= YES +HAS_CONFIGURE= YES +USE_GNOME= gtk20 +USE_GMAKE= YES + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500041 +USE_GCC= 3.3 +.endif + +.include <bsd.port.post.mk> diff --git a/chinese/gcin/distinfo b/chinese/gcin/distinfo new file mode 100644 index 000000000000..9c4eb15a4f3d --- /dev/null +++ b/chinese/gcin/distinfo @@ -0,0 +1,2 @@ +MD5 (gcin-0.1.9.tar.bz2) = bd382f4d818061c7d2e20eff7fb43f73 +SIZE (gcin-0.1.9.tar.bz2) = 385011 diff --git a/chinese/gcin/files/patch-IMConn.c b/chinese/gcin/files/patch-IMConn.c new file mode 100644 index 000000000000..9fd32888d1aa --- /dev/null +++ b/chinese/gcin/files/patch-IMConn.c @@ -0,0 +1,11 @@ +--- IMdkit/lib/IMConn.c.orig Sun Jul 2 10:01:01 2000 ++++ IMdkit/lib/IMConn.c Sun Jul 25 19:45:46 2004 +@@ -30,7 +30,7 @@ + ******************************************************************/ + + #include <X11/Xlib.h> +-#include <malloc.h> ++#include <stdlib.h> + #include "IMdkit.h" + #include <stdarg.h> + diff --git a/chinese/gcin/files/patch-IMdkit::Makefile b/chinese/gcin/files/patch-IMdkit::Makefile new file mode 100644 index 000000000000..f4ababa81f90 --- /dev/null +++ b/chinese/gcin/files/patch-IMdkit::Makefile @@ -0,0 +1,22 @@ +--- IMdkit/Makefile.orig Sat Jul 24 19:18:15 2004 ++++ IMdkit/Makefile Sat Jul 24 19:18:30 2004 +@@ -2,15 +2,15 @@ + all: libXimd.a Xi18n_sample/sampleIM + + libXimd.a: +- make -C lib ++ gmake -C lib + + Xi18n_sample/sampleIM: +- cd Xi18n_sample; make ++ cd Xi18n_sample; gmake + + clean: + rm -f *.bak *~ +- make -C lib clean +- make -C Xi18n_sample clean ++ gmake -C lib clean ++ gmake -C Xi18n_sample clean + + install: + @echo nothing to be installed. diff --git a/chinese/gcin/files/patch-IMdkit::lib::Makefile b/chinese/gcin/files/patch-IMdkit::lib::Makefile new file mode 100644 index 000000000000..53127bb43d19 --- /dev/null +++ b/chinese/gcin/files/patch-IMdkit::lib::Makefile @@ -0,0 +1,9 @@ +--- IMdkit/lib/Makefile.orig Sun Aug 1 00:51:25 2004 ++++ IMdkit/lib/Makefile Sun Aug 1 00:51:29 2004 +@@ -1,6 +1,5 @@ + include ../../config.mak + +-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 $(OPTFLAGS) -fno-strength-reduce -DXIM_t -DTRANS_SERVER + INC = -I../include -I/usr/X11R6/include diff --git a/chinese/gcin/files/patch-Makefile b/chinese/gcin/files/patch-Makefile new file mode 100644 index 000000000000..7ca06d232983 --- /dev/null +++ b/chinese/gcin/files/patch-Makefile @@ -0,0 +1,88 @@ +--- Makefile.orig Tue Jul 20 13:01:30 2004 ++++ Makefile Thu Jul 29 03:09:13 2004 +@@ -1,5 +1,3 @@ +-OPTFLAGS=-g +- + include config.mak + + .SUFFIXES: .c .o .E +@@ -7,9 +5,9 @@ + OBJS=gcin.o IC.o eve.o win0.o pho.o tsin.o win1.o util.o pho-util.o gcin-conf.o tsin-util.o \ + win-sym.o intcode.o pho-sym.o win-int.o win-pho.o gcin-settings.o + OBJS_TSLEARN=tslearn.o util.o gcin-conf.o pho-util.o tsin-util.o gcin-send.o pho-sym.o +-OBJS_phod2a=phod2a.o pho-util.o gcin-conf.o pho-sym.o +-OBJS_tsa2d=tsa2d.o gcin-send.o util.o pho-sym.o gcin-conf.o +-OBJS_phoa2d=phoa2d.o pho-sym.o gcin-send.o gcin-conf.o ++OBJS_phod2a=phod2a.o pho-util.o pho-sym.o ++OBJS_tsa2d=tsa2d.o util.o pho-sym.o ++OBJS_phoa2d=phoa2d.o pho-sym.o + OBJS_kbmcv=kbmcv.o pho-sym.o + OBJS_tsd2a=tsd2a.o pho-sym.o + OBJS_gcin_steup=gcin-setup.o gcin-conf.o util.o gcin-send.o gcin-settings.o +@@ -26,7 +24,7 @@ + PROGS_CV=kbmcv + + all: $(PROGS) $(DATA) $(PROGS_CV) gcin.spec +- make -C data ++ gmake -C data + + gcin: $(OBJS) $(IMdkitLIB) + $(CC) -o $@ $(OBJS) $(IMdkitLIB) $(LDFLAGS) +@@ -34,28 +32,28 @@ + ln -sf $@ $@.test + + tslearn: $(OBJS_TSLEARN) +- cc -o $@ $(OBJS_TSLEARN) $(LDFLAGS) ++ $(CC) -o $@ $(OBJS_TSLEARN) $(LDFLAGS) + + gcin-setup: $(OBJS_gcin_steup) +- cc -o $@ $(OBJS_gcin_steup) $(LDFLAGS) ++ $(CC) -o $@ $(OBJS_gcin_steup) $(LDFLAGS) + + phoa2d: $(OBJS_phoa2d) +- cc -o $@ $(OBJS_phoa2d) $(LDFLAGS) ++ $(CC) -o $@ $(OBJS_phoa2d) + + phod2a: $(OBJS_phod2a) +- cc -o $@ $(OBJS_phod2a) $(LDFLAGS) ++ $(CC) -o $@ $(OBJS_phod2a) + + tsa2d: $(OBJS_tsa2d) +- cc -o $@ $(OBJS_tsa2d) $(LDFLAGS) ++ $(CC) -o $@ $(OBJS_tsa2d) + + tsd2a: $(OBJS_tsd2a) +- cc -o $@ $(OBJS_tsd2a) $(LDFLAGS) ++ $(CC) -o $@ $(OBJS_tsd2a) + + kbmcv: $(OBJS_kbmcv) + $(CC) -o $@ $(OBJS_kbmcv) + + $(IMdkitLIB): +- make -C IMdkit/lib ++ gmake -C IMdkit/lib + + install: + install -d $(GCIN_TABLE_DIR) +@@ -67,8 +65,8 @@ + install -s $(PROGS) $(bindir) + install -d $(libdir)/menu + install -m 644 menu/* $(libdir)/menu +- make -C data install +- if [ $(prefix) = /usr/local ]; then \ ++ gmake -C data install ++ if [ $(prefix) != /usr/local ]; then \ + install -m 644 menu/* /usr/lib/menu; \ + which update-menus >& /dev/null && update-menus; \ + sh modify-XIM; \ +@@ -78,8 +76,8 @@ + install -m 644 menu/* $(libdir)/menu; \ + fi + clean: +- make -C IMdkit clean +- make -C data clean ++ gmake -C IMdkit clean ++ gmake -C data clean + rm -f *.o *~ *.E config.mak tags core.* $(PROGS) $(PROGS_CV) $(DATA) .depend gcin.spec menu/*~ + cd ..; tar cvfj gcin.tbz gcin + diff --git a/chinese/gcin/files/patch-configure b/chinese/gcin/files/patch-configure new file mode 100644 index 000000000000..ee5e48eda4ab --- /dev/null +++ b/chinese/gcin/files/patch-configure @@ -0,0 +1,11 @@ +--- configure.orig Sat Jul 17 16:26:48 2004 ++++ configure Sun Jul 25 19:48:05 2004 +@@ -38,7 +38,7 @@ + GCIN_VERSION=`cat VERSION.gcin` + sed -e "s/__gcin_version__/$GCIN_VERSION/" < gcin.spec.in > gcin.spec + +-OPTFLAGS="-g" ++OPTFLAGS=$CFLAGS + if [ $prefix = /usr ]; then + OPTFLAGS="-O" + fi diff --git a/chinese/gcin/files/patch-pho-util.c b/chinese/gcin/files/patch-pho-util.c new file mode 100644 index 000000000000..493ef26a135d --- /dev/null +++ b/chinese/gcin/files/patch-pho-util.c @@ -0,0 +1,59 @@ +--- pho-util.c.orig Thu Jul 29 03:08:38 2004 ++++ pho-util.c Thu Jul 29 03:11:44 2004 +@@ -2,34 +2,51 @@ + #include "pho.h" + #include <sys/stat.h> + #include <stdlib.h> ++#include <dirent.h> + +- ++char *fTableDir=GCIN_TABLE_DIR; + char phofname[128]=""; +-extern char *TableDir; + u_short idxnum_pho; + PHO_IDX idx_pho[1403]; + int ch_pho_ofs; + PHO_ITEM *ch_pho; + int ch_phoN; + ++void get_dir(char *tt) ++{ ++ strcpy(tt,(char *)getenv("HOME")); ++ strcat(tt,"/.gcin"); ++ ++ DIR *dir; ++ if ((dir=opendir(tt))==NULL) { ++ char vv[128]; ++ ++ mkdir(tt,0755); ++ sprintf(vv,"cp %s/* %s", fTableDir, tt); ++ system(vv); ++ } ++ else ++ closedir(dir); ++} ++ + void pho_load() + { + #ifndef NO_PRIVATE_TSIN + if (!phofname[0]) { + char tt[128]; + +- get_gcin_dir(tt); ++ get_dir(tt); + strcat(tt,"/pho.tab"); + strcpy(phofname,tt); + + char vv[128]; + if (access(phofname, W_OK) < 0){ +- sprintf(vv,"cp %s/pho.tab %s\n", TableDir, tt); ++ sprintf(vv,"cp %s/pho.tab %s\n", fTableDir, tt); + system(vv); + } + + #else +- strcat(strcpy(phofname, TableDir), "pho.tab"); ++ strcat(strcpy(phofname, fTableDir), "pho.tab"); + #endif + } + diff --git a/chinese/gcin/files/patch-phoa2d.c b/chinese/gcin/files/patch-phoa2d.c new file mode 100644 index 000000000000..fd443312ffd7 --- /dev/null +++ b/chinese/gcin/files/patch-phoa2d.c @@ -0,0 +1,18 @@ +--- phoa2d.c.orig Thu Jul 29 03:15:13 2004 ++++ phoa2d.c Thu Jul 29 03:15:20 2004 +@@ -77,8 +77,6 @@ + FILE *fp; + char s[64]; + +- gtk_init(&argc, &argv); +- + if ((fp=fopen(fname,"r"))==NULL) + p_err("cannot open %s\n", fname); + +@@ -159,6 +157,5 @@ + + fclose(fp); + +- send_gcin_message(GDK_DISPLAY(), "reload"); + return 0; + } diff --git a/chinese/gcin/files/patch-tsa2d.c b/chinese/gcin/files/patch-tsa2d.c new file mode 100644 index 000000000000..5da9c1225c09 --- /dev/null +++ b/chinese/gcin/files/patch-tsa2d.c @@ -0,0 +1,18 @@ +--- tsa2d.c.orig Thu Jul 29 03:14:34 2004 ++++ tsa2d.c Thu Jul 29 03:14:46 2004 +@@ -106,8 +106,6 @@ + int hashidx[256]; + u_char clen, llen; + +- gtk_init(&argc, &argv); +- + if (argc > 1) { + if ((fp=fopen(argv[1], "r"))==NULL) { + printf("Cannot open %s\n", argv[1]); +@@ -300,6 +298,5 @@ + + fclose(fw); + +- send_gcin_message(GDK_DISPLAY(), "reload"); + exit(0); + } diff --git a/chinese/gcin/files/patch-tsin-util.c b/chinese/gcin/files/patch-tsin-util.c new file mode 100644 index 000000000000..d6899f223a3f --- /dev/null +++ b/chinese/gcin/files/patch-tsin-util.c @@ -0,0 +1,11 @@ +--- tsin-util.c.orig Sat Jul 24 19:34:37 2004 ++++ tsin-util.c Sat Jul 24 19:34:55 2004 +@@ -149,7 +149,7 @@ + for(;hashno<256;hashno++) hashidx[hashno]++; + + if ((fw=fopen(tsidxfname,"w"))==NULL) { +- error("%s create err", tsidxfname); ++ p_err("%s create err", tsidxfname); + return FALSE; + } + diff --git a/chinese/gcin/files/patch-tsin.c b/chinese/gcin/files/patch-tsin.c new file mode 100644 index 000000000000..13d4a9b54015 --- /dev/null +++ b/chinese/gcin/files/patch-tsin.c @@ -0,0 +1,11 @@ +--- tsin.c.orig Sat Jul 24 19:33:14 2004 ++++ tsin.c Sat Jul 24 19:34:11 2004 +@@ -722,7 +722,7 @@ + selidx[0]=tmp; + + if ((fp=fopen(tsidxfname,"r+"))==NULL) { +- error("%s modify err", tsidxfname); ++ p_err("%s modify err", tsidxfname); + return; + } + diff --git a/chinese/gcin/pkg-descr b/chinese/gcin/pkg-descr new file mode 100644 index 000000000000..a4f4aaff2860 --- /dev/null +++ b/chinese/gcin/pkg-descr @@ -0,0 +1,4 @@ +gcin is a Gtk Chinese INput application in X, well support in Traditional +Chinese(Big5) charsets. + +WWW: http://www.csie.nctu.edu.tw/~cp76/gcin/ diff --git a/chinese/gcin/pkg-plist b/chinese/gcin/pkg-plist new file mode 100644 index 000000000000..f85f39c48489 --- /dev/null +++ b/chinese/gcin/pkg-plist @@ -0,0 +1,17 @@ +bin/gcin +lib/menu/gcin +lib/menu/gcin-setup +share/gcin/table/pho.tab +share/gcin/table/et.kbm +share/gcin/table/zo.kbm +share/gcin/table/tsin +share/gcin/table/tsin.idx +share/gcin/table/symbol-table +share/icons/gcin.png +share/icons/gcin/pin-fixed24.png +share/icons/gcin/pin-float16.png +@dirrm lib/menu +@dirrm share/icons/gcin +@dirrm share/icons +@dirrm share/gcin/table +@dirrm share/gcin |