diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-03-04 19:30:28 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-03-04 19:30:28 +0000 |
commit | 92e166cac5d9ac1a26714790f21a73f514e3f9f8 (patch) | |
tree | 2bbc683cbef55dc44ac5f79ecca514bdb8072ed3 | |
parent | Use multilib_for_best_variant() for the *_all() phases. (diff) | |
download | gentoo-2-92e166cac5d9ac1a26714790f21a73f514e3f9f8.tar.gz gentoo-2-92e166cac5d9ac1a26714790f21a73f514e3f9f8.tar.bz2 gentoo-2-92e166cac5d9ac1a26714790f21a73f514e3f9f8.zip |
Convert to use multibuild.eclass.
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/multilib-build.eclass | 48 |
2 files changed, 25 insertions, 28 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index cdae5cdc4192..6117e65acd84 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.711 2013/03/04 19:29:43 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.712 2013/03/04 19:30:28 mgorny Exp $ + + 04 Mar 2013; Michał Górny <mgorny@gentoo.org> multilib-build.eclass: + Convert to use multibuild.eclass. 04 Mar 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass: Use multilib_for_best_variant() for the *_all() phases. diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass index 86a32e0fcc2b..09ffbf4d7793 100644 --- a/eclass/multilib-build.eclass +++ b/eclass/multilib-build.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.7 2013/03/02 18:18:13 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.8 2013/03/04 19:30:28 mgorny Exp $ # @ECLASS: multilib-build.eclass # @MAINTAINER: @@ -23,7 +23,7 @@ case ${EAPI:-0} in *) die "EAPI=${EAPI} is not supported" ;; esac -inherit multilib multiprocessing +inherit multibuild multilib # @ECLASS-VARIABLE: _MULTILIB_FLAGS # @INTERNAL @@ -91,6 +91,19 @@ multilib_get_enabled_abis() { fi } +# @FUNCTION: _multilib_multibuild_wrapper +# @USAGE: <argv>... +# @INTERNAL +# @DESCRIPTION: +# Initialize the environment for ABI selected for multibuild. +_multilib_multibuild_wrapper() { + debug-print-function ${FUNCNAME} "${@}" + + local ABI=${MULTIBUILD_VARIANT} + multilib_toolchain_setup "${ABI}" + "${@}" +} + # @FUNCTION: multilib_foreach_abi # @USAGE: <argv>... # @DESCRIPTION: @@ -101,14 +114,10 @@ multilib_get_enabled_abis() { # If multilib support is disabled, it just runs the commands. No setup # is done. multilib_foreach_abi() { - local initial_dir=${BUILD_DIR:-${S}} + debug-print-function ${FUNCNAME} "${@}" - local abis=( $(multilib_get_enabled_abis) ) - local ABI - for ABI in "${abis[@]}"; do - multilib_toolchain_setup "${ABI}" - BUILD_DIR=${initial_dir%%/}-${ABI} "${@}" - done + local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) + multibuild_foreach_variant _multilib_multibuild_wrapper "${@}" } # @FUNCTION: multilib_parallel_foreach_abi @@ -124,25 +133,10 @@ multilib_foreach_abi() { # # Useful for running configure scripts. multilib_parallel_foreach_abi() { - local initial_dir=${BUILD_DIR:-${S}} - - multijob_init - - local abis=( $(multilib_get_enabled_abis) ) - local ABI - for ABI in "${abis[@]}"; do - ( - multijob_child_init - - multilib_toolchain_setup "${ABI}" - BUILD_DIR=${initial_dir%%/}-${ABI} - "${@}" - ) & - - multijob_post_fork - done + debug-print-function ${FUNCNAME} "${@}" - multijob_finish + local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) + multibuild_parallel_foreach_variant _multilib_multibuild_wrapper "${@}" } # @FUNCTION: multilib_check_headers |