From 306567bc74fbdfb30c62479083b933835f314c8f Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Fri, 18 Mar 2022 14:36:57 +0100 Subject: [PATCH] x11-fonts/fontconfig: Use triggers to rebuild fc-cache Stop forcing the overwrite of the cache at each run it is not necessary most of the time. Reviewed by: tcberner Differencial Revision: https://reviews.freebsd.org/D34602 While here rework USES=fonts to drop @fcfontsdir which is not nessary anymore and convert the @fontsdir into lua which make it way simpler to read --- Keywords/fcfontsdir.ucl | 27 ---------------- Keywords/fontsdir.ucl | 34 ++++++++------------ Mk/Uses/fonts.mk | 10 +++--- x11-fonts/font-misc-ethiopic/pkg-plist | 2 +- x11-fonts/fontconfig/Makefile | 7 ++-- x11-fonts/fontconfig/files/fontconfig.ucl.in | 9 ++++++ x11-fonts/fontconfig/files/pkg-install.in | 10 ------ 7 files changed, 32 insertions(+), 67 deletions(-) delete mode 100644 Keywords/fcfontsdir.ucl create mode 100644 x11-fonts/fontconfig/files/fontconfig.ucl.in delete mode 100644 x11-fonts/fontconfig/files/pkg-install.in diff --git a/Keywords/fcfontsdir.ucl b/Keywords/fcfontsdir.ucl deleted file mode 100644 index 81f9d4e716ab..000000000000 --- a/Keywords/fcfontsdir.ucl +++ /dev/null @@ -1,27 +0,0 @@ -# MAINTAINER: x11@FreeBSD.org - -actions: [dir] -post-install: </dev/null || true - mkfontscale ${fontsdir} 2>/dev/null || true - mkfontdir ${fontsdir} 2>/dev/null || true -EOD -post-deinstall: </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 diff --git a/Keywords/fontsdir.ucl b/Keywords/fontsdir.ucl index 09c31572bf50..8c0701223e53 100644 --- a/Keywords/fontsdir.ucl +++ b/Keywords/fontsdir.ucl @@ -1,25 +1,19 @@ # MAINTAINER: x11@FreeBSD.org actions: [dir] -post-install: </dev/null || true - mkfontdir ${fontsdir} 2>/dev/null || true +post-install-lua: </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 +post-deinstall-lua: <