diff options
author | hrs <hrs@FreeBSD.org> | 2015-09-14 07:30:21 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2015-09-14 07:30:21 +0800 |
commit | 63d8169757727d16412ed5d39f47c9ee728a7a8a (patch) | |
tree | 1a67644e105cbc6d90a8fd706eab8d540be9817b /Keywords | |
parent | 74162b17055fa37cc12d00630996075455a6a8c5 (diff) | |
download | freebsd-ports-gnome-63d8169757727d16412ed5d39f47c9ee728a7a8a.tar.gz freebsd-ports-gnome-63d8169757727d16412ed5d39f47c9ee728a7a8a.tar.zst freebsd-ports-gnome-63d8169757727d16412ed5d39f47c9ee728a7a8a.zip |
Add "fc", "fcfontsdir", "fontsdir", and "none" arguments to USES=fonts.
They controls whether fc-cache and/or mkfontdir run in
post-{,de}install targets.
japanese/font-* use manually generates fonts.dir entries to utilize
special modifiers which are useful for CJK fonts. Because mkfontdir
does not understand and silently remove them from fonts.dir,
options like fonts:fc or fonts:none is required.
Approved by: portmgr (bapt)
Diffstat (limited to 'Keywords')
-rw-r--r-- | Keywords/fc.ucl | 19 | ||||
-rw-r--r-- | Keywords/fontsdir.ucl | 27 |
2 files changed, 46 insertions, 0 deletions
diff --git a/Keywords/fc.ucl b/Keywords/fc.ucl new file mode 100644 index 000000000000..73f659fb36d5 --- /dev/null +++ b/Keywords/fc.ucl @@ -0,0 +1,19 @@ +# $FreeBSD$ +# +# MAINTAINER: x11@FreeBSD.org + +actions: [dir] +post-install: <<EOD + case "%@" in + /*) fontsdir="%@" ;; + *) fontsdir="%D/%@" ;; + esac + fc-cache -fs ${fontsdir} 2>/dev/null || true +EOD +post-deinstall: <<EOD + case "%@" in + /*) fontsdir="%@" ;; + *) fontsdir="%D/%@" ;; + esac + fc-cache -fs ${fontsdir} 2>/dev/null || true +EOD diff --git a/Keywords/fontsdir.ucl b/Keywords/fontsdir.ucl new file mode 100644 index 000000000000..d68b4a73999c --- /dev/null +++ b/Keywords/fontsdir.ucl @@ -0,0 +1,27 @@ +# $FreeBSD$ +# +# MAINTAINER: x11@FreeBSD.org + +actions: [dir] +post-install: <<EOD + case "%@" in + /*) fontsdir="%@" ;; + *) fontsdir="%D/%@" ;; + esac + mkfontscale ${fontsdir} 2>/dev/null || true + mkfontdir ${fontsdir} 2>/dev/null || true +EOD +post-deinstall: <<EOD + case "%@" in + /*) fontsdir="%@" ;; + *) fontsdir="%D/%@" ;; + esac + mkfontscale ${fontsdir} 2>/dev/null || true + if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then + rm ${fontsdir}/fonts.scale + fi + mkfontdir ${fontsdir} 2>/dev/null || true + if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then + rm ${fontsdir}/fonts.dir + fi +EOD |