diff options
author | Dejan Lesjak <lesi@FreeBSD.org> | 2006-02-06 03:38:29 +0000 |
---|---|---|
committer | Dejan Lesjak <lesi@FreeBSD.org> | 2006-02-06 03:38:29 +0000 |
commit | d1c60264042d4b5b3cca1f0e347030363a84785c (patch) | |
tree | e0c487c1342cfcdf833039417e5546a849770531 | |
parent | 4fde165b479a28152c3f3d6b89a6c4ae19afbc31 (diff) | |
download | freebsd-ports-d1c60264042d4b5b3cca1f0e347030363a84785c.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.
-rw-r--r-- | x11-fonts/xorg-fonts-100dpi/Makefile | 4 | ||||
-rw-r--r-- | x11-fonts/xorg-fonts-100dpi/pkg-plist | 4 | ||||
-rw-r--r-- | x11-fonts/xorg-fonts-75dpi/Makefile | 4 | ||||
-rw-r--r-- | x11-fonts/xorg-fonts-75dpi/pkg-plist | 4 | ||||
-rw-r--r-- | x11-fonts/xorg-fonts-cyrillic/Makefile | 4 | ||||
-rw-r--r-- | x11-fonts/xorg-fonts-cyrillic/pkg-plist | 4 | ||||
-rw-r--r-- | x11-fonts/xorg-fonts-miscbitmaps/Makefile | 4 | ||||
-rw-r--r-- | x11-fonts/xorg-fonts-miscbitmaps/pkg-plist | 4 | ||||
-rw-r--r-- | x11-fonts/xorg-fonts-truetype/Makefile | 3 | ||||
-rw-r--r-- | x11-fonts/xorg-fonts-truetype/pkg-plist | 5 | ||||
-rw-r--r-- | x11-fonts/xorg-fonts-type1/Makefile | 3 | ||||
-rw-r--r-- | x11-fonts/xorg-fonts-type1/pkg-plist | 5 |
12 files changed, 46 insertions, 2 deletions
diff --git a/x11-fonts/xorg-fonts-100dpi/Makefile b/x11-fonts/xorg-fonts-100dpi/Makefile index 838406d938b8..ba6900da6166 100644 --- a/x11-fonts/xorg-fonts-100dpi/Makefile +++ b/x11-fonts/xorg-fonts-100dpi/Makefile @@ -7,6 +7,7 @@ PORTNAME= xorg-fonts-100dpi 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/100dpi XINSTALL_DIRS= fonts/bdf/100dpi +post-install: + @command fc-cache -v ${PREFIX}/lib/X11/fonts/100dpi || 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-100dpi/pkg-plist b/x11-fonts/xorg-fonts-100dpi/pkg-plist index 27093bbdb16a..3abfa064b642 100644 --- a/x11-fonts/xorg-fonts-100dpi/pkg-plist +++ b/x11-fonts/xorg-fonts-100dpi/pkg-plist @@ -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 diff --git a/x11-fonts/xorg-fonts-75dpi/Makefile b/x11-fonts/xorg-fonts-75dpi/Makefile index 912e041ee014..e612bc51038a 100644 --- a/x11-fonts/xorg-fonts-75dpi/Makefile +++ b/x11-fonts/xorg-fonts-75dpi/Makefile @@ -7,6 +7,7 @@ PORTNAME= xorg-fonts-75dpi 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/75dpi XINSTALL_DIRS= fonts/bdf/75dpi +post-install: + @command fc-cache -v ${PREFIX}/lib/X11/fonts/75dpi || 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-75dpi/pkg-plist b/x11-fonts/xorg-fonts-75dpi/pkg-plist index e7bb739efb25..b8153cdcb280 100644 --- a/x11-fonts/xorg-fonts-75dpi/pkg-plist +++ b/x11-fonts/xorg-fonts-75dpi/pkg-plist @@ -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 diff --git a/x11-fonts/xorg-fonts-cyrillic/Makefile b/x11-fonts/xorg-fonts-cyrillic/Makefile index 83ff10e0495d..04299cf856aa 100644 --- a/x11-fonts/xorg-fonts-cyrillic/Makefile +++ b/x11-fonts/xorg-fonts-cyrillic/Makefile @@ -7,6 +7,7 @@ PORTNAME= xorg-fonts-cyrillic 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/cyrillic XINSTALL_DIRS= fonts/bdf/cyrillic +post-install: + @command fc-cache -v ${PREFIX}/lib/X11/fonts/cyrillic || 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-cyrillic/pkg-plist b/x11-fonts/xorg-fonts-cyrillic/pkg-plist index b76ad7fdb128..420ee72f398c 100644 --- a/x11-fonts/xorg-fonts-cyrillic/pkg-plist +++ b/x11-fonts/xorg-fonts-cyrillic/pkg-plist @@ -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 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 diff --git a/x11-fonts/xorg-fonts-truetype/Makefile b/x11-fonts/xorg-fonts-truetype/Makefile index 6fb39156ca50..38019103f01e 100644 --- a/x11-fonts/xorg-fonts-truetype/Makefile +++ b/x11-fonts/xorg-fonts-truetype/Makefile @@ -28,6 +28,9 @@ EXTRA_PATCHES= ${CF_PATCHES} XBUILD_DIRS= fonts/encodings fonts/scaled/TTF XINSTALL_DIRS= fonts/scaled/TTF +post-install: + @command fc-cache -v ${PREFIX}/lib/X11/fonts/TTF || 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-truetype/pkg-plist b/x11-fonts/xorg-fonts-truetype/pkg-plist index e9c1f5ba7814..6111aee20ed6 100644 --- a/x11-fonts/xorg-fonts-truetype/pkg-plist +++ b/x11-fonts/xorg-fonts-truetype/pkg-plist @@ -13,5 +13,8 @@ lib/X11/fonts/TTF/luxisb.ttf lib/X11/fonts/TTF/luxisbi.ttf lib/X11/fonts/TTF/luxisr.ttf lib/X11/fonts/TTF/luxisri.ttf -@unexec rm %D/lib/X11/fonts/TTF/fonts.cache-1 2>/dev/null || /usr/bin/true +@exec command fc-cache -v %D/lib/X11/fonts/TTF 2>/dev/null || true +@unexec rm %D/lib/X11/fonts/TTF/fonts.cache-1 2>/dev/null || true +@unexec command fc-cache -v %D/lib/X11/fonts/TTF 2>/dev/null || true +@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 @dirrmtry lib/X11/fonts/TTF 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 |