diff options
author | Michał Górny <mgorny@gentoo.org> | 2014-05-23 07:11:53 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2014-05-23 07:11:53 +0000 |
commit | f7da5b4775f2441f4288d85aa719be9465e08c5b (patch) | |
tree | fe64759bd6b5970f82b7571b20ecaf5ede1ba9fc /eclass | |
parent | Give an explanatory error when trying to fetch https:// with dev-vcs/git[-cur... (diff) | |
download | gentoo-2-f7da5b4775f2441f4288d85aa719be9465e08c5b.tar.gz gentoo-2-f7da5b4775f2441f4288d85aa719be9465e08c5b.tar.bz2 gentoo-2-f7da5b4775f2441f4288d85aa719be9465e08c5b.zip |
Introduce multilib_get_enabled_abi_pairs() to obtain list containing both ABI values and USE flag names.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 6 | ||||
-rw-r--r-- | eclass/multilib-build.eclass | 21 |
2 files changed, 23 insertions, 4 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 9e21aa1c36f3..60901bf19684 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.1265 2014/05/23 07:09:07 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1266 2014/05/23 07:11:53 mgorny Exp $ + + 23 May 2014; Michał Górny <mgorny@gentoo.org> multilib-build.eclass: + Introduce multilib_get_enabled_abi_pairs() to obtain list containing both ABI + values and USE flag names. 23 May 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass: Give an explanatory error when trying to fetch https:// with diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass index 3e5b1ea50b24..205fd0ffbe81 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.48 2014/05/12 21:56:17 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.49 2014/05/23 07:11:53 mgorny Exp $ # @ECLASS: multilib-build.eclass # @MAINTAINER: @@ -106,6 +106,21 @@ _multilib_build_set_globals multilib_get_enabled_abis() { debug-print-function ${FUNCNAME} "${@}" + local pairs=( $(multilib_get_enabled_abi_pairs) ) + echo "${pairs[@]#*:}" +} + +# @FUNCTION: multilib_get_enabled_abi_pairs +# @DESCRIPTION: +# Return the ordered list of enabled <use-flag>:<ABI> pairs +# if multilib builds are enabled. The best (most preferred) +# ABI will come last. +# +# If multilib is disabled, the default ABI will be returned +# along with empty <use-flag>. +multilib_get_enabled_abi_pairs() { + debug-print-function ${FUNCNAME} "${@}" + local abis=( $(get_all_abis) ) local abi i found @@ -119,7 +134,7 @@ multilib_get_enabled_abis() { # for the split is more complex than cheating like this for m_abi in ${m_abis//,/ }; do if [[ ${m_abi} == ${abi} ]] && use "${m_flag}"; then - echo "${abi}" + echo "${m_flag}:${abi}" found=1 break 2 fi @@ -134,7 +149,7 @@ multilib_get_enabled_abis() { debug-print "${FUNCNAME}: no ABIs enabled, fallback to ${abi}" debug-print "${FUNCNAME}: ABI=${ABI}, DEFAULT_ABI=${DEFAULT_ABI}" - echo ${abi} + echo ":${abi}" fi } |