aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2008-04-06 19:58:29 +0800
committerrafan <rafan@FreeBSD.org>2008-04-06 19:58:29 +0800
commita0f651dcb42c826446abe1245112dc9f12b0725a (patch)
treed000468343a7987320f09ad868602650000f2aa5
parent129bf8eef13a80443de96b8712256d8af785c27f (diff)
downloadfreebsd-ports-graphics-a0f651dcb42c826446abe1245112dc9f12b0725a.tar.gz
freebsd-ports-graphics-a0f651dcb42c826446abe1245112dc9f12b0725a.tar.zst
freebsd-ports-graphics-a0f651dcb42c826446abe1245112dc9f12b0725a.zip
- Use correct locale zh_CN.GB2312 instead of invalid locale zh_CN.EUC
- Bump PORTREVISION PR: ports/122091 Submitted by: Yuri <yuri at tsoft.com>
-rw-r--r--chinese/chinput3/Makefile2
-rw-r--r--chinese/chinput3/files/patch-src_Chinput-3.0.2_resource_Chinput.ad13
-rw-r--r--chinese/chinput3/files/patch-src_Chinput-3.0.2_src_init.c32
-rw-r--r--chinese/chinput3/files/pkg-message.in2
4 files changed, 47 insertions, 2 deletions
diff --git a/chinese/chinput3/Makefile b/chinese/chinput3/Makefile
index 0309736f92d..449c46d3f77 100644
--- a/chinese/chinput3/Makefile
+++ b/chinese/chinput3/Makefile
@@ -7,7 +7,7 @@
PORTNAME= chinput
PORTVERSION= 3.0.2.5
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= chinese x11
MASTER_SITES= http://ftp.jaist.ac.jp/pub/FreeBSD/distfiles/ \
http://www.gtlib.gatech.edu/pub/FreeBSD/distfiles/
diff --git a/chinese/chinput3/files/patch-src_Chinput-3.0.2_resource_Chinput.ad b/chinese/chinput3/files/patch-src_Chinput-3.0.2_resource_Chinput.ad
new file mode 100644
index 00000000000..2464e63e287
--- /dev/null
+++ b/chinese/chinput3/files/patch-src_Chinput-3.0.2_resource_Chinput.ad
@@ -0,0 +1,13 @@
+--- src/Chinput-3.0.2/resource/Chinput.ad.orig 2008-03-25 12:16:09.000000000 -0700
++++ src/Chinput-3.0.2/resource/Chinput.ad 2008-03-25 12:21:36.000000000 -0700
+@@ -2,8 +2,8 @@
+ !It based on chinput
+
+
+-chinput.gblocale = zh_CN.EUC
+-chinput.big5locale = zh_CN.EUC
++chinput.gblocale = zh_CN.GB2312
++chinput.big5locale = zh_CN.GB2312
+
+ !
+ ! input style: AUTO, ROOT, OVERSPOT, ONSPOT, OFFSPOT
diff --git a/chinese/chinput3/files/patch-src_Chinput-3.0.2_src_init.c b/chinese/chinput3/files/patch-src_Chinput-3.0.2_src_init.c
new file mode 100644
index 00000000000..34ad8740ad5
--- /dev/null
+++ b/chinese/chinput3/files/patch-src_Chinput-3.0.2_src_init.c
@@ -0,0 +1,32 @@
+--- src/Chinput-3.0.2/src/init.c.orig 2008-03-25 11:18:01.000000000 -0700
++++ src/Chinput-3.0.2/src/init.c 2008-03-25 12:23:41.000000000 -0700
+@@ -94,6 +94,13 @@
+ load_font(&font_info, font_latin);
+ }
+
++static int is_locale_supported(char *locale) {
++ char *setlocale_string = setlocale(LC_ALL, locale);
++ int success = (setlocale_string != NULL && strcmp(setlocale_string, locale)==0 && XSupportsLocale());
++ if (!success && locale[0] != 0 && setlocale_string != NULL && setlocale_string[0] != 0) {
++ fprintf(stderr, "Error : requested locale '%s' not supported\n");
++ }
++}
+
+ void HZinitServerGC(void)
+ {
+@@ -103,12 +110,9 @@
+ char fontname[256];
+
+ //create font set
+- if(strcmp(setlocale(LC_ALL, gb18030locale), gb18030locale) ||
+- !XSupportsLocale()){
+- if(strcmp(setlocale(LC_ALL, gbklocale), gbklocale) ||
+- !XSupportsLocale()){
+- if(strcmp(setlocale(LC_ALL, gblocale), gblocale) ||
+- !XSupportsLocale()){
++ if(!is_locale_supported(gb18030locale)){
++ if(!is_locale_supported(gbklocale)){
++ if(!is_locale_supported(gblocale)){
+ fprintf(stderr, "Error : Chinese Locale not supported!\n");
+ exit(1);
+ }
diff --git a/chinese/chinput3/files/pkg-message.in b/chinese/chinput3/files/pkg-message.in
index acc0298d882..eb3bb5e49bf 100644
--- a/chinese/chinput3/files/pkg-message.in
+++ b/chinese/chinput3/files/pkg-message.in
@@ -6,5 +6,5 @@ If not exist, copy %%X11BASE%%/lib/X11/locale/zh/XI18N_OBJS to it.
Remember to set environment varible XMODIFIERS:
csh/tcsh: setenv XMODIFIERS @im=Chinput
sh/bash: export XMODIFIERS='@im=Chinput'
-and set LANG, LC_CTYPE to zh_CN.EUC.
+and set LANG, LC_CTYPE to zh_CN.GB2312.
-------------------------------------------------------------------------------
* Update to 0.183lioux2002-08-232-2/+2 * BerkeleyDB cleanup - stage 2ade2002-08-231-1/+2 * Update to version 0.1.28kevlo2002-08-223-10/+95 * Update to 0.8.3pat2002-08-128-6/+32 * Upgrade to 0.26, which has fixes for the test suite, and the AUTOLOADdougb2002-08-073-15/+14 * Add mydns, the MySQL DNS server.anders2002-08-0618-0/+322 * Updated to 0.94 (fixed error with calling getpeername() on anskv2002-08-053-5/+5 * Upgrade to version 0.25, which cleans up CERT.pm a bit, and alsodougb2002-08-052-2/+2 * No need to deal with this test for a port installdougb2002-08-051-0/+55 * typoijliao2002-08-014-4/+4 * add MASTER_SITE_ISC (1) and apply themijliao2002-08-015-20/+10 * Update to 1.0.06pat2002-07-312-2/+2 * Update to 1.6pat2002-07-312-2/+3 * Another client to update your IP on dynamic DNS services ...se2002-07-245-0/+65 * Update to version 0.24, which contains:dougb2002-07-243-3/+4 * Update to 0.178lioux2002-07-232-2/+2 * Remove cjm2@altavista.net as MAINTAINER. Mail has been bouncing forfenner2002-07-221-1/+1 * add fastresolve 2.8ijliao2002-07-156-0/+102 * Update to 1.0.02pat2002-07-132-2/+2 * * Further improve the lot of those who use this port to replace thedougb2002-07-122-8/+15 * Update to 0.6.1.knu2002-07-083-13/+2 * Update to 0.177lioux2002-07-072-2/+2 * Update to 1.02. Remove the patch, since it (and more) was included intotobez2002-07-02