aboutsummaryrefslogtreecommitdiffstats
path: root/Keywords
diff options
context:
space:
mode:
authorak <ak@FreeBSD.org>2014-10-09 05:39:47 +0800
committerak <ak@FreeBSD.org>2014-10-09 05:39:47 +0800
commit68d42e2a27912a25a871988e87f47da47cc57b93 (patch)
tree4d3d5098fd8dcd3548442a6ea294205afbd6bc95 /Keywords
parent11c8635fdba74daf83cbc18080a30c9c408bb2e7 (diff)
downloadfreebsd-ports-gnome-68d42e2a27912a25a871988e87f47da47cc57b93.tar.gz
freebsd-ports-gnome-68d42e2a27912a25a871988e87f47da47cc57b93.tar.zst
freebsd-ports-gnome-68d42e2a27912a25a871988e87f47da47cc57b93.zip
- Accept absolute path for @fc, @fontsdir, @fcfontsdir, @shell keywords
Approved by: portmgr (antoine, bapt) Differential Revision: https://reviews.freebsd.org/D721
Diffstat (limited to 'Keywords')
-rw-r--r--Keywords/fc.ucl12
-rw-r--r--Keywords/fcfontsdir.ucl28
-rw-r--r--Keywords/fontsdir.ucl24
-rw-r--r--Keywords/shell.ucl12
4 files changed, 54 insertions, 22 deletions
diff --git a/Keywords/fc.ucl b/Keywords/fc.ucl
index 15158231c40e..e54d0477a819 100644
--- a/Keywords/fc.ucl
+++ b/Keywords/fc.ucl
@@ -4,8 +4,16 @@
actions: [dir]
post-install: <<EOD
- fc-cache -s %D/%@ 2>/dev/null || true
+ case "%@" in
+ /*) fontsdir="%@" ;;
+ *) fontsdir="%D/%@" ;;
+ esac
+ fc-cache -s ${fontsdir} 2>/dev/null || true
EOD
post-deinstall: <<EOD
- fc-cache -s %D/%@ 2>/dev/null || true
+ case "%@" in
+ /*) fontsdir="%@" ;;
+ *) fontsdir="%D/%@" ;;
+ esac
+ fc-cache -s ${fontsdir} 2>/dev/null || true
EOD
diff --git a/Keywords/fcfontsdir.ucl b/Keywords/fcfontsdir.ucl
index 578c88ae9d7e..280dd697b09d 100644
--- a/Keywords/fcfontsdir.ucl
+++ b/Keywords/fcfontsdir.ucl
@@ -4,18 +4,26 @@
actions: [dir]
post-install: <<EOD
- fc-cache -s %D/%@ 2>/dev/null || true
- mkfontscale %D/%@ 2>/dev/null || true
- mkfontdir %D/%@ 2>/dev/null || true
+ case "%@" in
+ /*) fontsdir="%@" ;;
+ *) fontsdir="%D/%@" ;;
+ esac
+ fc-cache -s ${fontsdir} 2>/dev/null || true
+ mkfontscale ${fontsdir} 2>/dev/null || true
+ mkfontdir ${fontsdir} 2>/dev/null || true
EOD
post-deinstall: <<EOD
- fc-cache -s %D/%@ 2>/dev/null || true
- mkfontscale %D/%@ 2>/dev/null || true
- if [ -e %D/%@/fonts.scale -a "`stat -f '%%z' %D/%@/fonts.scale 2>/dev/null`" = '2' ]; then
- rm %D/%@/fonts.scale
+ case "%@" in
+ /*) fontsdir="%@" ;;
+ *) fontsdir="%D/%@" ;;
+ esac
+ fc-cache -s ${fontsdir} 2>/dev/null || true
+ 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 %D/%@ 2>/dev/null || true
- if [ -e %D/%@/fonts.dir -a "`stat -f '%%z' %D/%@/fonts.dir 2>/dev/null`" = '2' ]; then
- rm %D/%@/fonts.dir
+ 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
diff --git a/Keywords/fontsdir.ucl b/Keywords/fontsdir.ucl
index cd40db4af4c8..d68b4a73999c 100644
--- a/Keywords/fontsdir.ucl
+++ b/Keywords/fontsdir.ucl
@@ -4,16 +4,24 @@
actions: [dir]
post-install: <<EOD
- mkfontscale %D/%@ 2>/dev/null || true
- mkfontdir %D/%@ 2>/dev/null || true
+ case "%@" in
+ /*) fontsdir="%@" ;;
+ *) fontsdir="%D/%@" ;;
+ esac
+ mkfontscale ${fontsdir} 2>/dev/null || true
+ mkfontdir ${fontsdir} 2>/dev/null || true
EOD
post-deinstall: <<EOD
- mkfontscale %D/%@ 2>/dev/null || true
- if [ -e %D/%@/fonts.scale -a "`stat -f '%%z' %D/%@/fonts.scale 2>/dev/null`" = '2' ]; then
- rm %D/%@/fonts.scale
+ 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 %D/%@ 2>/dev/null || true
- if [ -e %D/%@/fonts.dir -a "`stat -f '%%z' %D/%@/fonts.dir 2>/dev/null`" = '2' ]; then
- rm %D/%@/fonts.dir
+ 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
diff --git a/Keywords/shell.ucl b/Keywords/shell.ucl
index 70a21ad4fd4b..16a094eaca95 100644
--- a/Keywords/shell.ucl
+++ b/Keywords/shell.ucl
@@ -13,12 +13,20 @@
actions: [file]
post-install: <<EOD
+ case "%@" in
+ /*) file="%@" ;;
+ *) file="%D/%@" ;;
+ esac
cp /etc/shells /etc/shells.bak
- (grep -v %D/%@ /etc/shells.bak; echo %D/%@) > /etc/shells
+ (grep -v ${file} /etc/shells.bak; echo ${file}) > /etc/shells
rm -f /etc/shells.bak
EOD
pre-deinstall: <<EOD
+ case "%@" in
+ /*) file="%@" ;;
+ *) file="%D/%@" ;;
+ esac
cp /etc/shells /etc/shells.bak
- grep -v %D/%@ /etc/shells.bak > /etc/shells
+ grep -v ${file} /etc/shells.bak > /etc/shells
rm -f /etc/shells.bak
EOD