commit:     a3ba1ae81bf951ea34a9f52aa23eb2b1a651bdd9
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  4 11:20:31 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Sep  4 11:20:31 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3ba1ae8

multilib-build.eclass: add multilib_native_use

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 eclass/multilib-build.eclass | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass
index 42efdc9def61..76948baf5398 100644
--- a/eclass/multilib-build.eclass
+++ b/eclass/multilib-build.eclass
@@ -565,6 +565,15 @@ multilib_is_native_abi() {
        [[ ${COMPLETE_MULTILIB} == yes || ${ABI} == ${DEFAULT_ABI} ]]
 }
 
+# @FUNCTION: multilib_native_use
+# @USAGE: <flag>
+# @DESCRIPTION:
+# Like the standard use command, but only yields true if
+# multilib_is_native_abi and use <flag> are true, otherwise false.
+multilib_native_use() {
+       multilib_is_native_abi && use "$@"
+}
+
 # @FUNCTION: multilib_native_use_with
 # @USAGE: <flag> [<opt-name> [<opt-value>]]
 # @DESCRIPTION:

Reply via email to