[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-dev
Subject: [gentoo-dev] [PATCH 4/5] Move tool renaming code earlier.
From: Michał Górny <mgorny () gentoo ! org>
Date: 2014-04-24 20:26:38
Message-ID: 1398371199-21869-4-git-send-email-mgorny () gentoo ! org
[Download RAW message or body]
It is simpler than header wrapping, and now it comes directly after the
multilib-portage variant. Also, it will make it possible to disable
header wrapping on some systems easily.
---
eclass/multilib-build.eclass | 54 ++++++++++++++++++++++----------------------
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass
index 755d774..9dfec0a 100644
--- a/eclass/multilib-build.eclass
+++ b/eclass/multilib-build.eclass
@@ -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_build_binaries; 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_build_binaries; then
- ln -s "${CHOST}-${fn}" "${root}/${f}" || die
- fi
- done
}
# @FUNCTION: multilib_install_wrappers
--
1.9.2
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic