From f0fefed0d41dcd9935ca40d43f20b0a3c9226d5a Mon Sep 17 00:00:00 2001 From: Jing-Tang Keith Jang Date: Mon, 4 Dec 2000 12:59:39 +0000 Subject: Remove the old brute-force script that generates thousands of XLFD. Many of them are unnecessary, and most of the task are handled by ttfm now. It's also aware of chinese/{CJK, ghostscript6}. It supports XFree86 3.x or 4.x by default. Users only need to define GS6=yes or CJK=yes when installing, then it'll do most of the work. CJK and ghostscript6 ports should specify their respective variables via DEPENDS_ARGS. chinese/{moettf,moefonts-cid,wangttf} will have similar changes. --- chinese/arphicttf/pkg-deinstall | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'chinese/arphicttf/pkg-deinstall') diff --git a/chinese/arphicttf/pkg-deinstall b/chinese/arphicttf/pkg-deinstall index ed6e4ba2c642..c29500f46075 100644 --- a/chinese/arphicttf/pkg-deinstall +++ b/chinese/arphicttf/pkg-deinstall @@ -1,17 +1,26 @@ #!/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 +PKGNAME=$1 +PREFIX=${PKG_PREFIX} +TTFM=${PKG_PREFIX}/bin/ttfm.sh + +FONTDIR=${PREFIX}/share/fonts/TrueType +FONTS="bkai00mp.ttf bsmi00lp.ttf gbsn00lp.ttf gkai00mp.ttf" +DEFAULTMING="default_ming-big5-0.ttf default_ming-gb2312.1980-0.ttf" +DEFAULTKAI="default_kai-big5-0.ttf default_kai-gb2312.1980-0.ttf" + +if [ -r $FONTDIR/$PKGNAME ]; then + for i in `cat $FONTDIR/$PKGNAME`; do + for f in $FONTS $DEFAULTMING $DEFAULTKAI; do + $TTFM --remove $i $f + done + done +fi + +rm -f $FONTDIR/$PKGNAME -# Restore fonts.alias -sed -e '/^-ar-/d' -e '/^-arphic-/d' fonts.alias > fonts.alias.tmp -mv -f fonts.alias.tmp fonts.alias +exit 0 -- cgit v1.2.3