freebsd-ports/Keywords/fcfontsdir.ucl
Mathieu Arnold 5d33e04596
framework: Remove $FreeBSD$
Where appropriate fiddle with a few other things.
2021-04-06 16:27:10 +02:00

27 lines
786 B
Text

# MAINTAINER: x11@FreeBSD.org
actions: [dir]
post-install: <<EOD
case "%@" in
/*) fontsdir="%@" ;;
*) fontsdir="%D/%@" ;;
esac
fc-cache -fs ${fontsdir} 2>/dev/null || true
mkfontscale ${fontsdir} 2>/dev/null || true
mkfontdir ${fontsdir} 2>/dev/null || true
EOD
post-deinstall: <<EOD
case "%@" in
/*) fontsdir="%@" ;;
*) fontsdir="%D/%@" ;;
esac
fc-cache -fs ${fontsdir} 2>/dev/null || true
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