diff options
author | Gregory M. Tuner <gmt@be-evil.net> | 2014-01-07 05:30:54 -0800 |
---|---|---|
committer | Gregory M. Tuner <gmt@be-evil.net> | 2014-01-07 05:30:54 -0800 |
commit | 5838df442f6dc1ba8d214028da9dace4145251b7 (patch) | |
tree | 11ab613fe4ee3e8f1a3868e43fab026f2b9dc508 /eclass/python-multilib-utils-r1.eclass | |
parent | python-multlib-r1: clone gx86 python-r1 eclass (diff) | |
download | gmt-5838df442f6dc1ba8d214028da9dace4145251b7.tar.gz gmt-5838df442f6dc1ba8d214028da9dace4145251b7.tar.bz2 gmt-5838df442f6dc1ba8d214028da9dace4145251b7.zip |
bring the python-multilib-r1 framework ebuilds into sync
Signed-off-by: Gregory M. Tuner <gmt@be-evil.net>
Diffstat (limited to 'eclass/python-multilib-utils-r1.eclass')
-rw-r--r-- | eclass/python-multilib-utils-r1.eclass | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/eclass/python-multilib-utils-r1.eclass b/eclass/python-multilib-utils-r1.eclass index 5217d13..f18c46a 100644 --- a/eclass/python-multilib-utils-r1.eclass +++ b/eclass/python-multilib-utils-r1.eclass @@ -138,7 +138,7 @@ _PYTHON_NOMULTILIB_HISTORICAL_IMPLS=( # @DESCRIPTION: # A list of the supported mutilib-build USE flags, # with their "abi_" prefix stripped off. Under regular -# circumstances, this will be the output of: +# circumstances, this will be some permutation of the output of: # # @CODE@ # for f in $(portageq portdir)/profiles/desc/abi_*.desc ; do x=${f##*/abi_}; x=${x%.desc}; \ @@ -148,7 +148,17 @@ _PYTHON_NOMULTILIB_HISTORICAL_IMPLS=( # However, don't rely on this hack: it presumes that the abi_foo.desc files are all # kept in sync with what's in multlib-build. # -# As of this writing, it was: (mips_n32 mips_n64 mips_o32 x86_32 x86_64 x86_x32) +# As of this writing, it was (in no particular order): +# +# @CODE@ +# (mips_n32 mips_n64 mips_o32 x86_32 x86_64 x86_x32) +# @CODE@ +# +# During ebuild phases other than depend, the best abi is placed +# last in this list; this may be exploited to create best-abi-last +# lists where convenient. During the depend phase, the ordering +# is arbitrary, so this must not be exploited for cached metadata +# generation. # @ECLASS-VARIABLE: _CACHED_PROFILE_FLAG_ABI_MAPPINGS # @INTERNAL @@ -209,6 +219,27 @@ _generate-python-multilib-utils-r1_globals() { _CACHED_MULTILIB_FLAGS=( "${_MULTILIB_FLAGS[@]%:*}" ) + if [[ ${EBUILD_PHASE} != depend ]] ; then + # put the most preferred _CACHED_MULTILIB_FLAG last in the list + # if the best abi isn't represented there, we don't care, as + # we are not affected by it. + _CACHED_MULTILIB_FLAGS=( + $( + found= + # we dont have the mappings cached yet -- so use multilib_flag_abi + # note that we havent yet stripped off the abi_ part. + bestabiflag="$(multilib_abi_flag "$(multilib_get_best_abi)")" + for flag in "${_CACHED_MULTILIB_FLAGS[@]}" ; do + if [[ ${flag} == ${bestabiflag} ]]; then + found=1 + else + echo "${flag}" + fi + done + [[ ${found} ]] && echo "${bestabiflag}" + ) + ) + fi _CACHED_MULTILIB_FLAGS=( "${_CACHED_MULTILIB_FLAGS[@]##abi_}" ) |