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

Diff of /eclass/multilib.eclass

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

Revision 1.82 Revision 1.86
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2011 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.82 2011/03/10 04:26:38 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.86 2011/03/18 19:12:08 vapier Exp $
4 4
5# @ECLASS: multilib.eclass 5# @ECLASS: multilib.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# amd64@gentoo.org 7# amd64@gentoo.org
8# toolchain@gentoo.org 8# toolchain@gentoo.org
235# @DESCRIPTION: 235# @DESCRIPTION:
236# Returns a list of all the libdirs used by this profile. This includes 236# Returns a list of all the libdirs used by this profile. This includes
237# those that might not be touched by the current ebuild and always includes 237# those that might not be touched by the current ebuild and always includes
238# "lib". 238# "lib".
239get_all_libdirs() { 239get_all_libdirs() {
240 local libdirs="lib" 240 local libdirs
241 local abi 241 local abi
242 local dir 242 local dir
243 243
244 for abi in ${MULTILIB_ABIS}; do 244 for abi in ${MULTILIB_ABIS}; do
245 [ "$(get_abi_LIBDIR ${abi})" != "lib" ] && libdirs="${libdirs} $(get_abi_LIBDIR ${abi})" 245 libdirs+=" $(get_abi_LIBDIR ${abi})"
246 done 246 done
247 [[ " ${libdirs} " != *" lib "* ]] && libdirs+=" lib"
247 248
248 echo "${libdirs}" 249 echo "${libdirs}"
249} 250}
250 251
251# @FUNCTION: is_final_abi 252# @FUNCTION: is_final_abi
253# Return true if ${ABI} is the last ABI on our list (or if we're not 254# Return true if ${ABI} is the last ABI on our list (or if we're not
254# using the new multilib configuration. This can be used to determine 255# using the new multilib configuration. This can be used to determine
255# if we're in the last (or only) run through src_{unpack,compile,install} 256# if we're in the last (or only) run through src_{unpack,compile,install}
256is_final_abi() { 257is_final_abi() {
257 has_multilib_profile || return 0 258 has_multilib_profile || return 0
258 local ALL_ABIS=$(get_install_abis) 259 set -- $(get_install_abis)
259 local LAST_ABI=${ALL_ABIS/* /} 260 local LAST_ABI=$#
260 [[ ${LAST_ABI} == ${ABI} ]] 261 [[ ${!LAST_ABI} == ${ABI} ]]
261} 262}
262 263
263# @FUNCTION: number_abis 264# @FUNCTION: number_abis
264# @DESCRIPTION: 265# @DESCRIPTION:
265# echo the number of ABIs we will be installing for 266# echo the number of ABIs we will be installing for
579 x86_64*) 580 x86_64*)
580 export CFLAGS_x86=${CFLAGS_x86--m32} 581 export CFLAGS_x86=${CFLAGS_x86--m32}
581 export CHOST_x86=${CTARGET/x86_64/i686} 582 export CHOST_x86=${CTARGET/x86_64/i686}
582 export CTARGET_x86=${CHOST_x86} 583 export CTARGET_x86=${CHOST_x86}
583 export CDEFINE_x86="__i386__" 584 export CDEFINE_x86="__i386__"
585 if [[ ${SYMLINK_LIBDIR} == "yes" ]] ; then
584 export LIBDIR_x86="lib32" 586 export LIBDIR_x86="lib32"
587 else
588 export LIBDIR_x86="lib"
589 fi
585 590
586 export CFLAGS_amd64=${CFLAGS_amd64--m64} 591 export CFLAGS_amd64=${CFLAGS_amd64--m64}
587 export CHOST_amd64=${CTARGET} 592 export CHOST_amd64=${CTARGET}
588 export CTARGET_amd64=${CHOST_amd64} 593 export CTARGET_amd64=${CHOST_amd64}
589 export CDEFINE_amd64="__x86_64__" 594 export CDEFINE_amd64="__x86_64__"
672 : ${MULTILIB_ABIS=default} 677 : ${MULTILIB_ABIS=default}
673 : ${DEFAULT_ABI=default} 678 : ${DEFAULT_ABI=default}
674 ;; 679 ;;
675 esac 680 esac
676 681
677 export MULTILIB_ABIS MULTILIB_ABI 682 export MULTILIB_ABIS DEFAULT_ABI
678} 683}
679 684
680# @FUNCTION: multilib_toolchain_setup 685# @FUNCTION: multilib_toolchain_setup
681# @DESCRIPTION: 686# @DESCRIPTION:
682# Hide multilib details here for packages which are forced to be compiled for a 687# Hide multilib details here for packages which are forced to be compiled for a

Legend:
Removed from v.1.82  
changed lines
  Added in v.1.86

  ViewVC Help
Powered by ViewVC 1.1.20