/[gentoo-x86]/eclass/multilib-build.eclass
Gentoo

Diff of /eclass/multilib-build.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.48 Revision 1.49
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.48 2014/05/12 21:56:17 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.49 2014/05/23 07:11:53 mgorny Exp $
4 4
5# @ECLASS: multilib-build.eclass 5# @ECLASS: multilib-build.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# gx86-multilib team <multilib@gentoo.org> 7# gx86-multilib team <multilib@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
104# If multilib is disabled, the default ABI will be returned 104# If multilib is disabled, the default ABI will be returned
105# in order to enforce consistent testing with multilib code. 105# in order to enforce consistent testing with multilib code.
106multilib_get_enabled_abis() { 106multilib_get_enabled_abis() {
107 debug-print-function ${FUNCNAME} "${@}" 107 debug-print-function ${FUNCNAME} "${@}"
108 108
109 local pairs=( $(multilib_get_enabled_abi_pairs) )
110 echo "${pairs[@]#*:}"
111}
112
113# @FUNCTION: multilib_get_enabled_abi_pairs
114# @DESCRIPTION:
115# Return the ordered list of enabled <use-flag>:<ABI> pairs
116# if multilib builds are enabled. The best (most preferred)
117# ABI will come last.
118#
119# If multilib is disabled, the default ABI will be returned
120# along with empty <use-flag>.
121multilib_get_enabled_abi_pairs() {
122 debug-print-function ${FUNCNAME} "${@}"
123
109 local abis=( $(get_all_abis) ) 124 local abis=( $(get_all_abis) )
110 125
111 local abi i found 126 local abi i found
112 for abi in "${abis[@]}"; do 127 for abi in "${abis[@]}"; do
113 for i in "${_MULTILIB_FLAGS[@]}"; do 128 for i in "${_MULTILIB_FLAGS[@]}"; do
117 # split on ,; we can't switch IFS for function scope because 132 # split on ,; we can't switch IFS for function scope because
118 # paludis is broken (bug #486592), and switching it locally 133 # paludis is broken (bug #486592), and switching it locally
119 # for the split is more complex than cheating like this 134 # for the split is more complex than cheating like this
120 for m_abi in ${m_abis//,/ }; do 135 for m_abi in ${m_abis//,/ }; do
121 if [[ ${m_abi} == ${abi} ]] && use "${m_flag}"; then 136 if [[ ${m_abi} == ${abi} ]] && use "${m_flag}"; then
122 echo "${abi}" 137 echo "${m_flag}:${abi}"
123 found=1 138 found=1
124 break 2 139 break 2
125 fi 140 fi
126 done 141 done
127 done 142 done
132 # ${DEFAULT_ABI} is the safe fallback. 147 # ${DEFAULT_ABI} is the safe fallback.
133 local abi=${ABI:-${DEFAULT_ABI}} 148 local abi=${ABI:-${DEFAULT_ABI}}
134 149
135 debug-print "${FUNCNAME}: no ABIs enabled, fallback to ${abi}" 150 debug-print "${FUNCNAME}: no ABIs enabled, fallback to ${abi}"
136 debug-print "${FUNCNAME}: ABI=${ABI}, DEFAULT_ABI=${DEFAULT_ABI}" 151 debug-print "${FUNCNAME}: ABI=${ABI}, DEFAULT_ABI=${DEFAULT_ABI}"
137 echo ${abi} 152 echo ":${abi}"
138 fi 153 fi
139} 154}
140 155
141# @FUNCTION: _multilib_multibuild_wrapper 156# @FUNCTION: _multilib_multibuild_wrapper
142# @USAGE: <argv>... 157# @USAGE: <argv>...

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49

  ViewVC Help
Powered by ViewVC 1.1.20