aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-06-12 10:11:23 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-06-12 10:11:23 +0000
commit10cbadd62093ba4a608d5ae0ae72fb4fcabbd3b3 (patch)
tree3c7b597e1b6d866ad2bfcef8143f3d3d0980e1cf
parente16e20ac67bdf04d0e2d007464d733b84619302a (diff)
downloadports-10cbadd62093ba4a608d5ae0ae72fb4fcabbd3b3.tar.gz
ports-10cbadd62093ba4a608d5ae0ae72fb4fcabbd3b3.zip
Notes
-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