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

Diff of /eclass/multilib.eclass

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

Revision 1.22 Revision 1.26
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.22 2005/02/14 11:33:11 eradicator Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.26 2005/03/08 11:56:49 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.
89### END DOCUMENTATION ### 89### END DOCUMENTATION ###
90 90
91# Defaults: 91# Defaults:
92export MULTILIB_ABIS=${MULTILIB_ABIS:-"default"} 92export MULTILIB_ABIS=${MULTILIB_ABIS:-"default"}
93export DEFAULT_ABI=${DEFAULT_ABI:-"default"} 93export DEFAULT_ABI=${DEFAULT_ABI:-"default"}
94# This causes econf to set --libdir=/usr/lib where it didn't before
94export ABI=${ABI:-"default"} 95#export ABI=${ABI:-"default"}
95export CFLAGS_default="" 96export CFLAGS_default
96export LDFLAGS_default="" 97export LDFLAGS_default
97export CHOST_default=${CHOST} 98export CHOST_default=${CHOST_default:-${CHOST}}
98export LIBDIR_default=${CONF_LIBDIR:-"lib"} 99export LIBDIR_default=${CONF_LIBDIR:-"lib"}
99export CDEFINE_default="__unix__" 100export CDEFINE_default="__unix__"
100 101
101# has_multilib_profile() 102# has_multilib_profile()
102has_multilib_profile() { 103has_multilib_profile() {
187} 188}
188 189
189get_abi_CFLAGS() { get_abi_var CFLAGS "${@}"; } 190get_abi_CFLAGS() { get_abi_var CFLAGS "${@}"; }
190get_abi_LDFLAGS() { get_abi_var LDFLAGS "${@}"; } 191get_abi_LDFLAGS() { get_abi_var LDFLAGS "${@}"; }
191get_abi_CHOST() { get_abi_var CHOST "${@}"; } 192get_abi_CHOST() { get_abi_var CHOST "${@}"; }
193get_abi_FAKE_TARGETS() { get_abi_var FAKE_TARGETS "${@}"; }
192get_abi_CDEFINE() { get_abi_var CDEFINE "${@}"; } 194get_abi_CDEFINE() { get_abi_var CDEFINE "${@}"; }
193get_abi_LIBDIR() { get_abi_var LIBDIR "${@}"; } 195get_abi_LIBDIR() { get_abi_var LIBDIR "${@}"; }
194 196
195# Return a list of the ABIs we want to install for with 197# Return a list of the ABIs we want to install for with
196# the last one in the list being the default. 198# the last one in the list being the default.
276 278
277# Return true if ${ABI} is the last ABI on our list (or if we're not 279# Return true if ${ABI} is the last ABI on our list (or if we're not
278# using the new multilib configuration. This can be used to determine 280# using the new multilib configuration. This can be used to determine
279# if we're in the last (or only) run through src_{unpack,compile,install} 281# if we're in the last (or only) run through src_{unpack,compile,install}
280is_final_abi() { 282is_final_abi() {
281 ! has_multilib_profile && return 0 283 has_multilib_profile || return 0
282 local ALL_ABIS=$(get_install_abis) 284 local ALL_ABIS=$(get_install_abis)
283 local LAST_ABI=${ALL_ABIS/* /} 285 local LAST_ABI=${ALL_ABIS/* /}
284 [ "${LAST_ABI}" = "${ABI}" ] 286 [[ ${LAST_ABI} == ${ABI} ]]
285} 287}
286 288
287# echo the number of ABIs we will be installing for 289# echo the number of ABIs we will be installing for
288number_abis() { 290number_abis() {
289 get_install_abis | wc -w 291 get_install_abis | wc -w
303 if [[ -z "${MULTILIB_ABIS}" ]]; then 305 if [[ -z "${MULTILIB_ABIS}" ]]; then
304 echo ${incdir} 306 echo ${incdir}
305 return 0 307 return 0
306 fi 308 fi
307 309
308 local abi=${ABI:-${DEFAULT_ABI}} 310 local abi=${ABI-${DEFAULT_ABI}}
309 if [[ ${#} -gt 0 ]]; then 311 if [[ ${#} -gt 0 ]]; then
310 abi=${1} 312 abi=${1}
311 shift 313 shift
312 fi 314 fi
313 315

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.20