c716728e4a
They controls whether fc-cache and/or mkfontdir run in post-{,de}install targets. japanese/font-* use manually generates fonts.dir entries to utilize special modifiers which are useful for CJK fonts. Because mkfontdir does not understand and silently remove them from fonts.dir, options like fonts:fc or fonts:none is required. Approved by: portmgr (bapt)
27 lines
706 B
Text
27 lines
706 B
Text
# $FreeBSD$
|
|
#
|
|
# MAINTAINER: x11@FreeBSD.org
|
|
|
|
actions: [dir]
|
|
post-install: <<EOD
|
|
case "%@" in
|
|
/*) fontsdir="%@" ;;
|
|
*) fontsdir="%D/%@" ;;
|
|
esac
|
|
mkfontscale ${fontsdir} 2>/dev/null || true
|
|
mkfontdir ${fontsdir} 2>/dev/null || true
|
|
EOD
|
|
post-deinstall: <<EOD
|
|
case "%@" in
|
|
/*) fontsdir="%@" ;;
|
|
*) fontsdir="%D/%@" ;;
|
|
esac
|
|
mkfontscale ${fontsdir} 2>/dev/null || true
|
|
if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
|
|
rm ${fontsdir}/fonts.scale
|
|
fi
|
|
mkfontdir ${fontsdir} 2>/dev/null || true
|
|
if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
|
|
rm ${fontsdir}/fonts.dir
|
|
fi
|
|
EOD
|