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

Diff of /eclass/multilib-build.eclass

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

Revision 1.20 Revision 1.21
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 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-build.eclass,v 1.20 2013/09/17 13:29:19 tommy Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.21 2013/09/30 07:27:06 mgorny Exp $
4 4
5# @ECLASS: multilib-build.eclass 5# @ECLASS: multilib-build.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Michał Górny <mgorny@gentoo.org> 7# Michał Górny <mgorny@gentoo.org>
8# @BLURB: flags and utility functions for building multilib packages 8# @BLURB: flags and utility functions for building multilib packages
26inherit multibuild multilib 26inherit multibuild multilib
27 27
28# @ECLASS-VARIABLE: _MULTILIB_FLAGS 28# @ECLASS-VARIABLE: _MULTILIB_FLAGS
29# @INTERNAL 29# @INTERNAL
30# @DESCRIPTION: 30# @DESCRIPTION:
31# The list of multilib flags and corresponding ABI values. 31# The list of multilib flags and corresponding ABI values. If the same
32# flag is reused for multiple ABIs (e.g. x86 on Linux&FreeBSD), multiple
33# ABIs may be separated by commas.
32_MULTILIB_FLAGS=( 34_MULTILIB_FLAGS=(
33 abi_x86_32:x86 35 abi_x86_32:x86,x86_fbsd
34 abi_x86_64:amd64 36 abi_x86_64:amd64,amd64_fbsd
35 abi_x86_x32:x32 37 abi_x86_x32:x32
36 abi_x86_32:x86_fbsd
37 abi_x86_64:amd64_fbsd
38 abi_mips_n32:n32 38 abi_mips_n32:n32
39 abi_mips_n64:n64 39 abi_mips_n64:n64
40 abi_mips_o32:o32 40 abi_mips_o32:o32
41) 41)
42 42
70multilib_get_enabled_abis() { 70multilib_get_enabled_abis() {
71 debug-print-function ${FUNCNAME} "${@}" 71 debug-print-function ${FUNCNAME} "${@}"
72 72
73 local abis=( $(get_all_abis) ) 73 local abis=( $(get_all_abis) )
74 74
75 local IFS=,
75 local abi i found 76 local abi i found
76 for abi in "${abis[@]}"; do 77 for abi in "${abis[@]}"; do
77 for i in "${_MULTILIB_FLAGS[@]}"; do 78 for i in "${_MULTILIB_FLAGS[@]}"; do
78 local m_abi=${i#*:} 79 local m_abis=${i#*:} m_abi
79 local m_flag=${i%:*} 80 local m_flag=${i%:*}
80 81
82 for m_abi in ${m_abis}; do
81 if [[ ${m_abi} == ${abi} ]] && use "${m_flag}"; then 83 if [[ ${m_abi} == ${abi} ]] && use "${m_flag}"; then
82 echo "${abi}" 84 echo "${abi}"
83 found=1 85 found=1
86 break 2
84 fi 87 fi
88 done
85 done 89 done
86 done 90 done
87 91
88 if [[ ! ${found} ]]; then 92 if [[ ! ${found} ]]; then
89 # ${ABI} can be used to override the fallback (multilib-portage), 93 # ${ABI} can be used to override the fallback (multilib-portage),

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.20