Gentoo Archives: gentoo-dev

From: David Seifert <soap@g.o>
To: gentoo-dev@l.g.o
Cc: David Seifert <soap@g.o>
Subject: [gentoo-dev] [PATCH 1/2] multilib-build.eclass: add multilib_native_use
Date: Tue, 30 Aug 2022 08:28:38
Message-Id: 20220830082814.1304211-1-soap@gentoo.org
1 Signed-off-by: David Seifert <soap@g.o>
2 ---
3 eclass/multilib-build.eclass | 9 +++++++++
4 1 file changed, 9 insertions(+)
5
6 diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass
7 index 42efdc9def6..76948baf539 100644
8 --- a/eclass/multilib-build.eclass
9 +++ b/eclass/multilib-build.eclass
10 @@ -565,6 +565,15 @@ multilib_is_native_abi() {
11 [[ ${COMPLETE_MULTILIB} == yes || ${ABI} == ${DEFAULT_ABI} ]]
12 }
13
14 +# @FUNCTION: multilib_native_use
15 +# @USAGE: <flag>
16 +# @DESCRIPTION:
17 +# Like the standard use command, but only yields true if
18 +# multilib_is_native_abi and use <flag> are true, otherwise false.
19 +multilib_native_use() {
20 + multilib_is_native_abi && use "$@"
21 +}
22 +
23 # @FUNCTION: multilib_native_use_with
24 # @USAGE: <flag> [<opt-name> [<opt-value>]]
25 # @DESCRIPTION:
26 --
27 2.37.2

Replies