Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog multilib-build.eclass
Date: Thu, 01 May 2014 09:52:31
Message-Id: 20140501095227.7BEB72004C@flycatcher.gentoo.org
1 mgorny 14/05/01 09:52:27
2
3 Modified: ChangeLog multilib-build.eclass
4 Log:
5 Add MULTILIB_COMPAT to limit the supported ABIs for pre-built packages.
6
7 Revision Changes Path
8 1.1234 eclass/ChangeLog
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1234&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1234&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1233&r2=1.1234
13
14 Index: ChangeLog
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
17 retrieving revision 1.1233
18 retrieving revision 1.1234
19 diff -u -r1.1233 -r1.1234
20 --- ChangeLog 30 Apr 2014 18:17:19 -0000 1.1233
21 +++ ChangeLog 1 May 2014 09:52:27 -0000 1.1234
22 @@ -1,6 +1,9 @@
23 # ChangeLog for eclass directory
24 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1233 2014/04/30 18:17:19 mgorny Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1234 2014/05/01 09:52:27 mgorny Exp $
27 +
28 + 01 May 2014; Michał Górny <mgorny@g.o> multilib-build.eclass:
29 + Add MULTILIB_COMPAT to limit the supported ABIs for pre-built packages.
30
31 30 Apr 2014; Michał Górny <mgorny@g.o> autotools-multilib.eclass:
32 Update the doc and make it simpler.
33
34
35
36 1.46 eclass/multilib-build.eclass
37
38 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?rev=1.46&view=markup
39 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?rev=1.46&content-type=text/plain
40 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?r1=1.45&r2=1.46
41
42 Index: multilib-build.eclass
43 ===================================================================
44 RCS file: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v
45 retrieving revision 1.45
46 retrieving revision 1.46
47 diff -u -r1.45 -r1.46
48 --- multilib-build.eclass 29 Apr 2014 20:59:41 -0000 1.45
49 +++ multilib-build.eclass 1 May 2014 09:52:27 -0000 1.46
50 @@ -1,6 +1,6 @@
51 # Copyright 1999-2014 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 -# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.45 2014/04/29 20:59:41 mgorny Exp $
54 +# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.46 2014/05/01 09:52:27 mgorny Exp $
55
56 # @ECLASS: multilib-build.eclass
57 # @MAINTAINER:
58 @@ -46,6 +46,23 @@
59 abi_mips_o32:o32
60 )
61
62 +# @ECLASS-VARIABLE: MULTILIB_COMPAT
63 +# @DEFAULT_UNSET
64 +# @DESCRIPTION:
65 +# List of multilib ABIs supported by the ebuild. If unset, defaults to
66 +# all ABIs supported by the eclass.
67 +#
68 +# This variable is intended for use in prebuilt multilib packages that
69 +# can provide binaries only for a limited set of ABIs. If ABIs need to
70 +# be limited due to a bug in source code, package.use.mask is
71 +# recommended instead.
72 +#
73 +# Example use:
74 +# @CODE
75 +# # Upstream provides binaries for x86 & amd64 only
76 +# MULTILIB_COMPAT=( abi_x86_{32,64} )
77 +# @CODE
78 +
79 # @ECLASS-VARIABLE: MULTILIB_USEDEP
80 # @DESCRIPTION:
81 # The USE-dependency to be used on dependencies (libraries) needing
82 @@ -59,6 +76,19 @@
83
84 _multilib_build_set_globals() {
85 local flags=( "${_MULTILIB_FLAGS[@]%:*}" )
86 +
87 + if [[ ${MULTILIB_COMPAT[@]} ]]; then
88 + # Validate MULTILIB_COMPAT and filter out the flags.
89 + local f
90 + for f in "${MULTILIB_COMPAT[@]}"; do
91 + if ! has "${f}" "${flags[@]}"; then
92 + die "Invalid value in MULTILIB_COMPAT: ${f}"
93 + fi
94 + done
95 +
96 + flags=( "${MULTILIB_COMPAT[@]}" )
97 + fi
98 +
99 local usedeps=${flags[@]/%/(-)?}
100
101 IUSE=${flags[*]}