mgorny 14/05/01 09:52:27 Modified: ChangeLog multilib-build.eclass Log: Add MULTILIB_COMPAT to limit the supported ABIs for pre-built packages.
Revision Changes Path 1.1234 eclass/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1234&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1234&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1233&r2=1.1234 Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v retrieving revision 1.1233 retrieving revision 1.1234 diff -u -r1.1233 -r1.1234 --- ChangeLog 30 Apr 2014 18:17:19 -0000 1.1233 +++ ChangeLog 1 May 2014 09:52:27 -0000 1.1234 @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1233 2014/04/30 18:17:19 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1234 2014/05/01 09:52:27 mgorny Exp $ + + 01 May 2014; Michał Górny <mgo...@gentoo.org> multilib-build.eclass: + Add MULTILIB_COMPAT to limit the supported ABIs for pre-built packages. 30 Apr 2014; Michał Górny <mgo...@gentoo.org> autotools-multilib.eclass: Update the doc and make it simpler. 1.46 eclass/multilib-build.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?rev=1.46&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?rev=1.46&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?r1=1.45&r2=1.46 Index: multilib-build.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- multilib-build.eclass 29 Apr 2014 20:59:41 -0000 1.45 +++ multilib-build.eclass 1 May 2014 09:52:27 -0000 1.46 @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.45 2014/04/29 20:59:41 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.46 2014/05/01 09:52:27 mgorny Exp $ # @ECLASS: multilib-build.eclass # @MAINTAINER: @@ -46,6 +46,23 @@ abi_mips_o32:o32 ) +# @ECLASS-VARIABLE: MULTILIB_COMPAT +# @DEFAULT_UNSET +# @DESCRIPTION: +# List of multilib ABIs supported by the ebuild. If unset, defaults to +# all ABIs supported by the eclass. +# +# This variable is intended for use in prebuilt multilib packages that +# can provide binaries only for a limited set of ABIs. If ABIs need to +# be limited due to a bug in source code, package.use.mask is +# recommended instead. +# +# Example use: +# @CODE +# # Upstream provides binaries for x86 & amd64 only +# MULTILIB_COMPAT=( abi_x86_{32,64} ) +# @CODE + # @ECLASS-VARIABLE: MULTILIB_USEDEP # @DESCRIPTION: # The USE-dependency to be used on dependencies (libraries) needing @@ -59,6 +76,19 @@ _multilib_build_set_globals() { local flags=( "${_MULTILIB_FLAGS[@]%:*}" ) + + if [[ ${MULTILIB_COMPAT[@]} ]]; then + # Validate MULTILIB_COMPAT and filter out the flags. + local f + for f in "${MULTILIB_COMPAT[@]}"; do + if ! has "${f}" "${flags[@]}"; then + die "Invalid value in MULTILIB_COMPAT: ${f}" + fi + done + + flags=( "${MULTILIB_COMPAT[@]}" ) + fi + local usedeps=${flags[@]/%/(-)?} IUSE=${flags[*]}