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 CE734138239 for ; Thu, 1 Apr 2021 09:59:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C7200E0B00; Thu, 1 Apr 2021 09:59:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 73E09E0AFB for ; Thu, 1 Apr 2021 09:59:54 +0000 (UTC) From: Andreas Sturmlechner To: gentoo-dev@lists.gentoo.org, Sergei Trofimovich Subject: Re: [gentoo-dev] [PATCH v2 3/5] flag-o-matic.eclass: get rid of eutils in In-Reply-To: <2127539.vFx2qVVIhK@tuxbook> References: <5252907.rdbgypaU67@tuxbook> <2537255.vuYhMxLoTh@tuxbook> <2127539.vFx2qVVIhK@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="nextPart5253228.rdbgypaU67"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Archives-Salt: e7aa74b0-acd0-4825-9d3a-ca9d2e07ff65 X-Archives-Hash: adeaa7064db95bece2b014e9a238edbd --nextPart5253228.rdbgypaU67 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 3/5] flag-o-matic.eclass: get rid of eutils in In-Reply-To: <2127539.vFx2qVVIhK@tuxbook> References: <5252907.rdbgypaU67@tuxbook> <2537255.vuYhMxLoTh@tuxbook> <2127539.vFx2qVVIhK@tuxbook> >From 7b063ec3f4e2a76c43cd5de8a81a0a30c0f87a6d Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Wed, 31 Mar 2021 00:27:27 +0200 Subject: [PATCH 3/5] flag-o-matic.eclass: Make test-flag-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 d511a140592..e4fdfd0b62d 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -459,7 +459,25 @@ strip-flags() { return 0 } +# @FUNCTION: test-flag-PROG +# @USAGE: +# @INTERNAL +# @DESCRIPTION: +# Returns shell true if is supported by given , +# else returns shell false. test-flag-PROG() { + [[ ${EAPI} == [5-7] ]] || + die "Internal function ${FUNCNAME} is not available in >=EAPI-8." + _test-flag-PROG +} + +# @FUNCTION: _test-flag-PROG +# @USAGE: +# @INTERNAL +# @DESCRIPTION: +# Returns shell true if is supported by given , +# else returns shell false. +_test-flag-PROG() { local comp=$1 local lang=$2 shift 2 @@ -554,31 +572,31 @@ test-flag-PROG() { # @USAGE: # @DESCRIPTION: # Returns shell true if is supported by the C compiler, else returns shell false. -test-flag-CC() { test-flag-PROG "CC" c "$@"; } +test-flag-CC() { _test-flag-PROG "CC" c "$@"; } # @FUNCTION: test-flag-CXX # @USAGE: # @DESCRIPTION: # Returns shell true if is supported by the C++ compiler, else returns shell false. -test-flag-CXX() { test-flag-PROG "CXX" c++ "$@"; } +test-flag-CXX() { _test-flag-PROG "CXX" c++ "$@"; } # @FUNCTION: test-flag-F77 # @USAGE: # @DESCRIPTION: # Returns shell true if is supported by the Fortran 77 compiler, else returns shell false. -test-flag-F77() { test-flag-PROG "F77" f77 "$@"; } +test-flag-F77() { _test-flag-PROG "F77" f77 "$@"; } # @FUNCTION: test-flag-FC # @USAGE: # @DESCRIPTION: # Returns shell true if is supported by the Fortran 90 compiler, else returns shell false. -test-flag-FC() { test-flag-PROG "FC" f95 "$@"; } +test-flag-FC() { _test-flag-PROG "FC" f95 "$@"; } # @FUNCTION: test-flag-CCLD # @USAGE: # @DESCRIPTION: # 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 "$@"; } +test-flag-CCLD() { _test-flag-PROG "CC" c+ld "$@"; } test-flags-PROG() { local comp=$1 -- 2.31.0 --nextPart5253228.rdbgypaU67 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+AFAmBlmZVfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZG MUQxNDdDQzgwQjZFNEZDQzg5MEY4MDUwOEFBMDAwRTBFRTgzRTAACgkQUIqgAODu g+AG8gf/URyuwdQN1mt3D4Sr1E/RDTomEcF0wBcczyehbGaNw/Xjkp5K77T2rtfV pJhyXluN1FlzkQ/9sa/CaWYxBe/qq1e/u5UZZT+CdzVvGN9NQ16DiG192wh3mxGH skOM48ajCsNloTLIBodrj2uSI38LYjj82PDCwfOmQJrpA6W5jB1UlOZJx57e/9MM CBJnNdFY1PREhnNdrDQtrmSYoHMGsOhlEpv1mmjlVzMWxbTac7YhvM26uSIZbv5U zQvDMc2GXaaaagyUkJziXzEqX8oCUXZNXJ83RNX6uVuFzKenUFdUA7cTLlph6UtU KOmTsPs4KTsSXHYum+cWvtp0Q8wRUw== =YE24 -----END PGP SIGNATURE----- --nextPart5253228.rdbgypaU67--