summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDejan Lesjak <lesi@FreeBSD.org>2006-02-06 03:52:37 +0000
committerDejan Lesjak <lesi@FreeBSD.org>2006-02-06 03:52:37 +0000
commit12d66146fd2c4dc54b3f146e9149bb292ff2213e (patch)
tree964926b97887b12cfc34ad1a3e639149e6d092bf
parentTake care of font cache files on installation and uninstallation of port: (diff)
Since fontconfig by default generates font cache files in directories where
this port installs encodings, try to remove them upon uninstallation, so removing of directories has a chance to succeed. Just in case some user has for some reason put fonts under these directories, be nice and try to regenerate cache file and remove it again only if it is empty. Prodded by: kris' new pointyhat checks
-rw-r--r--x11-fonts/xorg-fonts-encodings/Makefile1
-rw-r--r--x11-fonts/xorg-fonts-encodings/pkg-plist6
2 files changed, 7 insertions, 0 deletions
diff --git a/x11-fonts/xorg-fonts-encodings/Makefile b/x11-fonts/xorg-fonts-encodings/Makefile
index 59de097112b4..1435519237f3 100644
--- a/x11-fonts/xorg-fonts-encodings/Makefile
+++ b/x11-fonts/xorg-fonts-encodings/Makefile
@@ -7,6 +7,7 @@
PORTNAME= xorg-fonts-encodings
PORTVERSION= 6.9.0
+PORTREVISION= 1
CATEGORIES= x11-fonts
MASTER_SITES= ${MASTER_SITE_XORG}
MASTER_SITE_SUBDIR= X11R${PORTVERSION}/src
diff --git a/x11-fonts/xorg-fonts-encodings/pkg-plist b/x11-fonts/xorg-fonts-encodings/pkg-plist
index 89c3fd363270..4c0ff6dabef0 100644
--- a/x11-fonts/xorg-fonts-encodings/pkg-plist
+++ b/x11-fonts/xorg-fonts-encodings/pkg-plist
@@ -50,5 +50,11 @@ lib/X11/fonts/encodings/suneu-greek.enc.gz
lib/X11/fonts/encodings/tcvn-0.enc.gz
lib/X11/fonts/encodings/tis620-2.enc.gz
lib/X11/fonts/encodings/viscii1.1-1.enc.gz
+@unexec rm %D/lib/X11/fonts/encodings/large/fonts.cache-1 2>/dev/null || true
+@unexec command fc-cache -v %D/lib/X11/fonts/encodings/large 2>/dev/null || true
+@unexec if [ -e %D/lib/X11/fonts/encodings/large/fonts.cache-1 -a ! -s %D/lib/X11/fonts/encodings/large/fonts.cache-1 ]; then rm %D/lib/X11/fonts/encodings/large/fonts.cache-1; fi
@dirrmtry lib/X11/fonts/encodings/large
+@unexec rm %D/lib/X11/fonts/encodings/fonts.cache-1 2>/dev/null || true
+@unexec command fc-cache -v %D/lib/X11/fonts/encodings 2>/dev/null || true
+@unexec if [ -e %D/lib/X11/fonts/encodings/fonts.cache-1 -a ! -s %D/lib/X11/fonts/encodings/fonts.cache-1 ]; then rm %D/lib/X11/fonts/encodings/fonts.cache-1; fi
@dirrmtry lib/X11/fonts/encodings