aboutsummaryrefslogtreecommitdiffstats
path: root/chinese/arphicttf
diff options
context:
space:
mode:
authorfoxfair <foxfair@FreeBSD.org>1999-10-19 16:07:46 +0800
committerfoxfair <foxfair@FreeBSD.org>1999-10-19 16:07:46 +0800
commitab71158e2a1d88cc0fbd8f363e55ac4a60c96520 (patch)
tree943c488690415486b28480fac2b387938ca9af9b /chinese/arphicttf
parentfd8313e943e4b0e492591246d01c0a39c878d7a9 (diff)
downloadfreebsd-ports-gnome-ab71158e2a1d88cc0fbd8f363e55ac4a60c96520.tar.gz
freebsd-ports-gnome-ab71158e2a1d88cc0fbd8f363e55ac4a60c96520.tar.zst
freebsd-ports-gnome-ab71158e2a1d88cc0fbd8f363e55ac4a60c96520.zip
PR: 14393
Submitted by: Keith Jang <jtjang@gcn.net.tw> Import new port: Free-distributable Chinese Big5/GB TTFs. This port installs four Chinese Big5/GB TrueType fonts, includes Kaiti/Mingti(Big5) and Kaiti/Sungti(GB). It then can be used along with X Window System or typesetting software like CJK. Thanks to Arphic Technology, you may freely distribute these high-quality fonts under a GPL-based license. See ARPHIC_*.TXT for details.
Diffstat (limited to 'chinese/arphicttf')
-rw-r--r--chinese/arphicttf/Makefile42
-rw-r--r--chinese/arphicttf/distinfo1
-rw-r--r--chinese/arphicttf/pkg-comment1
-rw-r--r--chinese/arphicttf/pkg-deinstall17
-rw-r--r--chinese/arphicttf/pkg-descr5
-rw-r--r--chinese/arphicttf/pkg-install88
-rw-r--r--chinese/arphicttf/pkg-plist8
7 files changed, 162 insertions, 0 deletions
diff --git a/chinese/arphicttf/Makefile b/chinese/arphicttf/Makefile
new file mode 100644
index 000000000000..254db874e580
--- /dev/null
+++ b/chinese/arphicttf/Makefile
@@ -0,0 +1,42 @@
+# New ports collection makefile for: Arphic Chinese TrueType fonts
+# Version required: 1.0
+# Date created: 13 Oct 1999
+# Whom: Keith Jang <jtjang@gcn.net.tw>
+#
+# $FreeBSD$
+#
+
+DISTNAME= zh-arphicttf-1.0
+CATEGORIES= chinese x11-fonts
+MASTER_SITES= ftp://freebsd.sinica.edu.tw/pub/keith/
+
+MAINTAINER= jtjang@gcn.net.tw
+
+LIB_DEPENDS= font.1:${PORTSDIR}/x11-servers/XttXF86srv-common
+
+USE_X_PREFIX= yes
+
+NO_BUILD= yes
+SHAREMODE= 644
+FONTDIR= ${PREFIX}/lib/X11/fonts/TrueType
+
+.include <bsd.port.pre.mk>
+
+do-install:
+.if !exists(${FONTDIR})
+ @${ECHO} "========================================================="
+ @${ECHO} "Please add ${FONTDIR} to your font path"
+ @${ECHO} "in /etc/XF86Config."
+ @${ECHO} "========================================================="
+ @${MKDIR} ${FONTDIR}
+.endif
+ @${INSTALL_DATA} ${WRKDIR}/bkai00mp.ttf ${FONTDIR}
+ @${INSTALL_DATA} ${WRKDIR}/bsmi00lp.ttf ${FONTDIR}
+ @${INSTALL_DATA} ${WRKDIR}/gbsn00lp.ttf ${FONTDIR}
+ @${INSTALL_DATA} ${WRKDIR}/gkai00mp.ttf ${FONTDIR}
+ @${INSTALL_DATA} ${WRKDIR}/ARPHICPL_Big5.TXT ${FONTDIR}
+ @${INSTALL_DATA} ${WRKDIR}/ARPHICPL_Eng.TXT ${FONTDIR}
+ @${INSTALL_DATA} ${WRKDIR}/ARPHICPL_GB.TXT ${FONTDIR}
+ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+
+.include <bsd.port.post.mk>
diff --git a/chinese/arphicttf/distinfo b/chinese/arphicttf/distinfo
new file mode 100644
index 000000000000..cbd56a9b8516
--- /dev/null
+++ b/chinese/arphicttf/distinfo
@@ -0,0 +1 @@
+MD5 (zh-arphicttf-1.0.tar.gz) = 46301301c4a8b201189f923fcd29e7b1
diff --git a/chinese/arphicttf/pkg-comment b/chinese/arphicttf/pkg-comment
new file mode 100644
index 000000000000..f11c2e2a083b
--- /dev/null
+++ b/chinese/arphicttf/pkg-comment
@@ -0,0 +1 @@
+Four Chinese Big5/GB TrueType fonts made by Arphic Technology.
diff --git a/chinese/arphicttf/pkg-deinstall b/chinese/arphicttf/pkg-deinstall
new file mode 100644
index 000000000000..ed6e4ba2c642
--- /dev/null
+++ b/chinese/arphicttf/pkg-deinstall
@@ -0,0 +1,17 @@
+#!/bin/sh
+if [ "$2" != "DEINSTALL" ]; then
+ exit 0
+fi
+FONTDIR=${PKG_PREFIX}/lib/X11/fonts/TrueType
+cd ${FONTDIR}
+
+# Restore fonts.dir
+sed -e '/ -ar-/d' -e '/ -arphic-/d' fonts.dir > fonts.dir.tmp
+numfonts=$(echo $(cat fonts.dir.tmp | wc -l) - 1 | bc)
+echo ${numfonts} > fonts.dir
+sed -e 1d fonts.dir.tmp >> fonts.dir
+rm -f fonts.dir.tmp
+
+# Restore fonts.alias
+sed -e '/^-ar-/d' -e '/^-arphic-/d' fonts.alias > fonts.alias.tmp
+mv -f fonts.alias.tmp fonts.alias
diff --git a/chinese/arphicttf/pkg-descr b/chinese/arphicttf/pkg-descr
new file mode 100644
index 000000000000..7f3332d941f7
--- /dev/null
+++ b/chinese/arphicttf/pkg-descr
@@ -0,0 +1,5 @@
+This port installs four Chinese Big5/GB TrueType fonts, includes
+Kaiti/Mingti(Big5) and Kaiti/Sungti(GB). It then can be used along
+with X Window System or typesetting software like CJK. Thanks to
+Arphic Technology, you may freely distribute these high-quality
+fonts under a GPL-based license. See ARPHIC_*.TXT for details.
diff --git a/chinese/arphicttf/pkg-install b/chinese/arphicttf/pkg-install
new file mode 100644
index 000000000000..f56fd8ce3a18
--- /dev/null
+++ b/chinese/arphicttf/pkg-install
@@ -0,0 +1,88 @@
+#!/bin/sh
+FONTDIR=${PKG_PREFIX}/lib/X11/fonts/TrueType
+if [ "$2" = "PRE-INSTALL" ]; then
+ echo "Please add ${FONTDIR} to your /etc/XF86Config file"
+ exit 0
+fi
+cd ${FONTDIR}
+
+echo "Updating fonts.dir & fonts.alias. This may take a while..."
+# Update fonts.dir
+touch fonts.dir
+sed -e '/ -ar-/d' -e '/ -arphic-/d' fonts.dir > fonts.dir.tmp
+# Add 16 new fonts
+numfonts=$(echo $(cat fonts.dir.tmp |wc -l) - 1 + 16 |bc)
+if [ ${numfonts} -le 16 ]; then # fonts.dir.tmp is empty
+ echo 16 > fonts.dir
+else
+ echo ${numfonts} > fonts.dir
+ sed -e 1d fonts.dir.tmp >> fonts.dir
+fi
+rm -f fonts.dir.tmp
+
+# The TTF filenames are so diverse that we can only iterate one
+# by one, instead of a generic for loop.
+
+# bkai00mp.ttf (Big5)
+echo bkai00mp.ttf -ar-kai-medium-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
+echo ab=y:bkai00mp.ttf -ar-kai-bold-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
+echo ai=0.3:bkai00mp.ttf -ar-kai-medium-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
+echo ab=y:ai=0.3:bkai00mp.ttf -ar-kai-bold-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
+
+# bsmi00lp.ttf (Big5)
+echo bsmi00lp.ttf -ar-ming-medium-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
+echo ab=y:bsmi00lp.ttf -ar-ming-bold-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
+echo ai=0.3:bsmi00lp.ttf -ar-ming-medium-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
+echo ab=y:ai=0.3:bsmi00lp.ttf -ar-ming-bold-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
+
+# gbsn00lp.ttf (GB)
+echo gbsn00lp.ttf -ar-sung-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
+echo ab=y:gbsn00lp.ttf -ar-sung-bold-r-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
+echo ai=0.3:gbsn00lp.ttf -ar-sung-medium-i-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
+echo ab=y:ai=0.3:gbsn00lp.ttf -ar-sung-bold-i-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
+
+# gkai00mp.ttf (GB)
+echo bkai00mp.ttf -ar-kai-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
+echo ab=y:bkai00mp.ttf -ar-kai-bold-r-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
+echo ai=0.3:bkai00mp.ttf -ar-kai-medium-i-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
+echo ab=y:ai=0.3:bkai00mp.ttf -ar-kai-bold-i-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
+
+
+# Update fonts.alias, font size ranges from 8 to 128.
+touch fonts.alias
+sed -e '/^-ar-/d' -e '/^-arphic-/d' fonts.alias > fonts.alias.tmp
+mv -f fonts.alias.tmp fonts.alias
+
+# Iterate four fonts, same as in fonts.dir.
+
+# bkai00mp.ttf (Big5)
+SIZE=8
+while [ ${SIZE} -le 128 ]
+do
+ echo -arphic-kai-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-big5-0 -ar-kai-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-big5-0 >> fonts.alias;
+ SIZE=`expr ${SIZE} + 1`;
+done
+
+# bsmi00lp.ttf (Big5)
+SIZE=8
+while [ ${SIZE} -le 128 ]
+do
+ echo -arphic-ming-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-big5-0 -ar-ming-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-big5-0 >> fonts.alias;
+ SIZE=`expr ${SIZE} + 1`;
+done
+
+# gbsn00lp.ttf (GB)
+SIZE=8
+while [ ${SIZE} -le 128 ]
+do
+ echo -arphic-sung-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-gb2312.1980-0 -ar-sung-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-gb2312.1980-0 >> fonts.alias;
+ SIZE=`expr ${SIZE} + 1`;
+done
+
+# gkai00mp.ttf (GB)
+SIZE=8
+while [ ${SIZE} -le 128 ]
+do
+ echo -arphic-kai-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-gb2312.1980-0 -ar-kai-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-gb2312.1980-0 >> fonts.alias;
+ SIZE=`expr ${SIZE} + 1`;
+done
diff --git a/chinese/arphicttf/pkg-plist b/chinese/arphicttf/pkg-plist
new file mode 100644
index 000000000000..9e66a61e7bcb
--- /dev/null
+++ b/chinese/arphicttf/pkg-plist
@@ -0,0 +1,8 @@
+lib/X11/fonts/TrueType/ARPHICPL_Big5.TXT
+lib/X11/fonts/TrueType/ARPHICPL_Eng.TXT
+lib/X11/fonts/TrueType/ARPHICPL_GB.TXT
+lib/X11/fonts/TrueType/bkai00mp.ttf
+lib/X11/fonts/TrueType/bsmi00lp.ttf
+lib/X11/fonts/TrueType/gbsn00lp.ttf
+lib/X11/fonts/TrueType/gkai00mp.ttf
+@unexec rmdir %D/lib/X11/fonts/TrueType 2>/dev/null || true