diff options
author | Jing-Tang Keith Jang <keith@FreeBSD.org> | 2000-12-04 12:59:39 +0000 |
---|---|---|
committer | Jing-Tang Keith Jang <keith@FreeBSD.org> | 2000-12-04 12:59:39 +0000 |
commit | f0fefed0d41dcd9935ca40d43f20b0a3c9226d5a (patch) | |
tree | 70a4b78b2506e21f854e8c2927f7511eddfcec4e /chinese/arphicttf/pkg-deinstall | |
parent | Update to 0.9.2. Prior versions of TTFM modules have many (diff) |
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.
Notes
Notes:
svn path=/head/; revision=35650
Diffstat (limited to 'chinese/arphicttf/pkg-deinstall')
-rw-r--r-- | chinese/arphicttf/pkg-deinstall | 31 |
1 files changed, 20 insertions, 11 deletions
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 |