/[gentoo-x86]/eclass/multilib.eclass
Gentoo

Diff of /eclass/multilib.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.17 Revision 1.18
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.17 2005/02/03 05:29:07 eradicator Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.18 2005/02/03 05:52:51 eradicator Exp $
4# 4#
5# Author: Jeremy Huddleston <eradicator@gentoo.org> 5# Author: Jeremy Huddleston <eradicator@gentoo.org>
6# 6#
7# This eclass is for all functions pertaining to handling multilib. 7# This eclass is for all functions pertaining to handling multilib.
8# configurations. 8# configurations.
185get_abi_CDEFINE() { get_abi_var CDEFINE ${@}; } 185get_abi_CDEFINE() { get_abi_var CDEFINE ${@}; }
186get_abi_LIBDIR() { get_abi_var LIBDIR ${@}; } 186get_abi_LIBDIR() { get_abi_var LIBDIR ${@}; }
187 187
188# Return a list of the ABIs we want to install for with 188# Return a list of the ABIs we want to install for with
189# the last one in the list being the default. 189# the last one in the list being the default.
190get_abi_order() {
191 ewarn "Please update your ebuild to use get_install_abis instead of get_abi_order"
192 get_install_abis ${@}
193}
194
195get_install_abis() { 190get_install_abis() {
196 local order="" 191 local order=""
197 192
198 if [ -z "${MULTILIB_ABIS}" ]; then 193 if [ -z "${MULTILIB_ABIS}" ]; then
199 echo "NOMULTILIB" 194 echo "NOMULTILIB"
275# Return true if ${ABI} is the last ABI on our list (or if we're not 270# Return true if ${ABI} is the last ABI on our list (or if we're not
276# using the new multilib configuration. This can be used to determine 271# using the new multilib configuration. This can be used to determine
277# if we're in the last (or only) run through src_{unpack,compile,install} 272# if we're in the last (or only) run through src_{unpack,compile,install}
278is_final_abi() { 273is_final_abi() {
279 ! has_multilib_profile && return 0 274 ! has_multilib_profile && return 0
280 local ALL_ABIS=$(get_abi_order) 275 local ALL_ABIS=$(get_install_abis)
281 local LAST_ABI=${ALL_ABIS/* /} 276 local LAST_ABI=${ALL_ABIS/* /}
282 [ "${LAST_ABI}" = "${ABI}" ] 277 [ "${LAST_ABI}" = "${ABI}" ]
283} 278}
284 279
285# echo the number of ABIs we will be installing for 280# echo the number of ABIs we will be installing for
286number_abis() { 281number_abis() {
287 get_abi_order | wc -w 282 get_install_abis | wc -w
288} 283}
289 284
290# get_ml_incdir [<include dir> [<ABI>]] 285# get_ml_incdir [<include dir> [<ABI>]]
291# include dir defaults to /usr/include 286# include dir defaults to /usr/include
292# ABI defaults to ${ABI} or ${DEFAULT_ABI} 287# ABI defaults to ${ABI} or ${DEFAULT_ABI}
357 popd 352 popd
358 353
359 for dir in ${dirs}; do 354 for dir in ${dirs}; do
360 local args=${dir} 355 local args=${dir}
361 local abi 356 local abi
362 for abi in $(get_abi_order); do 357 for abi in $(get_install_abis); do
363 args="${args} $(get_abi_CDEFINE ${abi}):${dir}/gentoo-multilib/${abi}" 358 args="${args} $(get_abi_CDEFINE ${abi}):${dir}/gentoo-multilib/${abi}"
364 done 359 done
365 create_ml_includes ${args} 360 create_ml_includes ${args}
366 done 361 done
367 fi 362 fi

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.20