-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01/23/13 15:23, Michał Górny wrote: > This is mostly a proof-of-concept. If approved, I will work on moving > the code into a separate eclass, possibly named 'multilib-build' ;). > --- > gx86/eclass/autotools-multilib.eclass | 24 +++++++++++++++++++++--- > 1 file changed, 21 insertions(+), 3 deletions(-) > > diff --git a/gx86/eclass/autotools-multilib.eclass > b/gx86/eclass/autotools-multilib.eclass > index 7c8697a..eef7bcc 100644 > --- a/gx86/eclass/autotools-multilib.eclass > +++ b/gx86/eclass/autotools-multilib.eclass > @@ -32,7 +32,23 @@ inherit autotools-utils multilib > > EXPORT_FUNCTIONS src_configure src_compile src_test src_install > > -IUSE=multilib > +# Declare all of them, profiles will control their visibility. > +IUSE='abi_x86_32 abi_x86_64' > + > +# @FUNCTION: _autotools-multilib_get_enabled_abis > +# @DESCRIPTION: > +# Get the list of enabled ABIs. The returned names are suitable for use > +# with multilib.eclass. > +# > +# If multilib is not enabled or not supported, returns an empty list. > +_autotools-multilib_get_enabled_abis() { > + debug-print-function ${FUNCNAME} "${@}" > + > + if use amd64; then > + use abi_x86_64 && echo amd64 > + use abi_x86_32 && echo x86 > + fi > +} > > # @FUNCTION: autotools-multilib_foreach_abi > # @USAGE: argv... > @@ -46,9 +62,11 @@ IUSE=multilib > autotools-multilib_foreach_abi() { > local initial_dir=${BUILD_DIR:-${S}} > > - if use multilib; then > + local multilib_abis=$(_autotools-multilib_get_enabled_abis) > + > + if [[ ${multilib_abis} ]]; then > local ABI > - for ABI in $(get_all_abis); do > + for ABI in ${multilib_abis}; do > multilib_toolchain_setup "${ABI}" > BUILD_DIR=${initial_dir%%/}-${ABI} "${@}" > done > Why CC devrel on this?
- -- ======================================================= Mike Doty kingtaco -at- gentoo.org Gentoo Infrastructure Operations Manager Gentoo/AMD64 Strategic Lead GPG: 0094 7F06 913E 78D6 F1BB 06BA D0AD D125 A797 C7A7 ======================================================= -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlEBbpwACgkQ0K3RJaeXx6cwsgCg1tVjaMe3iEJEdAaUpRQhJy6v q0kAnjjil5zCt19Ep08O5hLVQ2BvRwTc =HgIF -----END PGP SIGNATURE-----