aboutsummaryrefslogtreecommitdiffstats
path: root/x11-fonts/xorg-fonts-miscbitmaps
diff options
context:
space:
mode:
authorlesi <lesi@FreeBSD.org>2006-02-06 11:38:29 +0800
committerlesi <lesi@FreeBSD.org>2006-02-06 11:38:29 +0800
commit49e0dc456d0153207ac5529aebad81bade5ff30a (patch)
tree687e4cf279b740ed27153b83bbe5ac2f622b008c /x11-fonts/xorg-fonts-miscbitmaps
parent8f3d9d70d742234f0af48cd4435e890152e36a6a (diff)
downloadfreebsd-ports-gnome-49e0dc456d0153207ac5529aebad81bade5ff30a.tar.gz
freebsd-ports-gnome-49e0dc456d0153207ac5529aebad81bade5ff30a.tar.zst
freebsd-ports-gnome-49e0dc456d0153207ac5529aebad81bade5ff30a.zip
Take care of font cache files on installation and uninstallation of port:
On installation try running fc-cache for directory where fonts from this port are installed and don't complain if fc-cache (from fontconfig) is missing. Do a bit more dancing on uninstall, just in case users have their own fonts installed in same directory: - first remove fonts.cache-1 if it is there since it won't be accurate after fonts from this port are gone anyway, - next try to regenerate cache with fc-cache for this directory - if previous step generates empty cache file, remove it If directory contained only fonts from this port, it should get properly removed at the end. If there were other fonts there and fontconfig is installed, this will leave proper cache file for remaining fonts behind after uninstall of this port.
Diffstat (limited to 'x11-fonts/xorg-fonts-miscbitmaps')
-rw-r--r--x11-fonts/xorg-fonts-miscbitmaps/Makefile4
-rw-r--r--x11-fonts/xorg-fonts-miscbitmaps/pkg-plist4
2 files changed, 8 insertions, 0 deletions
diff --git a/x11-fonts/xorg-fonts-miscbitmaps/Makefile b/x11-fonts/xorg-fonts-miscbitmaps/Makefile
index dc290017b20c..5bb513307b2e 100644
--- a/x11-fonts/xorg-fonts-miscbitmaps/Makefile
+++ b/x11-fonts/xorg-fonts-miscbitmaps/Makefile
@@ -7,6 +7,7 @@
PORTNAME= xorg-fonts-miscbitmaps
PORTVERSION= 6.9.0
+PORTREVISION= 1
CATEGORIES= x11-fonts
MASTER_SITES= ${MASTER_SITE_XORG}
MASTER_SITE_SUBDIR= X11R${PORTVERSION}/src
@@ -25,6 +26,9 @@ EXTRA_PATCHES= ${CF_PATCHES}
XBUILD_DIRS= fonts/encodings fonts/bdf/misc
XINSTALL_DIRS= fonts/bdf/misc
+post-install:
+ @command fc-cache -v ${PREFIX}/lib/X11/fonts/misc
+
.include "${.CURDIR}/../../x11-servers/xorg-server/Makefile.inc"
.include <bsd.port.pre.mk>
.if ${X_WINDOW_SYSTEM:L} != xorg
diff --git a/x11-fonts/xorg-fonts-miscbitmaps/pkg-plist b/x11-fonts/xorg-fonts-miscbitmaps/pkg-plist
index 6469a26932f3..1f4cf0080822 100644
--- a/x11-fonts/xorg-fonts-miscbitmaps/pkg-plist
+++ b/x11-fonts/xorg-fonts-miscbitmaps/pkg-plist
@@ -411,4 +411,8 @@ lib/X11/fonts/misc/olgl10.pcf.gz
lib/X11/fonts/misc/olgl12.pcf.gz
lib/X11/fonts/misc/olgl14.pcf.gz
lib/X11/fonts/misc/olgl19.pcf.gz
+@exec command fc-cache -v %D/lib/X11/fonts/misc 2>/dev/null || true
+@unexec rm %D/lib/X11/fonts/misc/fonts.cache-1 2>/dev/null || true
+@unexec command fc-cache -v %D/lib/X11/fonts/misc 2>/dev/null || true
+@unexec if [ -e %D/lib/X11/fonts/misc/fonts.cache-1 -a ! -s %D/lib/X11/fonts/misc/fonts.cache-1 ]; then rm %D/lib/X11/fonts/misc/fonts.cache-1; fi
@dirrmtry lib/X11/fonts/misc