summaryrefslogtreecommitdiff
path: root/chinese/kon2
diff options
context:
space:
mode:
authorVanilla I. Shu <vanilla@FreeBSD.org>2003-05-13 01:19:36 +0000
committerVanilla I. Shu <vanilla@FreeBSD.org>2003-05-13 01:19:36 +0000
commit14eeb3f72c5095639159c26191ce44a00b203476 (patch)
treef947161ff06c87d697bcea8213871433e139c13c /chinese/kon2
parentMake it ready for coming slave ports. (diff)
Add kon2 ,
kanji On Console -- Display kanji characters on your own console. PR: 50819 Submitted by: Chen Chuan-Hsing <statue@freebsd.sinica.edu.tw>
Notes
Notes: svn path=/head/; revision=80863
Diffstat (limited to 'chinese/kon2')
-rw-r--r--chinese/kon2/Makefile44
-rw-r--r--chinese/kon2/files/patch-kon.cfg.FreeBSD10
-rw-r--r--chinese/kon2/files/patch-lib::coding.c25
-rw-r--r--chinese/kon2/pkg-plist13
4 files changed, 92 insertions, 0 deletions
diff --git a/chinese/kon2/Makefile b/chinese/kon2/Makefile
new file mode 100644
index 000000000000..35880f82d490
--- /dev/null
+++ b/chinese/kon2/Makefile
@@ -0,0 +1,44 @@
+# New ports collection makefile for: kon2 with 16dot font
+# Date created: 31 March 2003
+# Whom: Chen Chuan-Hsing <statue@freebsd.sinica.edu.tw>
+#
+# $FreeBSD$
+#
+
+MASTERDIR= ${.CURDIR}/../../japanese/kon2-16dot
+EXTRA_PATCHES= ${.CURDIR}/files/patch-kon.cfg.FreeBSD \
+ ${.CURDIR}/files/patch-lib::coding.c
+CATEGORIES= chinese
+
+MAINTAINER= statue@freebsd.sinica.edu.tw
+
+BUILD_DEPENDS+= ${LOCALBASE}/share/fonts/bdf/kc15f.bdf.gz:${PORTSDIR}/chinese/kcfonts:patch \
+ ${LOCALBASE}/share/fonts/bdf/gbkst.bdf.gz:${PORTSDIR}/chinese/fcitx:extract \
+ pcf2bdf:${PORTSDIR}/x11-fonts/pcf2bdf
+
+USE_REINPLACE= yes
+PLIST= pkg-plist
+KCFONTS_WRKSRC= `cd ${PORTSDIR}/chinese/kcfonts; make -V WRKSRC`
+FCITX_WRKSRC= `cd ${PORTSDIR}/chinese/fcitx; make -V WRKSRC`
+
+post-patch:
+ ${REINPLACE_CMD} -e "s;jiskan16.bdf.gz;kc15f.bdf.gz;g" \
+ -e "s;ja_JP.ujis:Coding;ja_JP.ujis:;g" \
+ -e "s;zh_TW.big5:;zh_TW.big5:Coding;g" \
+ -e "s;BIG5.HKU-0;BIG5-0;g" \
+ -e "s,GB2312.1980,GBK,g" \
+ ${WRKSRC}/kon.cfg.FreeBSD
+ ${REINPLACE_CMD} -e "s;BIG5.HKU-0;BIG5-0;g" \
+ -e "s;BIG5, 0;BIG5, 0xfefe;g" \
+ -e "s,GB2312.1980,GBK,g" \
+ ${WRKSRC}/lib/coding.c
+
+pre-install:
+ ${MKDIR} ${PREFIX}/share/fonts/bdf
+ cd ${KCFONTS_WRKSRC} && gcc -O -pipe -o kc15f tran.c kc15f.c && \
+ ./kc15f | ${GZIP_CMD} - > ${PREFIX}/share/fonts/bdf/kc15f.bdf.gz
+ cd ${FCITX_WRKSRC}/fonts && ${GUNZIP_CMD} -cd gbkst16.pcf | pcf2bdf | \
+ ${SED} -e 's/gbk/GBK/g' -e '/^$$/d' | ${GZIP_CMD} - > \
+ ${PREFIX}/share/fonts/bdf/gbkst16.bdf.gz
+
+.include "${MASTERDIR}/Makefile"
diff --git a/chinese/kon2/files/patch-kon.cfg.FreeBSD b/chinese/kon2/files/patch-kon.cfg.FreeBSD
new file mode 100644
index 000000000000..1c816b710cb6
--- /dev/null
+++ b/chinese/kon2/files/patch-kon.cfg.FreeBSD
@@ -0,0 +1,10 @@
+--- kon.cfg.FreeBSD.orig Mon May 5 04:38:23 2003
++++ kon.cfg.FreeBSD Mon May 5 04:38:41 2003
+@@ -116,6 +116,7 @@
+ # Startup command definition (usually font loading commands are specified)
+ bdf-zcat16:@@KON16FONT@@
+ gzip -cd @@PREFIX@@/share/fonts/bdf/kc15f.bdf.gz | /usr/local/bin/fld -t bdf -n
++ gzip -cd @@PREFIX@@/share/fonts/bdf/gbkst16.bdf.gz | /usr/local/bin/fld -t bdf -n
+ gzip -cd @@PREFIX@@/share/fonts/bdf/8x16rk.bdf.gz | /usr/local/bin/fld -t bdf -n
+ bdf-zcat14:@@KON14FONT@@
+ gzip -cd @@PREFIX@@/share/fonts/bdf/k14.bdf.gz | /usr/local/bin/fld -t bdf -n
diff --git a/chinese/kon2/files/patch-lib::coding.c b/chinese/kon2/files/patch-lib::coding.c
new file mode 100644
index 000000000000..09ce75eb0503
--- /dev/null
+++ b/chinese/kon2/files/patch-lib::coding.c
@@ -0,0 +1,25 @@
+--- lib/coding.c.orig Sat May 3 01:39:46 2003
++++ lib/coding.c Sat May 3 01:41:08 2003
+@@ -43,10 +43,10 @@
+
+ static u_int GB2312(u_char ch1, u_char ch2)
+ {
+- if (ch1 > 0x29)
+- return(((ch1 - 0x27) * 94 + ch2 - 0x21) << 5);
++ if (ch1 < 0x80)
++ return(((ch1 - 0x81) * 191 + ch2 - 0x40) << 5);
+ else
+- return(((ch1 - 0x21) * 94 + ch2 - 0x21) << 5);
++ return(((ch1 - 0x81) * 191 + 63 + ch2 - 0x80) << 5);
+ }
+
+ static u_int BIG5(u_char ch1, u_char ch2)
+@@ -135,7 +135,7 @@
+ };
+
+ struct fontLoaderRegs fldDRegs[] = {
+- { FldGB2312, 0},
++ { GB2312, 0},
+ {FldJISX0208, 0x7424},
+ { FldKSC5601, 0x7D7E},
+ {FldJISX0208, 0x7424},
diff --git a/chinese/kon2/pkg-plist b/chinese/kon2/pkg-plist
new file mode 100644
index 000000000000..96239cf8b2a2
--- /dev/null
+++ b/chinese/kon2/pkg-plist
@@ -0,0 +1,13 @@
+bin/fld
+bin/kon
+etc/kon.cfg
+share/fonts/bdf/7x14rk.bdf.gz
+share/fonts/bdf/k14.bdf.gz
+share/fonts/bdf/8x16rk.bdf.gz
+share/fonts/bdf/jiskan16.bdf.gz
+share/fonts/bdf/gbkst16.bdf.gz
+share/fonts/bdf/kc15f.bdf.gz
+share/doc/kon2/README
+share/doc/kon2/README.FreeBSD
+@dirrm share/doc/kon2
+@dirrm share/fonts/bdf