summaryrefslogtreecommitdiff
path: root/eclass
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
commitca62f83d432364641b886b1e952816d4bc12808d (patch)
treec77859d4ffe81f9fc4be139e272e12f9dbf4fcdf /eclass
parentDisable wrappers for multilib portage only. Enable them in non-multilib profi... (diff)
downloadhistorical-ca62f83d432364641b886b1e952816d4bc12808d.tar.gz
historical-ca62f83d432364641b886b1e952816d4bc12808d.tar.bz2
historical-ca62f83d432364641b886b1e952816d4bc12808d.zip
Create ${CHOST}-prefixed tool symlinks for multilib portage, to gain better compatibility with plain multilib.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog6
-rw-r--r--eclass/multilib-build.eclass21
2 files changed, 23 insertions, 4 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 65c595c83fec..326f688d0b0c 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1229 2014/04/29 20:56:46 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1230 2014/04/29 20:57:28 mgorny Exp $
+
+ 29 Apr 2014; Michał Górny <mgorny@gentoo.org> multilib-build.eclass:
+ Create ${CHOST}-prefixed tool symlinks for multilib portage, to gain better
+ compatibility with plain multilib.
29 Apr 2014; Michał Górny <mgorny@gentoo.org> multilib-build.eclass:
Disable wrappers for multilib portage only. Enable them in non-multilib
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#/}