diff options
author | Alex Kozlov <ak@FreeBSD.org> | 2014-10-08 21:39:47 +0000 |
---|---|---|
committer | Alex Kozlov <ak@FreeBSD.org> | 2014-10-08 21:39:47 +0000 |
commit | 6107ede2acbd504ee76b021601bd5308bd3d937d (patch) | |
tree | 4d3d5098fd8dcd3548442a6ea294205afbd6bc95 | |
parent | Update to 0.09 (diff) |
- Accept absolute path for @fc, @fontsdir, @fcfontsdir, @shell keywords
Approved by: portmgr (antoine, bapt)
Differential Revision: https://reviews.freebsd.org/D721
Notes
Notes:
svn path=/head/; revision=370490
-rw-r--r-- | Keywords/fc.ucl | 12 | ||||
-rw-r--r-- | Keywords/fcfontsdir.ucl | 28 | ||||
-rw-r--r-- | Keywords/fontsdir.ucl | 24 | ||||
-rw-r--r-- | Keywords/shell.ucl | 12 | ||||
-rw-r--r-- | Mk/Scripts/check-stagedir.sh | 7 |
5 files changed, 61 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 diff --git a/Mk/Scripts/check-stagedir.sh b/Mk/Scripts/check-stagedir.sh index 34df172934dd..39224f5e5ad3 100644 --- a/Mk/Scripts/check-stagedir.sh +++ b/Mk/Scripts/check-stagedir.sh @@ -95,7 +95,14 @@ parse_plist() { @fc\ *|@fcfontsdir\ *|@fontsdir\ *) set -- $line shift + case "$@" in + /*) + echo >&3 "${comment}$@" + ;; + *) echo >&3 "${comment}${cwd}/$@" + ;; + esac ;; # order matters here - we must check @cwd first because |