mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-31 21:57:12 +00:00
de0cdb9f9e
the fonts are encoded in BIG5, the characters and symbols are from several less commonly used layers in CNS. See http://www.edu.tw/mandr/bbs/1-4-2/1-4-2.html for more details. Also displays messages about WANT_XX when installing.
65 lines
1.5 KiB
Bash
65 lines
1.5 KiB
Bash
#!/bin/sh
|
|
|
|
if [ "$2" = "PRE-INSTALL" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
PKGNAME=$1
|
|
PREFIX=${PKG_PREFIX}
|
|
TTFM=${PREFIX}/bin/ttfm.sh
|
|
|
|
FONTDIR=${PREFIX}/share/fonts/TrueType
|
|
FONTS="moe_lishu.ttf moe_kai.ttf moe_sung.ttf moe_sungext.ttf moe_sungsym.ttf"
|
|
if [ "X$DEFAULT" != "X" ]; then
|
|
DEFAULTMING="moe_sung.ttf"
|
|
DEFAULTKAI="moe_kai.ttf"
|
|
fi
|
|
|
|
TEMPFILE=`mktemp -q /tmp/moettf.XXXX`
|
|
XFONTDIR=/usr/X11R6/lib/X11/fonts/TrueType
|
|
|
|
if [ ! -x $TTFM ]; then
|
|
echo "$TTFM not found!"
|
|
exit 1
|
|
fi
|
|
|
|
rm -f $FONTDIR/$PKGNAME
|
|
|
|
if [ "X$WANT_CJK" != "X" ]; then
|
|
# There's no CJK module now.
|
|
fi
|
|
|
|
if [ "X$WANT_GS6" != "X" ]; then
|
|
for f in $FONTS; do
|
|
$TTFM --add ghostscript6 $FONTDIR/$f
|
|
done
|
|
for f in $DEFAULTMING; do
|
|
$TTFM --setdefault ghostscript6 $FONTDIR/$f
|
|
done
|
|
for f in $DEFAULTKAI; do
|
|
$TTFM --setdefault_kai ghostscript6 $FONTDIR/$f
|
|
done
|
|
echo "ghostscript6" >> $FONTDIR/$PKGNAME
|
|
fi
|
|
|
|
if [ "X$WITHOUT_X" = "X" ]; then
|
|
for f in $FONTS; do
|
|
$TTFM --add xttfm $FONTDIR/$f
|
|
done
|
|
for f in $DEFAULTMING; do
|
|
$TTFM --setdefault xttfm $FONTDIR/$f
|
|
done
|
|
for f in $DEFAULTKAI; do
|
|
$TTFM --setdefault_kai xttfm $FONTDIR/$f
|
|
done
|
|
sed -e "s/ ° ê ¦ r ¼ Ð · Ç § º Å é/twmoe_sung/g" -e "s/ t w m o e _ k a i/twmoe_kai/g" $XFONTDIR/fonts.dir > $TEMPFILE
|
|
mv $TEMPFILE $XFONTDIR/fonts.dir
|
|
sed -e "s/ ° ê ¦ r ¼ Ð · Ç § º Å é/twmoe_sung/g" -e "s/ t w m o e _ k a i/twmoe_kai/g" $XFONTDIR/fonts.alias > $TEMPFILE
|
|
mv $TEMPFILE $XFONTDIR/fonts.alias
|
|
echo "xttfm" >> $FONTDIR/$PKGNAME
|
|
fi
|
|
|
|
rm -f $TEMPFILE
|
|
|
|
exit 0
|