Index: Keywords/pkg_install.awk =================================================================== --- Keywords/pkg_install.awk +++ Keywords/pkg_install.awk @@ -44,6 +44,45 @@ next } +$1 == "@fc" { + font_dir=$2 + print "@comment begin " $0 + print "@exec fc-cache -s %D/" font_dir " 2>/dev/null || true" + print "@unexec fc-cache -s %D/" font_dir " 2>/dev/null || true" + print "@unexec rmdir %D/"font_dir" 2>/dev/null || true" + print "@comment end " $0 + next +} + +$1 == "@fcfontsdir" { + font_dir=$2 + print "@comment begin " $0 + print "@exec fc-cache -s %D/" font_dir " 2>/dev/null || true" + print "@exec mkfontscale %D/" font_dir " 2>/dev/null || true" + print "@exec mkfontdir %D/" font_dir " 2>/dev/null || true" + print "@unexec fc-cache -s %D/" font_dir " 2>/dev/null || true" + print "@unexec mkfontscale %D/" font_dir " 2>/dev/null || true" + print "@unexec if [ -e %D/%@/fonts.scale -a \"`stat -f '%%z' %D/" font_dir "/fonts.scale 2>/dev/null`\" = '2' ]; then rm %D/" font_dir "/fonts.scale ; fi" + print "@unexec mkfontdir %D/" font_dir " 2>/dev/null || true" + print "@unexec if [ -e %D/" font_dir "/fonts.dir -a `\"`stat -f '%%z' %D/" font_dir "/fonts.dir 2>/dev/null`\" = '2' ]; then rm %D/" font_dir "/fonts.dir ; fi" + print "@unexec rmdir %D/"font_dir" 2>/dev/null || true" + print "@comment end " $0 + next +} + +$1 == "@fontsdir" { + print "@comment begin " $0 + print "@exec mkfontscale %D/" font_dir " 2>/dev/null || true" + print "@exec mkfontdir %D/" font_dir " 2>/dev/null || true" + print "@unexec mkfontscale %D/" font_dir " 2>/dev/null || true" + print "@unexec if [ -e %D/%@/fonts.scale -a \"`stat -f '%%z' %D/" font_dir "/fonts.scale 2>/dev/null`\" = '2' ]; then rm %D/" font_dir "/fonts.scale ; fi" + print "@unexec mkfontdir %D/" font_dir " 2>/dev/null || true" + print "@unexec if [ -e %D/" font_dir "/fonts.dir -a `\"`stat -f '%%z' %D/" font_dir "/fonts.dir 2>/dev/null`\" = '2' ]; then rm %D/" font_dir "/fonts.dir ; fi" + print "@unexec rmdir %D/"font_dir" 2>/dev/null || true" + print "@comment end " $0 + next +} + # Print everything else as-is { print $0 Index: Mk/bsd.xorg.mk =================================================================== --- Mk/bsd.xorg.mk +++ Mk/bsd.xorg.mk @@ -105,7 +105,6 @@ . endif post-install: -.if defined(WITH_PKGNG) . for _fontdir in ${FONTDIR} . if ${INSTALLS_TTF} == yes && ${NEED_MKFONTFOO} == yes @${ECHO_CMD} "@fcfontsdir lib/X11/fonts/${_fontdir}" >> ${TMPPLIST} @@ -114,29 +113,9 @@ . elif ${NEED_MKFONTFOO} == yes @${ECHO_CMD} "@fontsdir lib/X11/fonts/${_fontdir}" >> ${TMPPLIST} . else - @${ECHO_CMD} "@dirrmtry lib/X11/fonts/${_fontdir}" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec rmdir %D/lib/X11/fonts/${_fontdir} 2>/dev/null || true" >> ${TMPPLIST} . endif . endfor -.else -. if ${INSTALLS_TTF} == "yes" -. for _fontdir in ${FONTDIR} - @${ECHO_CMD} "@exec fc-cache -s %D/lib/X11/fonts/${_fontdir} 2>/dev/null || true" >> ${TMPPLIST} - @${ECHO_CMD} "@unexec fc-cache -s %D/lib/X11/fonts/${_fontdir} 2>/dev/null || true" >> ${TMPPLIST} - @${ECHO_CMD} "@unexec rmdir %D/lib/X11/fonts/${_fontdir} 2>/dev/null || true" >> ${TMPPLIST} -. endfor -. endif -. for _fontdir in ${FONTDIR} -. if ${NEED_MKFONTFOO} == "yes" - @${ECHO_CMD} "@exec mkfontscale %D/lib/X11/fonts/${_fontdir} 2>/dev/null || true" >> ${TMPPLIST} - @${ECHO_CMD} "@unexec mkfontscale %D/lib/X11/fonts/${_fontdir} 2>/dev/null || true" >> ${TMPPLIST} - @${ECHO_CMD} "@unexec if [ -e %D/lib/X11/fonts/${_fontdir}/fonts.scale -a \"\`stat -f '%%z' %D/lib/X11/fonts/${_fontdir}/fonts.scale 2>/dev/null\`\" = '2' ]; then rm %D/lib/X11/fonts/${_fontdir}/fonts.scale; fi" >> ${TMPPLIST} - @${ECHO_CMD} "@exec mkfontdir %D/lib/X11/fonts/${_fontdir} 2>/dev/null || true" >> ${TMPPLIST} - @${ECHO_CMD} "@unexec mkfontdir %D/lib/X11/fonts/${_fontdir} 2>/dev/null || true" >> ${TMPPLIST} - @${ECHO_CMD} "@unexec if [ -e %D/lib/X11/fonts/${_fontdir}/fonts.dir -a \"\`stat -f '%%z' %D/lib/X11/fonts/${_fontdir}/fonts.dir 2>/dev/null\`\" = '2' ]; then rm %D/lib/X11/fonts/${_fontdir}/fonts.dir; fi" >> ${TMPPLIST} -. endif - @${ECHO_CMD} "@unexec rmdir %D/lib/X11/fonts/${_fontdir} 2>/dev/null || true" >> ${TMPPLIST} -. endfor -. endif .endif . if ${XORG_CAT} == "lib" Index: x11-fonts/urwfonts-ttf/pkg-plist =================================================================== --- x11-fonts/urwfonts-ttf/pkg-plist +++ x11-fonts/urwfonts-ttf/pkg-plist @@ -36,6 +36,4 @@ %%FONTDIR%%/p052024l.ttf %%FONTDIR%%/s050000l.ttf %%FONTDIR%%/z003034l.ttf -@unexec fc-cache -s %%PREFIX%%/%%FONTDIR%% || : -@exec fc-cache -s %%PREFIX%%/%%FONTDIR%% || : -@dirrmtry %%FONTDIR%% +@fc %%FONTSDIR%%