Add kon2 ,

kanji On Console -- Display kanji characters on your own
console.

PR:		50819
Submitted by:	Chen Chuan-Hsing <statue@freebsd.sinica.edu.tw>
This commit is contained in:
Vanilla I. Shu 2003-05-13 01:19:36 +00:00
parent 2ed1d397eb
commit 14eeb3f72c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=80863
5 changed files with 93 additions and 0 deletions

View file

@ -58,6 +58,7 @@
SUBDIR += kcfonts
SUBDIR += kde3-i18n-zh_CN
SUBDIR += kde3-i18n-zh_TW
SUBDIR += kon2
SUBDIR += libtabe
SUBDIR += links
SUBDIR += linux-gtk

44
chinese/kon2/Makefile Normal file
View file

@ -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"

View file

@ -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

View file

@ -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},

13
chinese/kon2/pkg-plist Normal file
View file

@ -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