--- pym/portage.py (revision 2907) +++ pym/portage.py (working copy) @@ -2356,7 +2356,7 @@ phase_retval = spawn(actionmap[mydo]["cmd"] % mydo, mysettings, debug=debug, logfile=logfile, **kwargs) if phase_retval == os.EX_OK: if mydo == "install": - mycommand = " ".join([MISC_SH_BINARY, "install_qa_check"]) + mycommand = " ".join([MISC_SH_BINARY, "install_qa_check", "install_multilib_wrappers"]) return spawn(mycommand, mysettings, debug=debug, logfile=logfile, **kwargs) return phase_retval --- bin/misc-functions.sh (revision 2907) +++ bin/misc-functions.sh (working copy) @@ -16,6 +16,32 @@ shift $# source /usr/lib/portage/bin/ebuild.sh +install_multilib_wrappers() { + # Only needed on multilib profiles + [[ "${MULTILIB_ABIS/ }" != "${MULTILIB_ABIS}" ]] || return + + MULTILIB_WRAPPER_MASK="${MULTILIB_WRAPPER_MASK:-*-config}" + save_IFS + IFS=":" + for mypath in ${PATH} ; do + restore_IFS + if [[ -d ${D}/${mypath} ]] ; then + dowrap=$(find ${D}${mypath} -type f -name "${MULTILIB_WRAPPER_MASK}" | sed -e "s:${D}/::" | \ + gawk ' + BEGIN { split("'"${MULTILIB_WRAPPER_IGNORE}"'", ignore); } + { for (idx in ignore) + if ($NF ~ "^"ignore[idx]"$") + next; + print; + }') + for file in ${dowrap} ; do + mv -f ${file} ${file}-${ABI} + ln -s /usr/lib/portage/bin/abi-wrapper-config ${file} + done + fi + done +} + install_qa_check() { prepall --- bin/abi-wrapper-config (revision 0) +++ bin/abi-wrapper-config (revision 0) @@ -0,0 +1,24 @@ +#!/bin/bash +# ${PN}-config is a link to this abi-wrapper on multilib-systems to +# assure options like --libs return the correct ABI-specific values. +# This must match the multilib-behaviour of the set profile! + +if [[ -n ${ABI} ]] ; then + abi=${ABI} +elif [[ -n ${DEFAULT_ABI} ]] ; then + abi=${DEFAULT_ABI} +else + # we're called from outside portage, so try default first + abis=$(portageq envvar DEFAULT_ABI MULTILIB_ABIS) + for abi in ${abis} ; do + [[ -f ${0}-${abi} ]] && break + unset abi + done +fi + +if [[ -f ${0}-${abi} ]] ; then + exec ${0}-${abi} ${@} +else + echo "${0}: abi-wrapper-config couldn't find script for current abi" >&2 + exit 1 +fi + *