summaryrefslogtreecommitdiff
path: root/x11-fonts/xorg-fonts-type1
diff options
context:
space:
mode:
authorDejan Lesjak <lesi@FreeBSD.org>2006-02-06 03:38:29 +0000
committerDejan Lesjak <lesi@FreeBSD.org>2006-02-06 03:38:29 +0000
commitd1c60264042d4b5b3cca1f0e347030363a84785c (patch)
treee0c487c1342cfcdf833039417e5546a849770531 /x11-fonts/xorg-fonts-type1
parent- update to 0.37 (diff)
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.
Notes
Notes: svn path=/head/; revision=155290
Diffstat (limited to 'x11-fonts/xorg-fonts-type1')
-rw-r--r--x11-fonts/xorg-fonts-type1/Makefile3
-rw-r--r--x11-fonts/xorg-fonts-type1/pkg-plist5
2 files changed, 7 insertions, 1 deletions
diff --git a/x11-fonts/xorg-fonts-type1/Makefile b/x11-fonts/xorg-fonts-type1/Makefile
index 50e3db6d1e92..a9278dd8d3bd 100644
--- a/x11-fonts/xorg-fonts-type1/Makefile
+++ b/x11-fonts/xorg-fonts-type1/Makefile
@@ -27,6 +27,9 @@ EXTRA_PATCHES= ${CF_PATCHES}
XBUILD_DIRS= fonts/encodings fonts/scaled/Type1
XINSTALL_DIRS= fonts/scaled/Type1
+post-install:
+ @command fc-cache ${PREFIX}/lib/X11/fonts/Type1 || true
+
.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-type1/pkg-plist b/x11-fonts/xorg-fonts-type1/pkg-plist
index a961d728d9da..cc63120c0a1a 100644
--- a/x11-fonts/xorg-fonts-type1/pkg-plist
+++ b/x11-fonts/xorg-fonts-type1/pkg-plist
@@ -58,5 +58,8 @@ lib/X11/fonts/Type1/l049033t.afm
lib/X11/fonts/Type1/l049033t.pfa
lib/X11/fonts/Type1/l049036t.afm
lib/X11/fonts/Type1/l049036t.pfa
-@unexec rm %D/lib/X11/fonts/Type1/fonts.cache-1 2>/dev/null || /usr/bin/true
+@exec command fc-cache %D/lib/X11/fonts/Type1 2>/dev/null || true
+@unexec rm %D/lib/X11/fonts/Type1/fonts.cache-1 2>/dev/null || true
+@unexec command fc-cache %D/lib/X11/fonts/Type1 2>/dev/null || true
+@unexec if [ -e %D/lib/X11/fonts/Type1/fonts.cache-1 -a ! -s %D/lib/X11/fonts/Type1/fonts.cache-1 ]; then rm %D/lib/X11/fonts/Type1/fonts.cache-1; fi
@dirrmtry lib/X11/fonts/Type1