Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: multilib@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH multilib-build] Add multilib_is_native_abi() helper.
Date: Sat, 29 Jun 2013 08:34:48
Message-Id: 1372494945-19681-1-git-send-email-mgorny@gentoo.org
1 We've been so far inlining the snippet into ebuilds. This meant that
2 some people didn't know how to do this, some more did it improperly and
3 in the end -- if it failed not good enough -- changing it will require
4 changing all the ebuilds.
5 ---
6 gx86/eclass/multilib-build.eclass | 16 ++++++++++++++++
7 1 file changed, 16 insertions(+)
8
9 diff --git a/gx86/eclass/multilib-build.eclass b/gx86/eclass/multilib-build.eclass
10 index a4b7c01..22a471e 100644
11 --- a/gx86/eclass/multilib-build.eclass
12 +++ b/gx86/eclass/multilib-build.eclass
13 @@ -338,5 +338,21 @@ multilib_install_wrappers() {
14 fi
15 }
16
17 +# @FUNCTION: multilib_is_native_abi
18 +# @DESCRIPTION:
19 +# Determine whether the currently built ABI is the profile native.
20 +# Return true status (0) if that is true, otherwise false (1).
21 +#
22 +# This is often useful for configure calls when some of the options are
23 +# supposed to be disabled for multilib ABIs (like those used for
24 +# executables only).
25 +multilib_is_native_abi() {
26 + debug-print-function ${FUNCNAME} "${@}"
27 +
28 + [[ ${#} -eq 0 ]] || die "${FUNCNAME}: too many arguments"
29 +
30 + [[ ${ABI} == ${DEFAULT_ABI} ]]
31 +}
32 +
33 _MULTILIB_BUILD=1
34 fi
35 --
36 1.8.2.1

Replies