mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-22 04:17:44 +00:00
Add gcin 0.1.9, a triditional chinese input utility in X.
PR: ports/69530 Submitted by: Shen Chuan-Hsing
This commit is contained in:
parent
580fc6d976
commit
b4e7eef7bd
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=115212
@ -44,6 +44,7 @@
|
||||
SUBDIR += gb2ps
|
||||
SUBDIR += gbfs
|
||||
SUBDIR += gbscript
|
||||
SUBDIR += gcin
|
||||
SUBDIR += gnumeric
|
||||
SUBDIR += gugod-clean
|
||||
SUBDIR += hanzim
|
||||
|
27
chinese/gcin-devel/Makefile
Normal file
27
chinese/gcin-devel/Makefile
Normal file
@ -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>
|
2
chinese/gcin-devel/distinfo
Normal file
2
chinese/gcin-devel/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
MD5 (gcin-0.1.9.tar.bz2) = bd382f4d818061c7d2e20eff7fb43f73
|
||||
SIZE (gcin-0.1.9.tar.bz2) = 385011
|
11
chinese/gcin-devel/files/patch-IMConn.c
Normal file
11
chinese/gcin-devel/files/patch-IMConn.c
Normal file
@ -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>
|
||||
|
22
chinese/gcin-devel/files/patch-IMdkit::Makefile
Normal file
22
chinese/gcin-devel/files/patch-IMdkit::Makefile
Normal file
@ -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.
|
9
chinese/gcin-devel/files/patch-IMdkit::lib::Makefile
Normal file
9
chinese/gcin-devel/files/patch-IMdkit::lib::Makefile
Normal file
@ -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
|
88
chinese/gcin-devel/files/patch-Makefile
Normal file
88
chinese/gcin-devel/files/patch-Makefile
Normal file
@ -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
|
||||
|
11
chinese/gcin-devel/files/patch-configure
Normal file
11
chinese/gcin-devel/files/patch-configure
Normal file
@ -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
|
59
chinese/gcin-devel/files/patch-pho-util.c
Normal file
59
chinese/gcin-devel/files/patch-pho-util.c
Normal file
@ -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
|
||||
}
|
||||
|
18
chinese/gcin-devel/files/patch-phoa2d.c
Normal file
18
chinese/gcin-devel/files/patch-phoa2d.c
Normal file
@ -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;
|
||||
}
|
18
chinese/gcin-devel/files/patch-tsa2d.c
Normal file
18
chinese/gcin-devel/files/patch-tsa2d.c
Normal file
@ -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);
|
||||
}
|
11
chinese/gcin-devel/files/patch-tsin-util.c
Normal file
11
chinese/gcin-devel/files/patch-tsin-util.c
Normal file
@ -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;
|
||||
}
|
||||
|
11
chinese/gcin-devel/files/patch-tsin.c
Normal file
11
chinese/gcin-devel/files/patch-tsin.c
Normal file
@ -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;
|
||||
}
|
||||
|
4
chinese/gcin-devel/pkg-descr
Normal file
4
chinese/gcin-devel/pkg-descr
Normal file
@ -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/
|
17
chinese/gcin-devel/pkg-plist
Normal file
17
chinese/gcin-devel/pkg-plist
Normal file
@ -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
|
27
chinese/gcin/Makefile
Normal file
27
chinese/gcin/Makefile
Normal file
@ -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>
|
2
chinese/gcin/distinfo
Normal file
2
chinese/gcin/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
MD5 (gcin-0.1.9.tar.bz2) = bd382f4d818061c7d2e20eff7fb43f73
|
||||
SIZE (gcin-0.1.9.tar.bz2) = 385011
|
11
chinese/gcin/files/patch-IMConn.c
Normal file
11
chinese/gcin/files/patch-IMConn.c
Normal file
@ -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>
|
||||
|
22
chinese/gcin/files/patch-IMdkit::Makefile
Normal file
22
chinese/gcin/files/patch-IMdkit::Makefile
Normal file
@ -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.
|
9
chinese/gcin/files/patch-IMdkit::lib::Makefile
Normal file
9
chinese/gcin/files/patch-IMdkit::lib::Makefile
Normal file
@ -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
|
88
chinese/gcin/files/patch-Makefile
Normal file
88
chinese/gcin/files/patch-Makefile
Normal file
@ -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
|
||||
|
11
chinese/gcin/files/patch-configure
Normal file
11
chinese/gcin/files/patch-configure
Normal file
@ -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
|
59
chinese/gcin/files/patch-pho-util.c
Normal file
59
chinese/gcin/files/patch-pho-util.c
Normal file
@ -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
|
||||
}
|
||||
|
18
chinese/gcin/files/patch-phoa2d.c
Normal file
18
chinese/gcin/files/patch-phoa2d.c
Normal file
@ -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;
|
||||
}
|
18
chinese/gcin/files/patch-tsa2d.c
Normal file
18
chinese/gcin/files/patch-tsa2d.c
Normal file
@ -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);
|
||||
}
|
11
chinese/gcin/files/patch-tsin-util.c
Normal file
11
chinese/gcin/files/patch-tsin-util.c
Normal file
@ -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;
|
||||
}
|
||||
|
11
chinese/gcin/files/patch-tsin.c
Normal file
11
chinese/gcin/files/patch-tsin.c
Normal file
@ -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;
|
||||
}
|
||||
|
4
chinese/gcin/pkg-descr
Normal file
4
chinese/gcin/pkg-descr
Normal file
@ -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/
|
17
chinese/gcin/pkg-plist
Normal file
17
chinese/gcin/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user