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.
This commit is contained in:
parent
a36a1af6f4
commit
2048a96036
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=155404
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= font100dpi
|
||||
PORTVERSION= 4.5.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11-fonts
|
||||
MASTER_SITES= ${MASTER_SITE_XFREE}
|
||||
MASTER_SITE_SUBDIR= ${PORTVERSION}
|
||||
@ -44,6 +45,9 @@ pre-build:
|
||||
(cd ${WRKDIR}/xc/fonts/encodings && \
|
||||
${MAKE} all)
|
||||
|
||||
post-install:
|
||||
@command fc-cache -v ${PREFIX}/lib/X11/fonts/100dpi || true
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
.if ${X_WINDOW_SYSTEM:L} != xfree86-4
|
||||
IGNORE= is part of XFree86 and you have ${X_WINDOW_SYSTEM} set for X11\
|
||||
|
@ -1896,4 +1896,8 @@ lib/X11/fonts/100dpi/timR24-ISO8859-3.pcf.gz
|
||||
lib/X11/fonts/100dpi/timR24-ISO8859-4.pcf.gz
|
||||
lib/X11/fonts/100dpi/timR24-ISO8859-9.pcf.gz
|
||||
lib/X11/fonts/100dpi/timR24.pcf.gz
|
||||
@exec command fc-cache -v %D/lib/X11/fonts/100dpi 2>/dev/null || true
|
||||
@unexec rm %D/lib/X11/fonts/100dpi/fonts.cache-1 2>/dev/null || true
|
||||
@unexec command fc-cache -v %D/lib/X11/fonts/100dpi 2>/dev/null || true
|
||||
@unexec if [ -e %D/lib/X11/fonts/100dpi/fonts.cache-1 -a ! -s %D/lib/X11/fonts/100dpi/fonts.cache-1 ]; then rm %D/lib/X11/fonts/100dpi/fonts.cache-1; fi
|
||||
@dirrmtry lib/X11/fonts/100dpi
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= font75dpi
|
||||
PORTVERSION= 4.5.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11-fonts
|
||||
MASTER_SITES= ${MASTER_SITE_XFREE}
|
||||
MASTER_SITE_SUBDIR= ${PORTVERSION}
|
||||
@ -44,6 +45,9 @@ pre-build:
|
||||
(cd ${WRKDIR}/xc/fonts/encodings && \
|
||||
${MAKE} all)
|
||||
|
||||
post-install:
|
||||
@command fc-cache -v ${PREFIX}/lib/X11/fonts/75dpi || true
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
.if ${X_WINDOW_SYSTEM:L} != xfree86-4
|
||||
IGNORE= is part of XFree86 and you have ${X_WINDOW_SYSTEM} set for X11\
|
||||
|
@ -1896,4 +1896,8 @@ lib/X11/fonts/75dpi/timR24-ISO8859-3.pcf.gz
|
||||
lib/X11/fonts/75dpi/timR24-ISO8859-4.pcf.gz
|
||||
lib/X11/fonts/75dpi/timR24-ISO8859-9.pcf.gz
|
||||
lib/X11/fonts/75dpi/timR24.pcf.gz
|
||||
@exec command fc-cache -v %D/lib/X11/fonts/75dpi 2>/dev/null || true
|
||||
@unexec rm %D/lib/X11/fonts/75dpi/fonts.cache-1 2>/dev/null || true
|
||||
@unexec command fc-cache -v %D/lib/X11/fonts/75dpi 2>/dev/null || true
|
||||
@unexec if [ -e %D/lib/X11/fonts/75dpi/fonts.cache-1 -a ! -s %D/lib/X11/fonts/75dpi/fonts.cache-1 ]; then rm %D/lib/X11/fonts/75dpi/fonts.cache-1; fi
|
||||
@dirrmtry lib/X11/fonts/75dpi
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= fontCyrillic
|
||||
PORTVERSION= 4.5.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11-fonts
|
||||
MASTER_SITES= ${MASTER_SITE_XFREE}
|
||||
MASTER_SITE_SUBDIR= ${PORTVERSION}
|
||||
@ -44,6 +45,9 @@ pre-build:
|
||||
(cd ${WRKDIR}/xc/fonts/encodings && \
|
||||
${MAKE} all)
|
||||
|
||||
post-install:
|
||||
@command fc-cache -v ${PREFIX}/lib/X11/fonts/cyrillic || true
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
.if ${X_WINDOW_SYSTEM:L} != xfree86-4
|
||||
IGNORE= is part of XFree86 and you have ${X_WINDOW_SYSTEM} set for X11\
|
||||
|
@ -84,4 +84,8 @@ lib/X11/fonts/cyrillic/koinil2.pcf.gz
|
||||
lib/X11/fonts/cyrillic/proof9x16.pcf.gz
|
||||
lib/X11/fonts/cyrillic/screen8x16.pcf.gz
|
||||
lib/X11/fonts/cyrillic/screen8x16b.pcf.gz
|
||||
@exec command fc-cache -v %D/lib/X11/fonts/cyrillic 2>/dev/null || true
|
||||
@unexec rm %D/lib/X11/fonts/cyrillic/fonts.cache-1 2>/dev/null || true
|
||||
@unexec command fc-cache -v %D/lib/X11/fonts/cyrillic 2>/dev/null || true
|
||||
@unexec if [ -e %D/lib/X11/fonts/cyrillic/fonts.cache-1 -a ! -s %D/lib/X11/fonts/cyrillic/fonts.cache-1 ]; then rm %D/lib/X11/fonts/cyrillic/fonts.cache-1; fi
|
||||
@dirrmtry lib/X11/fonts/cyrillic
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= fontDefaultBitmaps
|
||||
PORTVERSION= 4.5.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11-fonts
|
||||
MASTER_SITES= ${MASTER_SITE_XFREE}
|
||||
MASTER_SITE_SUBDIR= ${PORTVERSION}
|
||||
@ -52,6 +53,9 @@ pre-build:
|
||||
(cd ${WRKDIR}/xc/fonts/encodings && \
|
||||
${MAKE} all)
|
||||
|
||||
post-install:
|
||||
@command fc-cache -v ${PREFIX}/lib/X11/fonts/cyrillic || true
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
.if ${X_WINDOW_SYSTEM:L} != xfree86-4
|
||||
IGNORE= is part of XFree86 and you have ${X_WINDOW_SYSTEM} set for X11\
|
||||
|
@ -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
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= fontScalable
|
||||
PORTVERSION= 4.5.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11-fonts
|
||||
MASTER_SITES= ${MASTER_SITE_XFREE}
|
||||
MASTER_SITE_SUBDIR= ${PORTVERSION}
|
||||
@ -91,6 +92,12 @@ pre-build:
|
||||
(cd ${WRKDIR}/xc/fonts/encodings && \
|
||||
${MAKE} all)
|
||||
|
||||
post-install:
|
||||
@command fc-cache -v ${PREFIX}/lib/X11/fonts/CID || true
|
||||
@command fc-cache -v ${PREFIX}/lib/X11/fonts/Speedo || true
|
||||
@command fc-cache -v ${PREFIX}/lib/X11/fonts/TTF || true
|
||||
@command fc-cache -v ${PREFIX}/lib/X11/fonts/Type1 || true
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
.if ${X_WINDOW_SYSTEM:L} != xfree86-4
|
||||
IGNORE= is part of XFree86 and you have ${X_WINDOW_SYSTEM} set for X11\
|
||||
|
@ -86,8 +86,22 @@
|
||||
%%TYPE1:%%lib/X11/fonts/Type1/l049033t.pfa
|
||||
%%TYPE1:%%lib/X11/fonts/Type1/l049036t.afm
|
||||
%%TYPE1:%%lib/X11/fonts/Type1/l049036t.pfa
|
||||
@exec command fc-cache -v %D/lib/X11/fonts/CID || true
|
||||
@exec command fc-cache -v %D/lib/X11/fonts/Speedo || true
|
||||
@exec command fc-cache -v %D/lib/X11/fonts/TTF || true
|
||||
@exec command fc-cache -v %D/lib/X11/fonts/Type1 || true
|
||||
@unexec rm %D/lib/X11/fonts/CID/fonts.cache-1 2>/dev/null || true
|
||||
@unexec rm %D/lib/X11/fonts/Speedo/fonts.cache-1 2>/dev/null || true
|
||||
@unexec rm %D/lib/X11/fonts/TTF/fonts.cache-1 2>/dev/null || true
|
||||
@unexec rm %D/lib/X11/fonts/Type1/fonts.cache-1 2>/dev/null || true
|
||||
@unexec command fc-cache -v %D/lib/X11/fonts/CID || true
|
||||
@unexec command fc-cache -v %D/lib/X11/fonts/Speedo || true
|
||||
@unexec command fc-cache -v %D/lib/X11/fonts/TTF || true
|
||||
@unexec command fc-cache -v %D/lib/X11/fonts/Type1 || true
|
||||
@unexec if [ -e %D/lib/X11/fonts/CID/fonts.cache-1 -a ! -s %D/lib/X11/fonts/CID/fonts.cache-1 ]; then rm %D/lib/X11/fonts/CID/fonts.cache-1; fi
|
||||
@unexec if [ -e %D/lib/X11/fonts/Speedo/fonts.cache-1 -a ! -s %D/lib/X11/fonts/Speedo/fonts.cache-1 ]; then rm %D/lib/X11/fonts/Speedo/fonts.cache-1; fi
|
||||
@unexec if [ -e %D/lib/X11/fonts/TTF/fonts.cache-1 -a ! -s %D/lib/X11/fonts/TTF/fonts.cache-1 ]; then rm %D/lib/X11/fonts/TTF/fonts.cache-1; fi
|
||||
@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/Speedo
|
||||
@dirrmtry lib/X11/fonts/Type1
|
||||
@dirrmtry lib/X11/fonts/CID
|
||||
|
Loading…
Reference in New Issue
Block a user