summaryrefslogtreecommitdiff
path: root/chinese
diff options
context:
space:
mode:
authorClive Lin <clive@FreeBSD.org>2002-03-06 03:29:13 +0000
committerClive Lin <clive@FreeBSD.org>2002-03-06 03:29:13 +0000
commitff17900312d5ff99e9811d36684ac0bd5ab4369f (patch)
tree54b5edddd8f9bd14480969f219174585cea5d567 /chinese
parentUpdate mastersites (diff)
o Update zhcon to version 0.2.
o Add zh_TW.Big5 po messages. o Remove big5 IME extra-patches and merge it into standard FreeBSD patches. PR: ports/35271 Submitted by: Yen-Ming Lee <leeym@leeym.com>
Notes
Notes: svn path=/head/; revision=55612
Diffstat (limited to 'chinese')
-rw-r--r--chinese/zhcon/Makefile46
-rw-r--r--chinese/zhcon/distinfo3
-rw-r--r--chinese/zhcon/files/extrapatch-aa13
-rw-r--r--chinese/zhcon/files/patch-aa11
-rw-r--r--chinese/zhcon/files/patch-ab28
-rw-r--r--chinese/zhcon/files/patch-src::Makefile.am15
-rw-r--r--chinese/zhcon/files/patch-src::Makefile.in15
-rw-r--r--chinese/zhcon/files/patch-src::display::fbdev.cpp29
-rw-r--r--chinese/zhcon/files/patch-src::nativeinputserver.cpp45
-rw-r--r--chinese/zhcon/files/patch-src::zhcon.cpp48
-rw-r--r--chinese/zhcon/pkg-plist80
11 files changed, 211 insertions, 122 deletions
diff --git a/chinese/zhcon/Makefile b/chinese/zhcon/Makefile
index 10137e43afbc..aee62bb1b178 100644
--- a/chinese/zhcon/Makefile
+++ b/chinese/zhcon/Makefile
@@ -6,58 +6,26 @@
#
PORTNAME= zhcon
-PORTVERSION= 0.14f
-PORTREVISION= 4
+PORTVERSION= 0.2
CATEGORIES= chinese
-MASTER_SITES= http://freebsd.sinica.edu.tw/~statue/ \
- ftp://ftp.gnuchina.org/pub/linux/chinese/inputmethod/console/zhcon/BSDPort/ \
- http://www.cis.nctu.edu.tw/~gis89501/zhcon/
-DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} zhb5-ime-2.tgz
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= statue@freebsd.sinica.edu.tw
+LIB_DEPENDS= intl.1:${PORTSDIR}/devel/gettext
+
GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --with-included-gettext=${LOCALBASE}
USE_GMAKE= yes
MAN1= zhcon.1
.include <bsd.port.pre.mk>
-.if defined(WITH_BIG5)
-PLIST_SUB+= BIG5IME=""
-.else
-PLIST_SUB+= BIG5IME="@comment "
-.endif
-
-.if !defined(WITH_BIG5)
-pre-everything::
- @${ECHO_MSG}
- @${ECHO_MSG} "If you want to compile with Big5 IME support,"
- @${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_BIG5=yes\""
- @${ECHO_MSG}
-.endif
-
post-patch:
.if ${OSVERSION} > 500012
- @${PERL} -pi -e 's,machine/console.h>,sys/consio.h>\n#include <sys/fbio.h>\n#include <sys/kbio.h>\n,' ${WRKSRC}/${PORTNAME}/*.cpp
-.endif
-.if defined(WITH_BIG5)
-.for file in zhcon-0.14-big5-bar.diff.gz zhcon-0.14-big5-dirty-ime.diff.gz
- @${GZCAT} ${WRKDIR}/zh-big5-ime/${file} | ${PATCH} ${PATCH_DIST_ARGS:S/p0/p1/}
-.endfor
-.endif
-
-post-build:
-.if defined(WITH_BIG5)
- @cd ${WRKDIR}/zh-big5-ime; ${SETENV} BATCH=yes ./configure; make all
-.endif
-
-post-install:
-.if defined(WITH_BIG5)
-.for file in big5-*.mb
- @${INSTALL_DATA} ${WRKDIR}/zh-big5-ime/mb/${file} ${PREFIX}/lib/zhcon
-.endfor
- @${INSTALL_DATA} ${WRKDIR}/zh-big5-ime/zhcon.cfg.big5 ${PREFIX}/lib/zhcon/zhcon.cfg
+ @${FIND} ${WRKSRC}/src/ -name "*.cpp" | ${XARGS} ${PERL} -pi.bak -e 's,machine/console.h>,sys/consio.h>\n#include <sys/fbio.h>\n#include <sys/kbio.h>\n,'
.endif
.include <bsd.port.post.mk>
diff --git a/chinese/zhcon/distinfo b/chinese/zhcon/distinfo
index a2d2d031b57f..b6d51a53c250 100644
--- a/chinese/zhcon/distinfo
+++ b/chinese/zhcon/distinfo
@@ -1,2 +1 @@
-MD5 (zhcon-0.14f.tar.gz) = d7a8c49bc7b7d97cd30385f0110806bc
-MD5 (zhb5-ime-2.tgz) = b28e10fc9c07baa0b574bf6253714450
+MD5 (zhcon-0.2.tar.gz) = 67ea99f487c9c2d878238213e5162560
diff --git a/chinese/zhcon/files/extrapatch-aa b/chinese/zhcon/files/extrapatch-aa
index 04ca74370675..e69de29bb2d1 100644
--- a/chinese/zhcon/files/extrapatch-aa
+++ b/chinese/zhcon/files/extrapatch-aa
@@ -1,13 +0,0 @@
---- src/cin2mb.c.orig Tue Sep 11 02:27:51 2001
-+++ src/cin2mb.c Tue Sep 11 09:14:54 2001
-@@ -229,7 +229,10 @@
- buf[0] = buf[1] = buf[2] = buf[3] = '\0';
- if(fwrite(buf, sizeof(char), 4, fout)!=4) {
- printf("Fatal write 0000 failed.\n");
-+ goto error_close_fout;
- }
-+
-+ return(0);
-
- error_close_fout:
- if(fout!=NULL) fclose(fout);
diff --git a/chinese/zhcon/files/patch-aa b/chinese/zhcon/files/patch-aa
index 8bef2bd5570f..e69de29bb2d1 100644
--- a/chinese/zhcon/files/patch-aa
+++ b/chinese/zhcon/files/patch-aa
@@ -1,11 +0,0 @@
---- configure.orig Sat Sep 8 19:16:35 2001
-+++ configure Sat Sep 8 19:16:51 2001
-@@ -707,7 +707,7 @@
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
-- for ac_prog in ginstall scoinst install; do
-+ for ac_prog in install scoinst ginstall; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
diff --git a/chinese/zhcon/files/patch-ab b/chinese/zhcon/files/patch-ab
index 58d1e54162de..e69de29bb2d1 100644
--- a/chinese/zhcon/files/patch-ab
+++ b/chinese/zhcon/files/patch-ab
@@ -1,28 +0,0 @@
---- zhcon/bsdfactory.cpp.orig Sun Sep 9 13:19:32 2001
-+++ zhcon/bsdfactory.cpp Sun Sep 9 13:54:13 2001
-@@ -102,11 +102,24 @@
- }
-
- printf ("len %d\n", buflen);
-+#if (__FreeBSD__ <= 3)
- if ((vga = open("/dev/vga", O_RDWR | O_NDELAY)) < 0) {
-+#else
-+ if ((vga = open("/dev/mem", O_RDWR | O_NDELAY)) < 0) {
-+#endif
- throw(runtime_error("Can not open vga device.\n"));
- }
-
-- buf = static_cast<char *>(mmap(0, buflen, PROT_READ | PROT_WRITE, MAP_SHARED, vga, 0));
-+ if ((buf = static_cast<char *>(valloc(buflen))) == NULL) {
-+ throw(runtime_error("Can not open vga device.\n"));
-+ }
-+
-+#if (__FreeBSD__ <= 3)
-+#define GRAPH_BASE 0x0
-+#else
-+#define GRAPH_BASE 0xA0000
-+#endif
-+ buf = static_cast<char *>(mmap(buf, buflen, PROT_READ | PROT_WRITE, MAP_FILE|MAP_SHARED|MAP_FIXED, vga, GRAPH_BASE));
- close(vga);
-
- if (buf == MAP_FAILED)
diff --git a/chinese/zhcon/files/patch-src::Makefile.am b/chinese/zhcon/files/patch-src::Makefile.am
new file mode 100644
index 000000000000..769b7ae97887
--- /dev/null
+++ b/chinese/zhcon/files/patch-src::Makefile.am
@@ -0,0 +1,15 @@
+--- src/Makefile.am.orig Tue Dec 18 20:39:48 2001
++++ src/Makefile.am Sun Feb 24 14:25:34 2002
+@@ -9,10 +9,10 @@
+
+ install-data-local:
+ $(mkinstalldirs) $(libdir)/zhcon/
+- $(INSTALL_DATA) $(srcdir)/zhcon.conf /etc/zhcon.conf
++ $(INSTALL_DATA) $(srcdir)/zhcon.conf $(PREFIX)/etc/zhcon.conf.sample
+
+ uninstall-local:
+- -rm -f /etc/zhcon.conf
++ -rm -f $(PREFIX)/etc/zhcon.conf.sample
+
+ bin_PROGRAMS = zhcon
+ AM_INSTALL_PROGRAM_FLAGS= -m 4775
diff --git a/chinese/zhcon/files/patch-src::Makefile.in b/chinese/zhcon/files/patch-src::Makefile.in
new file mode 100644
index 000000000000..91ba399f080a
--- /dev/null
+++ b/chinese/zhcon/files/patch-src::Makefile.in
@@ -0,0 +1,15 @@
+--- src/Makefile.in.orig Sun Feb 17 02:15:15 2002
++++ src/Makefile.in Sun Feb 24 14:25:35 2002
+@@ -441,10 +441,10 @@
+
+ install-data-local:
+ $(mkinstalldirs) $(libdir)/zhcon/
+- $(INSTALL_DATA) $(srcdir)/zhcon.conf /etc/zhcon.conf
++ $(INSTALL_DATA) $(srcdir)/zhcon.conf $(PREFIX)/etc/zhcon.conf.sample
+
+ uninstall-local:
+- -rm -f /etc/zhcon.conf
++ -rm -f $(PREFIX)/etc/zhcon.conf.sample
+
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/chinese/zhcon/files/patch-src::display::fbdev.cpp b/chinese/zhcon/files/patch-src::display::fbdev.cpp
new file mode 100644
index 000000000000..af259e4a71ab
--- /dev/null
+++ b/chinese/zhcon/files/patch-src::display::fbdev.cpp
@@ -0,0 +1,29 @@
+--- src/display/fbdev.cpp.orig Fri Feb 15 20:15:58 2002
++++ src/display/fbdev.cpp Sun Feb 24 14:25:35 2002
+@@ -202,7 +202,11 @@
+ }
+
+ // printf ("len %d\n", mpBufLen);
++#if (__FreeBSD__ <= 3)
+ if ((mFd = open("/dev/vga", O_RDWR | O_NDELAY)) < 0) {
++#else
++ if ((mFd = open("/dev/mem", O_RDWR | O_NDELAY)) < 0) {
++#endif
+ throw(runtime_error("Can not open vga device.\n"));
+ }
+
+@@ -229,8 +233,13 @@
+ throw(runtime_error("color depth unsupported in this version\n"
+ "use 8bpp instead!"));
+ }
++#if (__FreeBSD__ <= 3)
++#define GRAPH_BASE 0x0
++#else
++#define GRAPH_BASE 0xA0000
++#endif
+ mpBuf = static_cast<char *>(mmap(0, mpBufLen, PROT_READ | PROT_WRITE,
+- MAP_SHARED, mFd, 0));
++ MAP_FILE|MAP_SHARED|MAP_FIXED, mFd, GRAPH_BASE));
+
+ if (mpBuf == MAP_FAILED)
+ throw(runtime_error("mmap() failed!"));
diff --git a/chinese/zhcon/files/patch-src::nativeinputserver.cpp b/chinese/zhcon/files/patch-src::nativeinputserver.cpp
new file mode 100644
index 000000000000..eb9f29db02b6
--- /dev/null
+++ b/chinese/zhcon/files/patch-src::nativeinputserver.cpp
@@ -0,0 +1,45 @@
+--- src/nativeinputserver.cpp.orig Sun Feb 10 01:18:58 2002
++++ src/nativeinputserver.cpp Sun Feb 24 14:25:35 2002
+@@ -151,10 +151,31 @@
+ }
+ else {
+ mInput.erase(mInput.end() - 1);
+- Beep();
++ //Beep();
++ switch(c)
++ {
++ case '0':
++ case '1':
++ case '2':
++ case '3':
++ case '4':
++ case '5':
++ case '6':
++ case '7':
++ case '8':
++ case '9':
++ case '+':
++ case '=':
++ case '-':
++ case '_':
++ goto Select;
++ default:
++ Beep();
++ }
+ }
+ }
+ } else {
++Select:
+ if (mList.mCount > 0) {
+ switch (c) {
+ case 033:
+@@ -210,6 +231,9 @@
+ if (c < mShownWords) {
+ s = Select(c);
+ rBuf = s;
++ mpIme->Reset();
++ mInput = "";
++ mList.Reset();
+ } else
+ Beep();
+ break;
diff --git a/chinese/zhcon/files/patch-src::zhcon.cpp b/chinese/zhcon/files/patch-src::zhcon.cpp
new file mode 100644
index 000000000000..acb3320dc494
--- /dev/null
+++ b/chinese/zhcon/files/patch-src::zhcon.cpp
@@ -0,0 +1,48 @@
+--- src/zhcon.cpp.orig Sun Feb 17 02:12:17 2002
++++ src/zhcon.cpp Sun Feb 24 14:31:41 2002
+@@ -113,7 +113,7 @@
+ string cfgfile = getenv("HOME");
+ cfgfile += "/.zhconrc";
+ if (access(cfgfile.c_str(), R_OK) != 0)
+- cfgfile = "/etc/zhcon.conf";
++ cfgfile = PREFIX"/etc/zhcon.conf";
+
+ // char c;cin>>c;
+ ConfigFile f(cfgfile.c_str());
+@@ -129,6 +129,7 @@
+ InstallVtHandle();
+ InstallSignal();
+ ForkPty();
++ SetEncode(mDefaultEncode, mDefaultEncode);
+ InitInputManager(f);
+ if (f.GetOption("startupmsg",true))
+ StartupMsg();
+@@ -489,23 +490,23 @@
+ string s;
+ s = f.GetOption(string("defaultencode"), string("gb2312"));
+ if (s == "gb2312") {
+- SetEncode(GB2312,GB2312);
++ //SetEncode(GB2312,GB2312);
+ setenv("LC_ALL", "zh_CN.GB2312", 1);
+ mDefaultEncode = GB2312;
+ } else if (s == "gbk") {
+- SetEncode(GBK,GBK);
++ //SetEncode(GBK,GBK);
+ setenv("LC_ALL", "zh_CN.GBK", 1);
+ mDefaultEncode = GBK;
+ } else if (s == "big5") {
+- SetEncode(BIG5,BIG5);
++ //SetEncode(BIG5,BIG5);
+ setenv("LC_ALL", "zh_TW.Big5", 1);
+ mDefaultEncode = BIG5;
+ } else if (s == "jis") {
+- SetEncode(JIS,JIS);
++ //SetEncode(JIS,JIS);
+ setenv("LC_ALL", "ja.JIS", 1);
+ mDefaultEncode = JIS;
+ } else if (s == "kscm") {
+- SetEncode(KSCM,KSCM);
++ //SetEncode(KSCM,KSCM);
+ setenv("LC_ALL", "ko", 1);
+ mDefaultEncode = GBK;
+ } else {
diff --git a/chinese/zhcon/pkg-plist b/chinese/zhcon/pkg-plist
index 784ee1fa4ffa..e0a644d5b4c5 100644
--- a/chinese/zhcon/pkg-plist
+++ b/chinese/zhcon/pkg-plist
@@ -1,30 +1,52 @@
bin/zhcon
-lib/zhcon/asc16
-lib/zhcon/big516
-%%BIG5IME%%lib/zhcon/big5-ary30.mb
-%%BIG5IME%%lib/zhcon/big5-cj.mb
-%%BIG5IME%%lib/zhcon/big5-liu5.mb
-%%BIG5IME%%lib/zhcon/big5-phone-et.mb
-%%BIG5IME%%lib/zhcon/big5-phone-gy.mb
-%%BIG5IME%%lib/zhcon/big5-phone-ibm.mb
-%%BIG5IME%%lib/zhcon/big5-phone.mb
-lib/zhcon/cjf.mb
-lib/zhcon/cjj.mb
-lib/zhcon/dzm.mb
-lib/zhcon/ed.mb
-lib/zhcon/gb16
-lib/zhcon/gbk16
-lib/zhcon/jis16
-lib/zhcon/jp.mb
-lib/zhcon/kscm16
-lib/zhcon/pt.mb
-lib/zhcon/py.mb
-lib/zhcon/sp.mb
-lib/zhcon/wb.mb
-lib/zhcon/wbew.mb
-lib/zhcon/wbh.mb
-lib/zhcon/winpy.mb
-lib/zhcon/winsp.mb
-lib/zhcon/winzm.mb
-lib/zhcon/zhcon.cfg
-@dirrm lib/zhcon/
+etc/zhcon.conf.sample
+lib/zhcon/font/asc12.bpsf
+lib/zhcon/font/asc12x.bpsf
+lib/zhcon/font/asc14.bpsf
+lib/zhcon/font/asc14b.bpsf
+lib/zhcon/font/asc16.bpsf
+lib/zhcon/font/asc24.bpsf
+lib/zhcon/font/big5-12-ming.bpsf
+lib/zhcon/font/big5-16-ming.bpsf
+lib/zhcon/font/big5-16.bpsf
+lib/zhcon/font/gb-16.bpsf
+lib/zhcon/font/gb-24-kai.bpsf
+lib/zhcon/font/gbk-16.bpsf
+lib/zhcon/font/hzk12.bpsf
+lib/zhcon/font/hzk14.bpsf
+lib/zhcon/font/hzk16.bpsf
+lib/zhcon/font/jis-16.bpsf
+lib/zhcon/font/kscm-16.bpsf
+lib/zhcon/input/big5-ary30.mb
+lib/zhcon/input/big5-cj.mb
+lib/zhcon/input/big5-liu5.mb
+lib/zhcon/input/big5-phone.mb
+lib/zhcon/input/cjf.mb
+lib/zhcon/input/cjj.mb
+lib/zhcon/input/dzm.mb
+lib/zhcon/input/ed.mb
+lib/zhcon/input/jp.mb
+lib/zhcon/input/pt.mb
+lib/zhcon/input/py.mb
+lib/zhcon/input/sp.mb
+lib/zhcon/input/wb.mb
+lib/zhcon/input/wbew.mb
+lib/zhcon/input/wbh.mb
+lib/zhcon/input/winpy.mb
+lib/zhcon/input/winsp.mb
+lib/zhcon/input/winzm.mb
+share/locale/ja/LC_MESSAGES/zhcon.mo
+share/locale/zh_CN.GB2312/LC_MESSAGES/zhcon.mo
+share/locale/zh_CN.GBK/LC_MESSAGES/zhcon.mo
+share/locale/zh_TW.Big5/LC_MESSAGES/zhcon.mo
+@dirrm share/locale/zh_TW.Big5/LC_MESSAGES
+@dirrm share/locale/zh_TW.Big5
+@dirrm share/locale/zh_CN.GBK/LC_MESSAGES
+@dirrm share/locale/zh_CN.GBK
+@dirrm share/locale/zh_CN.GB2312/LC_MESSAGES
+@dirrm share/locale/zh_CN.GB2312
+@dirrm share/locale/kr/LC_MESSAGES
+@dirrm share/locale/kr
+@dirrm lib/zhcon/input
+@dirrm lib/zhcon/font
+@dirrm lib/zhcon