summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-04-29 20:57:28 +0000
committerMichał Górny <mgorny@gentoo.org>2014-04-29 20:57:28 +0000
commit455d88f49de974e8a16bb02d6c1b9d78f754f7d1 (patch)
treeda3ba2fcc49b4a378aaa1044f46b833c9d765039 /eclass/multilib-build.eclass
parentDisable wrappers for multilib portage only. Enable them in non-multilib profi... (diff)
downloadgentoo-2-455d88f49de974e8a16bb02d6c1b9d78f754f7d1.tar.gz
gentoo-2-455d88f49de974e8a16bb02d6c1b9d78f754f7d1.tar.bz2
gentoo-2-455d88f49de974e8a16bb02d6c1b9d78f754f7d1.zip
Create ${CHOST}-prefixed tool symlinks for multilib portage, to gain better compatibility with plain multilib.
Diffstat (limited to 'eclass/multilib-build.eclass')
-rw-r--r--eclass/multilib-build.eclass21
1 files changed, 18 insertions, 3 deletions
diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass
index 273d79a8c7da..7ded051f63e2 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.42 2014/04/29 20:56:46 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.43 2014/04/29 20:57:28 mgorny Exp $
# @ECLASS: multilib-build.eclass
# @MAINTAINER:
@@ -295,11 +295,26 @@ multilib_prepare_wrappers() {
[[ ${#} -le 1 ]] || die "${FUNCNAME}: too many arguments"
- [[ ${COMPLETE_MULTILIB} == yes ]] && return
-
local root=${1:-${ED}}
local f
+ if [[ ${COMPLETE_MULTILIB} == yes ]]; then
+ # symlink '${CHOST}-foo -> foo' to support abi-wrapper while
+ # keeping ${CHOST}-foo calls correct.
+
+ for f in "${MULTILIB_CHOST_TOOLS[@]}"; do
+ # drop leading slash if it's there
+ f=${f#/}
+
+ local dir=${f%/*}
+ local fn=${f##*/}
+
+ ln -s "${fn}" "${root}/${dir}/${CHOST}-${fn}" || die
+ done
+
+ return
+ fi
+
for f in "${MULTILIB_WRAPPED_HEADERS[@]}"; do
# drop leading slash if it's there
f=${f#/}