aboutsummaryrefslogtreecommitdiff
path: root/Keywords
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2015-09-13 23:30:21 +0000
committerHiroki Sato <hrs@FreeBSD.org>2015-09-13 23:30:21 +0000
commitc716728e4a1cae2ad6028534945293e137836147 (patch)
tree1a67644e105cbc6d90a8fd706eab8d540be9817b /Keywords
parentad82069793328501cd08ee10ac260edd67a26618 (diff)
downloadports-c716728e4a1cae2ad6028534945293e137836147.tar.gz
ports-c716728e4a1cae2ad6028534945293e137836147.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)
Notes
Notes: svn path=/head/; revision=396872
Diffstat (limited to 'Keywords')
-rw-r--r--Keywords/fc.ucl19
-rw-r--r--Keywords/fontsdir.ucl27
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