From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B3E741382C5 for ; Thu, 1 Apr 2021 10:01:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2E429E0B15; Thu, 1 Apr 2021 10:01:30 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C0910E0AFB for ; Thu, 1 Apr 2021 10:01:29 +0000 (UTC) From: Andreas Sturmlechner To: gentoo-dev@lists.gentoo.org, Sergei Trofimovich Subject: Re: [gentoo-dev] [PATCH v2 4/5] flag-o-matic.eclass: get rid of eutils in In-Reply-To: <3350735.dWV9SEqChM@tuxbook> References: <5252907.rdbgypaU67@tuxbook> <2127539.vFx2qVVIhK@tuxbook> <3350735.dWV9SEqChM@tuxbook> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart9139473.eNJFYEL58v"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Archives-Salt: ef06d066-e34c-4cb3-9b75-3affe828ffa1 X-Archives-Hash: 217fc74992a4ee16382dfcde4b785e74 --nextPart9139473.eNJFYEL58v Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Andreas Sturmlechner To: gentoo-dev@lists.gentoo.org, Sergei Trofimovich Subject: Re: [gentoo-dev] [PATCH v2 4/5] flag-o-matic.eclass: get rid of eutils in In-Reply-To: <3350735.dWV9SEqChM@tuxbook> References: <5252907.rdbgypaU67@tuxbook> <2127539.vFx2qVVIhK@tuxbook> <3350735.dWV9SEqChM@tuxbook> >From 797d26ad9fe861c9c332f54a0f856a17af32ee53 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Wed, 31 Mar 2021 00:29:55 +0200 Subject: [PATCH 4/5] flag-o-matic.eclass: Make test-flags-PROG() internal Signed-off-by: Andreas Sturmlechner --- eclass/flag-o-matic.eclass | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index e4fdfd0b62d..a35f0bef269 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -598,7 +598,25 @@ test-flag-FC() { _test-flag-PROG "FC" f95 "$@"; } # Returns shell true if is supported by the C compiler and linker, else returns shell false. test-flag-CCLD() { _test-flag-PROG "CC" c+ld "$@"; } +# @FUNCTION: test-flags-PROG +# @USAGE: [more flags...] +# @INTERNAL +# @DESCRIPTION: +# Returns shell true if are supported by given , +# else returns shell false. test-flags-PROG() { + [[ ${EAPI} == [5-7] ]] || + die "Internal function ${FUNCNAME} is not available in >=EAPI-8." + _test-flags-PROG +} + +# @FUNCTION: _test-flags-PROG +# @USAGE: [more flags...] +# @INTERNAL +# @DESCRIPTION: +# Returns shell true if are supported by given , +# else returns shell false. +_test-flags-PROG() { local comp=$1 local flags=() local x @@ -635,31 +653,31 @@ test-flags-PROG() { # @USAGE: # @DESCRIPTION: # Returns shell true if are supported by the C compiler, else returns shell false. -test-flags-CC() { test-flags-PROG "CC" "$@"; } +test-flags-CC() { _test-flags-PROG "CC" "$@"; } # @FUNCTION: test-flags-CXX # @USAGE: # @DESCRIPTION: # Returns shell true if are supported by the C++ compiler, else returns shell false. -test-flags-CXX() { test-flags-PROG "CXX" "$@"; } +test-flags-CXX() { _test-flags-PROG "CXX" "$@"; } # @FUNCTION: test-flags-F77 # @USAGE: # @DESCRIPTION: # Returns shell true if are supported by the Fortran 77 compiler, else returns shell false. -test-flags-F77() { test-flags-PROG "F77" "$@"; } +test-flags-F77() { _test-flags-PROG "F77" "$@"; } # @FUNCTION: test-flags-FC # @USAGE: # @DESCRIPTION: # Returns shell true if are supported by the Fortran 90 compiler, else returns shell false. -test-flags-FC() { test-flags-PROG "FC" "$@"; } +test-flags-FC() { _test-flags-PROG "FC" "$@"; } # @FUNCTION: test-flags-CCLD # @USAGE: # @DESCRIPTION: # Returns shell true if are supported by the C compiler and default linker, else returns shell false. -test-flags-CCLD() { test-flags-PROG "CCLD" "$@"; } +test-flags-CCLD() { _test-flags-PROG "CCLD" "$@"; } # @FUNCTION: test-flags # @USAGE: -- 2.31.0 --nextPart9139473.eNJFYEL58v Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEE/x0UfMgLbk/MiQ+AUIqgAODug+AFAmBlmfRfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZG MUQxNDdDQzgwQjZFNEZDQzg5MEY4MDUwOEFBMDAwRTBFRTgzRTAACgkQUIqgAODu g+CUNwgAz3MsEjvNag/Z66GejbTBZ50/BnN9UI9HUxKz9eyTmmBoItEqO+kFty5Q 0AKwmuR+3gf5/+OYtaYpJXqav2LbYeh55Kv1wHNLm2FZj4sCW8o2+JRSKCmxOzlg trAhkQLUAPcQWsWQNWJ1T7oh2Li8r/+poxl4xkYp6fCnuUsFXtya5/5loFzbi5A8 YrZZ8WLTR2wRZ/eIOEmYGava5o0RAc2fFrfRQJ2Lj4kERLz+KKnStO6VcUuQKs8E tA2BmywQ57jx7rRAsPZDz5r0Ucg7cENLDJFoj6qh/xNbtmn+Kxk7hw9KJs1Oy7ua iu5EQIqzS+WXiVmtKAK/a8Aiki8x1g== =wuUy -----END PGP SIGNATURE----- --nextPart9139473.eNJFYEL58v--