/[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.45 Revision 1.46
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 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.45 2014/04/29 20:59:41 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.46 2014/05/01 09:52:27 mgorny Exp $
4 4
5# @ECLASS: multilib-build.eclass 5# @ECLASS: multilib-build.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# gx86-multilib team <multilib@gentoo.org> 7# gx86-multilib team <multilib@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
44 abi_mips_n32:n32 44 abi_mips_n32:n32
45 abi_mips_n64:n64 45 abi_mips_n64:n64
46 abi_mips_o32:o32 46 abi_mips_o32:o32
47) 47)
48 48
49# @ECLASS-VARIABLE: MULTILIB_COMPAT
50# @DEFAULT_UNSET
51# @DESCRIPTION:
52# List of multilib ABIs supported by the ebuild. If unset, defaults to
53# all ABIs supported by the eclass.
54#
55# This variable is intended for use in prebuilt multilib packages that
56# can provide binaries only for a limited set of ABIs. If ABIs need to
57# be limited due to a bug in source code, package.use.mask is
58# recommended instead.
59#
60# Example use:
61# @CODE
62# # Upstream provides binaries for x86 & amd64 only
63# MULTILIB_COMPAT=( abi_x86_{32,64} )
64# @CODE
65
49# @ECLASS-VARIABLE: MULTILIB_USEDEP 66# @ECLASS-VARIABLE: MULTILIB_USEDEP
50# @DESCRIPTION: 67# @DESCRIPTION:
51# The USE-dependency to be used on dependencies (libraries) needing 68# The USE-dependency to be used on dependencies (libraries) needing
52# to support multilib as well. 69# to support multilib as well.
53# 70#
57# net-libs/libbar[ssl,${MULTILIB_USEDEP}]" 74# net-libs/libbar[ssl,${MULTILIB_USEDEP}]"
58# @CODE 75# @CODE
59 76
60_multilib_build_set_globals() { 77_multilib_build_set_globals() {
61 local flags=( "${_MULTILIB_FLAGS[@]%:*}" ) 78 local flags=( "${_MULTILIB_FLAGS[@]%:*}" )
79
80 if [[ ${MULTILIB_COMPAT[@]} ]]; then
81 # Validate MULTILIB_COMPAT and filter out the flags.
82 local f
83 for f in "${MULTILIB_COMPAT[@]}"; do
84 if ! has "${f}" "${flags[@]}"; then
85 die "Invalid value in MULTILIB_COMPAT: ${f}"
86 fi
87 done
88
89 flags=( "${MULTILIB_COMPAT[@]}" )
90 fi
91
62 local usedeps=${flags[@]/%/(-)?} 92 local usedeps=${flags[@]/%/(-)?}
63 93
64 IUSE=${flags[*]} 94 IUSE=${flags[*]}
65 MULTILIB_USEDEP=${usedeps// /,} 95 MULTILIB_USEDEP=${usedeps// /,}
66} 96}

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

  ViewVC Help
Powered by ViewVC 1.1.20