summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-04-29 20:59:00 +0000
committerMichał Górny <mgorny@gentoo.org>2014-04-29 20:59:00 +0000
commit6e133d5435a9318fce134b360791e2b74fa15359 (patch)
tree4f187abf8744936737371789b7258d659a1e1e73 /eclass/multilib-build.eclass
parentClean up build and ebuild so it cross-compiles cleanly, and drop old code no ... (diff)
downloadgentoo-2-6e133d5435a9318fce134b360791e2b74fa15359.tar.gz
gentoo-2-6e133d5435a9318fce134b360791e2b74fa15359.tar.bz2
gentoo-2-6e133d5435a9318fce134b360791e2b74fa15359.zip
Reorder the operations in multilib_prepare_wrappers for easier reading.
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