diff options
Diffstat (limited to 'bin/phase-helpers.sh')
-rw-r--r-- | bin/phase-helpers.sh | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index 04cf35aa4..aadfac17d 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -19,7 +19,8 @@ into() { export DESTTREE="" else export DESTTREE=$1 - case "$EAPI" in 0|1|2) local ED=${D} ;; esac + [[ " ${USE} " == *" prefix "* ]] || \ + case "$EAPI" in 0|1|2) local ED=${D} ;; esac if [ ! -d "${ED}${DESTTREE}" ]; then install -d "${ED}${DESTTREE}" local ret=$? @@ -36,7 +37,8 @@ insinto() { export INSDESTTREE="" else export INSDESTTREE=$1 - case "$EAPI" in 0|1|2) local ED=${D} ;; esac + [[ " ${USE} " == *" prefix "* ]] || \ + case "$EAPI" in 0|1|2) local ED=${D} ;; esac if [ ! -d "${ED}${INSDESTTREE}" ]; then install -d "${ED}${INSDESTTREE}" local ret=$? @@ -53,7 +55,8 @@ exeinto() { export _E_EXEDESTTREE_="" else export _E_EXEDESTTREE_="$1" - case "$EAPI" in 0|1|2) local ED=${D} ;; esac + [[ " ${USE} " == *" prefix "* ]] || \ + case "$EAPI" in 0|1|2) local ED=${D} ;; esac if [ ! -d "${ED}${_E_EXEDESTTREE_}" ]; then install -d "${ED}${_E_EXEDESTTREE_}" local ret=$? @@ -70,7 +73,8 @@ docinto() { export _E_DOCDESTTREE_="" else export _E_DOCDESTTREE_="$1" - case "$EAPI" in 0|1|2) local ED=${D} ;; esac + [[ " ${USE} " == *" prefix "* ]] || \ + case "$EAPI" in 0|1|2) local ED=${D} ;; esac if [ ! -d "${ED}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" ]; then install -d "${ED}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" local ret=$? @@ -137,7 +141,8 @@ docompress() { keepdir() { dodir "$@" local x - case "$EAPI" in 0|1|2) local ED=${D} ;; esac + [[ " ${USE} " == *" prefix "* ]] || \ + case "$EAPI" in 0|1|2) local ED=${D} ;; esac if [ "$1" == "-R" ] || [ "$1" == "-r" ]; then shift find "$@" -type d -printf "${ED}%p/.keep_${CATEGORY}_${PN}-${SLOT}\n" \ @@ -374,7 +379,8 @@ unpack() { econf() { local x - case "$EAPI" in 0|1|2) local EPREFIX= ;; esac + [[ " ${USE} " == *" prefix "* ]] || \ + case "$EAPI" in 0|1|2) local EPREFIX= ;; esac _hasg() { local x s=$1 @@ -470,7 +476,8 @@ econf() { einstall() { # CONF_PREFIX is only set if they didn't pass in libdir above. local LOCAL_EXTRA_EINSTALL="${EXTRA_EINSTALL}" - case "$EAPI" in 0|1|2) local ED=${D} ;; esac + [[ " ${USE} " == *" prefix "* ]] || \ + case "$EAPI" in 0|1|2) local ED=${D} ;; esac LIBDIR_VAR="LIBDIR_${ABI}" if [ -n "${ABI}" -a -n "${!LIBDIR_VAR}" ]; then CONF_LIBDIR="${!LIBDIR_VAR}" @@ -600,7 +607,8 @@ has_version() { local eroot case "$EAPI" in 0|1|2) - eroot=${ROOT} + [[ " ${USE} " == *" prefix "* ]] && \ + eroot=${ROOT%/}${EPREFIX}/ || eroot=${ROOT} ;; *) eroot=${ROOT%/}${EPREFIX}/ @@ -634,7 +642,8 @@ best_version() { local eroot case "$EAPI" in 0|1|2) - eroot=${ROOT} + [[ " ${USE} " == *" prefix "* ]] && \ + eroot=${ROOT%/}${EPREFIX}/ || eroot=${ROOT} ;; *) eroot=${ROOT%/}${EPREFIX}/ |