freebsd-ports/chinese/arphicttf/pkg-install
Jing-Tang Keith Jang 95c6fbe7e4 Displays verbose message when install, and also adds
the WITHOUT_X option.

Tested under:	current+XFree86-4 & stable+XFree86-3
2000-12-10 07:12:06 +00:00

54 lines
1.1 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="bkai00mp.ttf bsmi00lp.ttf gbsn00lp.ttf gkai00mp.ttf"
DEFAULTMING="bsmi00lp.ttf gbsn00lp.ttf"
DEFAULTKAI="bkai00mp.ttf gkai00mp.ttf"
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
echo "xttfm" >> $FONTDIR/$PKGNAME
fi
exit 0