bc871f8be3
Previously, ttmkfdir's output was redirected to fonts.dir, while the correct behaviour is to let it create fonts.scale and then let mkfontdir merge fonts.scale into fonts.dir. type1 handling had a similar problem. Get the wanted behaviour by automatically appending the contents of FONTS_TTF_DIRS and FONTS_TYPE1_DIRS to FONTS_X11_DIRS. Also, save a subshell in install/fonts while there. Bump PKGREVISION for all affected packages. jmmv@ says ok.
47 lines
1.2 KiB
Text
47 lines
1.2 KiB
Text
# $NetBSD: fonts,v 1.6 2004/12/28 14:38:03 wiz Exp $
|
|
#
|
|
# Handle font databases; used by fonts.mk.
|
|
#
|
|
|
|
FONTS_TTF="@FONTS_TTF@"
|
|
FONTS_TTF_DIRS="@FONTS_TTF_DIRS@"
|
|
FONTS_TYPE1="@FONTS_TYPE1@"
|
|
FONTS_TYPE1_DIRS="@FONTS_TYPE1_DIRS@"
|
|
FONTS_X11="@FONTS_X11@"
|
|
FONTS_X11_DIRS="@FONTS_X11_DIRS@"
|
|
TTMKFDIR="@TTMKFDIR@"
|
|
TYPE1INST="@TYPE1INST@"
|
|
MKFONTDIR="@MKFONTDIR@"
|
|
|
|
case ${STAGE} in
|
|
POST-INSTALL|POST-DEINSTALL)
|
|
${ECHO} "===> Updating font databases"
|
|
if [ "${FONTS_TTF}" = "YES" ]; then
|
|
for d in ${FONTS_TTF_DIRS}; do
|
|
if [ -z "`cd $d ; ${LS} | ${GREP} -v .pkgsrc | ${GREP} -v ^fonts | ${GREP} -v ^Fontmap`" ]; then
|
|
${RM} -f $d/fonts* $d/Fontmap*
|
|
else
|
|
( cd $d && ${TTMKFDIR} >/dev/null 2>&1 )
|
|
fi
|
|
done
|
|
fi
|
|
if [ "${FONTS_TYPE1}" = "YES" ]; then
|
|
for d in ${FONTS_TYPE1_DIRS}; do
|
|
if [ -z "`cd $d ; ${LS} | ${GREP} -v .pkgsrc | ${GREP} -v ^fonts | ${GREP} -v ^Fontmap`" ]; then
|
|
${RM} -f $d/fonts* $d/Fontmap*
|
|
else
|
|
( cd $d && ${TYPE1INST} >/dev/null 2>&1 )
|
|
fi
|
|
done
|
|
fi
|
|
if [ "${FONTS_X11}" = "YES" ]; then
|
|
for d in ${FONTS_X11_DIRS}; do
|
|
if [ -z "`cd $d ; ${LS} | ${GREP} -v .pkgsrc | ${GREP} -v ^fonts | ${GREP} -v ^Fontmap`" ]; then
|
|
${RM} -f $d/fonts* $d/Fontmap*
|
|
else
|
|
${MKFONTDIR} $d >/dev/null 2>&1
|
|
fi
|
|
done
|
|
fi
|
|
;;
|
|
esac
|