1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
On 01/23/13 15:23, Michał Górny wrote: |
5 |
> This is mostly a proof-of-concept. If approved, I will work on moving |
6 |
> the code into a separate eclass, possibly named 'multilib-build' ;). |
7 |
> --- |
8 |
> gx86/eclass/autotools-multilib.eclass | 24 +++++++++++++++++++++--- |
9 |
> 1 file changed, 21 insertions(+), 3 deletions(-) |
10 |
> |
11 |
> diff --git a/gx86/eclass/autotools-multilib.eclass b/gx86/eclass/autotools-multilib.eclass |
12 |
> index 7c8697a..eef7bcc 100644 |
13 |
> --- a/gx86/eclass/autotools-multilib.eclass |
14 |
> +++ b/gx86/eclass/autotools-multilib.eclass |
15 |
> @@ -32,7 +32,23 @@ inherit autotools-utils multilib |
16 |
> |
17 |
> EXPORT_FUNCTIONS src_configure src_compile src_test src_install |
18 |
> |
19 |
> -IUSE=multilib |
20 |
> +# Declare all of them, profiles will control their visibility. |
21 |
> +IUSE='abi_x86_32 abi_x86_64' |
22 |
> + |
23 |
> +# @FUNCTION: _autotools-multilib_get_enabled_abis |
24 |
> +# @DESCRIPTION: |
25 |
> +# Get the list of enabled ABIs. The returned names are suitable for use |
26 |
> +# with multilib.eclass. |
27 |
> +# |
28 |
> +# If multilib is not enabled or not supported, returns an empty list. |
29 |
> +_autotools-multilib_get_enabled_abis() { |
30 |
> + debug-print-function ${FUNCNAME} "${@}" |
31 |
> + |
32 |
> + if use amd64; then |
33 |
> + use abi_x86_64 && echo amd64 |
34 |
> + use abi_x86_32 && echo x86 |
35 |
> + fi |
36 |
> +} |
37 |
> |
38 |
> # @FUNCTION: autotools-multilib_foreach_abi |
39 |
> # @USAGE: argv... |
40 |
> @@ -46,9 +62,11 @@ IUSE=multilib |
41 |
> autotools-multilib_foreach_abi() { |
42 |
> local initial_dir=${BUILD_DIR:-${S}} |
43 |
> |
44 |
> - if use multilib; then |
45 |
> + local multilib_abis=$(_autotools-multilib_get_enabled_abis) |
46 |
> + |
47 |
> + if [[ ${multilib_abis} ]]; then |
48 |
> local ABI |
49 |
> - for ABI in $(get_all_abis); do |
50 |
> + for ABI in ${multilib_abis}; do |
51 |
> multilib_toolchain_setup "${ABI}" |
52 |
> BUILD_DIR=${initial_dir%%/}-${ABI} "${@}" |
53 |
> done |
54 |
> |
55 |
Why CC devrel on this? |
56 |
|
57 |
|
58 |
- -- |
59 |
======================================================= |
60 |
Mike Doty kingtaco -at- gentoo.org |
61 |
Gentoo Infrastructure Operations Manager |
62 |
Gentoo/AMD64 Strategic Lead |
63 |
GPG: 0094 7F06 913E 78D6 F1BB 06BA D0AD D125 A797 C7A7 |
64 |
======================================================= |
65 |
-----BEGIN PGP SIGNATURE----- |
66 |
Version: GnuPG v2.0.19 (GNU/Linux) |
67 |
|
68 |
iEYEARECAAYFAlEBbpwACgkQ0K3RJaeXx6cwsgCg1tVjaMe3iEJEdAaUpRQhJy6v |
69 |
q0kAnjjil5zCt19Ep08O5hLVQ2BvRwTc |
70 |
=HgIF |
71 |
-----END PGP SIGNATURE----- |