diff options
author | foxfair <foxfair@FreeBSD.org> | 1999-07-18 08:57:34 +0800 |
---|---|---|
committer | foxfair <foxfair@FreeBSD.org> | 1999-07-18 08:57:34 +0800 |
commit | f53a1ff22e9391a1092fbe1f3939d0a370ad3dc4 (patch) | |
tree | 70c7c751d17207e88e05305d4b4478456e397e94 | |
parent | 962f4210084a8380394f8084de236b467e503382 (diff) | |
download | freebsd-ports-gnome-f53a1ff22e9391a1092fbe1f3939d0a370ad3dc4.tar.gz freebsd-ports-gnome-f53a1ff22e9391a1092fbe1f3939d0a370ad3dc4.tar.zst freebsd-ports-gnome-f53a1ff22e9391a1092fbe1f3939d0a370ad3dc4.zip |
This port installs Chinese BIG5 TrueType fonts, includes Kai/LiShu/Sung
fonts. It then can be used along with X Window System or typesetting
software like CJK. Restricted usage: end user and non-commericial only.
-rw-r--r-- | chinese/moettf/Makefile | 50 | ||||
-rw-r--r-- | chinese/moettf/distinfo | 3 | ||||
-rw-r--r-- | chinese/moettf/pkg-comment | 1 | ||||
-rw-r--r-- | chinese/moettf/pkg-deinstall | 17 | ||||
-rw-r--r-- | chinese/moettf/pkg-descr | 3 | ||||
-rw-r--r-- | chinese/moettf/pkg-install | 38 | ||||
-rw-r--r-- | chinese/moettf/pkg-plist | 4 |
7 files changed, 116 insertions, 0 deletions
diff --git a/chinese/moettf/Makefile b/chinese/moettf/Makefile new file mode 100644 index 000000000000..d232fd08284b --- /dev/null +++ b/chinese/moettf/Makefile @@ -0,0 +1,50 @@ +# New ports collection makefile for: Chinese Big5 TrueType fonts +# Version required: 1.0 +# Date created: 9 July 1999 +# Whom: Keith Jang <jtjang@gcn.net.tw> +# +# $Id: Makefile,v 1.3 1999/07/17 16:29:44 keith Exp $ +# + +DISTNAME= zh-truetypefonts-1.0 +CATEGORIES= chinese x11-fonts +MASTER_SITES= ftp://ftp.cc.ntut.edu.tw/OS/Linux/packages/chinese/fonts/twmoefont/ttf/ \ + ftp://ftp.ncu.edu.tw/Linux/Chinese/fonts/twmoefont/ttf/ \ + ftp://www.edu.tw/download/mandr/allbook/lishu/ +DISTFILES= moe_kai.ttf moe_sung.ttf edustd-15.exe + +MAINTAINER= jtjang@gcn.net.tw + +BUILD_DEPENDS= unrar:${PORTSDIR}/archivers/unrar +LIB_DEPENDS= font.1:${PORTSDIR}/x11-servers/XttXF86srv-common + +USE_X_PREFIX= yes +DIST_SUBDIR= zh-truetypefonts + +NO_BUILD= yes +NO_CDROM= "Contact Taiwan Ministry of Education for commercial use." +SHAREMODE= 644 +FONTDIR= ${PREFIX}/lib/X11/fonts/TrueType + +.include <bsd.port.pre.mk> + +do-extract: + @${RM} -rf ${WRKDIR} + @${MKDIR} ${WRKDIR} + @unrar x ${DISTDIR}/${DIST_SUBDIR}/edustd-15.exe ${WRKDIR} + @${MV} ${WRKDIR}/Edustd-15.TTF ${WRKDIR}/moe_lishu.ttf + +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}/moe_lishu.ttf ${FONTDIR} + @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/moe_kai.ttf ${FONTDIR} + @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/moe_sung.ttf ${FONTDIR} + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL + +.include <bsd.port.post.mk> diff --git a/chinese/moettf/distinfo b/chinese/moettf/distinfo new file mode 100644 index 000000000000..209d879945fd --- /dev/null +++ b/chinese/moettf/distinfo @@ -0,0 +1,3 @@ +MD5 (zh-truetypefonts/edustd-15.exe) = 89ccf18a6dabe874026922965910ee3d +MD5 (zh-truetypefonts/moe_kai.ttf) = bcbd6cf83b87153f9a725243afe210c7 +MD5 (zh-truetypefonts/moe_sung.ttf) = 6bf81e29d64db09d94bb1f03c041d9b2 diff --git a/chinese/moettf/pkg-comment b/chinese/moettf/pkg-comment new file mode 100644 index 000000000000..538e42f6788a --- /dev/null +++ b/chinese/moettf/pkg-comment @@ -0,0 +1 @@ +Three Chinese BIG5 TrueType fonts: Kai LiShu Sung diff --git a/chinese/moettf/pkg-deinstall b/chinese/moettf/pkg-deinstall new file mode 100644 index 000000000000..8d161a41b09b --- /dev/null +++ b/chinese/moettf/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 '/-moe-/d' -e '/-twmoe-/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 '/^-moe-/d' -e '/^-twmoe-/d' fonts.alias > fonts.alias.tmp +mv -f fonts.alias.tmp fonts.alias diff --git a/chinese/moettf/pkg-descr b/chinese/moettf/pkg-descr new file mode 100644 index 000000000000..030c21017210 --- /dev/null +++ b/chinese/moettf/pkg-descr @@ -0,0 +1,3 @@ +This port installs Chinese BIG5 TrueType fonts, includes Kai/LiShu/Sung +fonts. It then can be used along with X Window System or typesetting +software like CJK. Restricted usage: end user and non-commericial only. diff --git a/chinese/moettf/pkg-install b/chinese/moettf/pkg-install new file mode 100644 index 000000000000..82408268116e --- /dev/null +++ b/chinese/moettf/pkg-install @@ -0,0 +1,38 @@ +#!/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 '/-moe-/d' -e '/-twmoe-/d' fonts.dir > fonts.dir.tmp +# Add 12 new fonts +numfonts=$(echo $(cat fonts.dir.tmp |wc -l) - 1 + 12 |bc) +echo ${numfonts} > fonts.dir +sed -e 1d fonts.dir.tmp >> fonts.dir +for FAMILY in kai lishu sung +do + echo moe_${FAMILY}.ttf -twmoe-${FAMILY}-medium-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir + echo ab=y:moe_${FAMILY}.ttf -twmoe-${FAMILY}-bold-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir + echo ai=0.3:moe_${FAMILY}.ttf -twmoe-${FAMILY}-medium-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir + echo ab=y:ai=0.3:moe_${FAMILY}.ttf -twmoe-${FAMILY}-bold-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir +done +rm -f fonts.dir.tmp + +# Update fonts.alias, font size ranges from 8 to 128. +SIZE=8 +touch fonts.alias +sed -e '/^-moe-/d' -e '/^-twmoe-/d' fonts.alias > fonts.alias.tmp +mv -f fonts.alias.tmp fonts.alias +for FAMILY in kai lishu sung +do + (while [ ${SIZE} -le 128 ] + do + echo -moe-${FAMILY}-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-big5-0 -twmoe-${FAMILY}-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-big5-0 >> fonts.alias; + SIZE=`expr ${SIZE} + 1`; + done) +done diff --git a/chinese/moettf/pkg-plist b/chinese/moettf/pkg-plist new file mode 100644 index 000000000000..7b7bd1a1624b --- /dev/null +++ b/chinese/moettf/pkg-plist @@ -0,0 +1,4 @@ +lib/X11/fonts/TrueType/moe_kai.ttf +lib/X11/fonts/TrueType/moe_lishu.ttf +lib/X11/fonts/TrueType/moe_sung.ttf +@unexec rmdir %D/lib/X11/fonts/TrueType 2>/dev/null || true |