summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/multilib-build.eclass')
-rw-r--r--eclass/multilib-build.eclass56
1 files changed, 28 insertions, 28 deletions
diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass
index 7ded051f63e2..92d9c2a4acbb 100644
--- a/eclass/multilib-build.eclass
+++ b/eclass/multilib-build.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.43 2014/04/29 20:57:28 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.44 2014/04/29 20:59:00 mgorny Exp $
# @ECLASS: multilib-build.eclass
# @MAINTAINER:
@@ -315,6 +315,33 @@ multilib_prepare_wrappers() {
return
fi
+ for f in "${MULTILIB_CHOST_TOOLS[@]}"; do
+ # drop leading slash if it's there
+ f=${f#/}
+
+ local dir=${f%/*}
+ local fn=${f##*/}
+
+ if [[ -L ${root}/${f} ]]; then
+ # rewrite the symlink target
+ local target=$(readlink "${root}/${f}")
+ local target_dir
+ local target_fn=${target##*/}
+
+ [[ ${target} == */* ]] && target_dir=${target%/*}
+
+ ln -f -s "${target_dir+${target_dir}/}${CHOST}-${target_fn}" \
+ "${root}/${f}" || die
+ fi
+
+ mv "${root}/${f}" "${root}/${dir}/${CHOST}-${fn}" || die
+
+ # symlink the native one back
+ if multilib_is_native_abi; then
+ ln -s "${CHOST}-${fn}" "${root}/${f}" || die
+ fi
+ done
+
for f in "${MULTILIB_WRAPPED_HEADERS[@]}"; do
# drop leading slash if it's there
f=${f#/}
@@ -388,33 +415,6 @@ _EOF_
-i "${ED}/tmp/multilib-include${f}" || die
fi
done
-
- for f in "${MULTILIB_CHOST_TOOLS[@]}"; do
- # drop leading slash if it's there
- f=${f#/}
-
- local dir=${f%/*}
- local fn=${f##*/}
-
- if [[ -L ${root}/${f} ]]; then
- # rewrite the symlink target
- local target=$(readlink "${root}/${f}")
- local target_dir
- local target_fn=${target##*/}
-
- [[ ${target} == */* ]] && target_dir=${target%/*}
-
- ln -f -s "${target_dir+${target_dir}/}${CHOST}-${target_fn}" \
- "${root}/${f}" || die
- fi
-
- mv "${root}/${f}" "${root}/${dir}/${CHOST}-${fn}" || die
-
- # symlink the native one back
- if multilib_is_native_abi; then
- ln -s "${CHOST}-${fn}" "${root}/${f}" || die
- fi
- done
}
# @FUNCTION: multilib_install_wrappers