/[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.49 Revision 1.50
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.49 2014/05/23 07:11:53 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.50 2014/05/23 07:38:36 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:
70# 70#
71# Example use: 71# Example use:
72# @CODE 72# @CODE
73# RDEPEND="dev-libs/libfoo[${MULTILIB_USEDEP}] 73# RDEPEND="dev-libs/libfoo[${MULTILIB_USEDEP}]
74# net-libs/libbar[ssl,${MULTILIB_USEDEP}]" 74# net-libs/libbar[ssl,${MULTILIB_USEDEP}]"
75# @CODE
76
77# @ECLASS-VARIABLE: MULTILIB_ABI_FLAG
78# @DEFAULT_UNSET
79# @DESCRIPTION:
80# The complete ABI name. Resembles the USE flag name.
81#
82# This is set within multilib_foreach_abi(),
83# multilib_parallel_foreach_abi() and multilib-minimal sub-phase
84# functions.
85#
86# It may be null (empty) when the build is done on ABI not controlled
87# by a USE flag (e.g. on non-multilib arch or when using multilib
88# portage). The build will always be done for a single ABI then.
89#
90# Example value:
91# @CODE
92# abi_x86_64
75# @CODE 93# @CODE
76 94
77_multilib_build_set_globals() { 95_multilib_build_set_globals() {
78 local flags=( "${_MULTILIB_FLAGS[@]%:*}" ) 96 local flags=( "${_MULTILIB_FLAGS[@]%:*}" )
79 97
159# @DESCRIPTION: 177# @DESCRIPTION:
160# Initialize the environment for ABI selected for multibuild. 178# Initialize the environment for ABI selected for multibuild.
161_multilib_multibuild_wrapper() { 179_multilib_multibuild_wrapper() {
162 debug-print-function ${FUNCNAME} "${@}" 180 debug-print-function ${FUNCNAME} "${@}"
163 181
164 local ABI=${MULTIBUILD_VARIANT} 182 local ABI=${MULTIBUILD_VARIANT#*:}
183 local MULTILIB_ABI_FLAG=${MULTIBUILD_VARIANT%:*}
184
165 multilib_toolchain_setup "${ABI}" 185 multilib_toolchain_setup "${ABI}"
166 "${@}" 186 "${@}"
167} 187}
168 188
169# @FUNCTION: multilib_foreach_abi 189# @FUNCTION: multilib_foreach_abi
176# If multilib support is disabled, it just runs the commands. No setup 196# If multilib support is disabled, it just runs the commands. No setup
177# is done. 197# is done.
178multilib_foreach_abi() { 198multilib_foreach_abi() {
179 debug-print-function ${FUNCNAME} "${@}" 199 debug-print-function ${FUNCNAME} "${@}"
180 200
181 local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) 201 local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abi_pairs) )
182 multibuild_foreach_variant _multilib_multibuild_wrapper "${@}" 202 multibuild_foreach_variant _multilib_multibuild_wrapper "${@}"
183} 203}
184 204
185# @FUNCTION: multilib_parallel_foreach_abi 205# @FUNCTION: multilib_parallel_foreach_abi
186# @USAGE: <argv>... 206# @USAGE: <argv>...
195# 215#
196# Useful for running configure scripts. 216# Useful for running configure scripts.
197multilib_parallel_foreach_abi() { 217multilib_parallel_foreach_abi() {
198 debug-print-function ${FUNCNAME} "${@}" 218 debug-print-function ${FUNCNAME} "${@}"
199 219
200 local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) 220 local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abi_pairs) )
201 multibuild_parallel_foreach_variant _multilib_multibuild_wrapper "${@}" 221 multibuild_parallel_foreach_variant _multilib_multibuild_wrapper "${@}"
202} 222}
203 223
204# @FUNCTION: multilib_for_best_abi 224# @FUNCTION: multilib_for_best_abi
205# @USAGE: <argv>... 225# @USAGE: <argv>...
206# @DESCRIPTION: 226# @DESCRIPTION:
207# Runs the given command with setup for the 'best' (usually native) ABI. 227# Runs the given command with setup for the 'best' (usually native) ABI.
208multilib_for_best_abi() { 228multilib_for_best_abi() {
209 debug-print-function ${FUNCNAME} "${@}" 229 debug-print-function ${FUNCNAME} "${@}"
210 230
211 local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) 231 local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abi_pairs) )
212 232
213 multibuild_for_best_variant _multilib_multibuild_wrapper "${@}" 233 multibuild_for_best_variant _multilib_multibuild_wrapper "${@}"
214} 234}
215 235
216# @FUNCTION: multilib_check_headers 236# @FUNCTION: multilib_check_headers
260# to ABI-specific build directory matching BUILD_DIR used by 280# to ABI-specific build directory matching BUILD_DIR used by
261# multilib_foreach_abi(). 281# multilib_foreach_abi().
262multilib_copy_sources() { 282multilib_copy_sources() {
263 debug-print-function ${FUNCNAME} "${@}" 283 debug-print-function ${FUNCNAME} "${@}"
264 284
265 local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) 285 local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abi_pairs) )
266 multibuild_copy_sources 286 multibuild_copy_sources
267} 287}
268 288
269# @ECLASS-VARIABLE: MULTILIB_WRAPPED_HEADERS 289# @ECLASS-VARIABLE: MULTILIB_WRAPPED_HEADERS
270# @DESCRIPTION: 290# @DESCRIPTION:

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

  ViewVC Help
Powered by ViewVC 1.1.20