aboutsummaryrefslogtreecommitdiffstats
path: root/Keywords
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-06-12 18:11:23 +0800
committerbapt <bapt@FreeBSD.org>2014-06-12 18:11:23 +0800
commit11a20c4944e5bef2ca03b853bcb228faf389fdfe (patch)
tree3c7b597e1b6d866ad2bfcef8143f3d3d0980e1cf /Keywords
parent3dc67ec896f185eb71f9d79465b4773c4c35f0e9 (diff)
downloadfreebsd-ports-gnome-11a20c4944e5bef2ca03b853bcb228faf389fdfe.tar.gz
freebsd-ports-gnome-11a20c4944e5bef2ca03b853bcb228faf389fdfe.tar.zst
freebsd-ports-gnome-11a20c4944e5bef2ca03b853bcb228faf389fdfe.zip
Make pkg_install aware of @fc @fcfontsdir and @fontsdir
Forgotten in previous commit Tested by: mandree
Diffstat (limited to 'Keywords')
-rw-r--r--Keywords/pkg_install.awk39
1 files changed, 39 insertions, 0 deletions
diff --git a/Keywords/pkg_install.awk b/Keywords/pkg_install.awk
index c5bc96de82cf..c69f7ebf234d 100644
--- a/Keywords/pkg_install.awk
+++ b/Keywords/pkg_install.awk
@@ -44,6 +44,45 @@ $1 == "@shell" {
next
}
+$1 == "@fc" {
+ font_dir=$2
+ print "@comment begin " $0
+ print "@exec fc-cache -s %D/" font_dir " 2>/dev/null || true"
+ print "@unexec fc-cache -s %D/" font_dir " 2>/dev/null || true"
+ print "@unexec rmdir %D/"font_dir" 2>/dev/null || true"
+ print "@comment end " $0
+ next
+}
+
+$1 == "@fcfontsdir" {
+ font_dir=$2
+ print "@comment begin " $0
+ print "@exec fc-cache -s %D/" font_dir " 2>/dev/null || true"
+ print "@exec mkfontscale %D/" font_dir " 2>/dev/null || true"
+ print "@exec mkfontdir %D/" font_dir " 2>/dev/null || true"
+ print "@unexec fc-cache -s %D/" font_dir " 2>/dev/null || true"
+ print "@unexec mkfontscale %D/" font_dir " 2>/dev/null || true"
+ print "@unexec if [ -e %D/%@/fonts.scale -a \"`stat -f '%%z' %D/" font_dir "/fonts.scale 2>/dev/null`\" = '2' ]; then rm %D/" font_dir "/fonts.scale ; fi"
+ print "@unexec mkfontdir %D/" font_dir " 2>/dev/null || true"
+ print "@unexec if [ -e %D/" font_dir "/fonts.dir -a `\"`stat -f '%%z' %D/" font_dir "/fonts.dir 2>/dev/null`\" = '2' ]; then rm %D/" font_dir "/fonts.dir ; fi"
+ print "@unexec rmdir %D/"font_dir" 2>/dev/null || true"
+ print "@comment end " $0
+ next
+}
+
+$1 == "@fontsdir" {
+ print "@comment begin " $0
+ print "@exec mkfontscale %D/" font_dir " 2>/dev/null || true"
+ print "@exec mkfontdir %D/" font_dir " 2>/dev/null || true"
+ print "@unexec mkfontscale %D/" font_dir " 2>/dev/null || true"
+ print "@unexec if [ -e %D/%@/fonts.scale -a \"`stat -f '%%z' %D/" font_dir "/fonts.scale 2>/dev/null`\" = '2' ]; then rm %D/" font_dir "/fonts.scale ; fi"
+ print "@unexec mkfontdir %D/" font_dir " 2>/dev/null || true"
+ print "@unexec if [ -e %D/" font_dir "/fonts.dir -a `\"`stat -f '%%z' %D/" font_dir "/fonts.dir 2>/dev/null`\" = '2' ]; then rm %D/" font_dir "/fonts.dir ; fi"
+ print "@unexec rmdir %D/"font_dir" 2>/dev/null || true"
+ print "@comment end " $0
+ next
+}
+
# Print everything else as-is
{
print $0