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 5B98A1382C5 for ; Thu, 1 Apr 2021 18:37:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BDC31E0901; Thu, 1 Apr 2021 18:37:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 73C8DE08F1 for ; Thu, 1 Apr 2021 18:37:21 +0000 (UTC) Date: Thu, 1 Apr 2021 19:37:16 +0100 From: Sergei Trofimovich To: Andreas Sturmlechner Cc: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH v2 3/5] flag-o-matic.eclass: get rid of eutils in In-Reply-To: <3350735.dWV9SEqChM@tuxbook> References: <5252907.rdbgypaU67@tuxbook> <2537255.vuYhMxLoTh@tuxbook> <2127539.vFx2qVVIhK@tuxbook> <3350735.dWV9SEqChM@tuxbook> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) 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="Sig_/ypnsU5iio3JODQ0hhBjZ=dw"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Archives-Salt: b1feaf98-ce18-471d-b955-05a75a6665b2 X-Archives-Hash: 722d5bcab4ff071ea098623d9df55ed8 --Sig_/ypnsU5iio3JODQ0hhBjZ=dw Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 01 Apr 2021 11:59:48 +0200 Andreas Sturmlechner wrote: > 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 >=20 > Signed-off-by: Andreas Sturmlechner > --- > eclass/flag-o-matic.eclass | 28 +++++++++++++++++++++++----- > 1 file changed, 23 insertions(+), 5 deletions(-) >=20 > 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 > } > =20 > +# @FUNCTION: test-flag-PROG > +# @USAGE: > +# @INTERNAL > +# @DESCRIPTION: > +# Returns shell true if is supported by given , > +# else returns shell false. > test-flag-PROG() { > + [[ ${EAPI} =3D=3D [5-7] ]] || > + die "Internal function ${FUNCNAME} is not available in >=3DEAPI-8." Yeah. Given that we use tc-get$1 in implementation it's not easy to use as is in external code. Patch is ok. We can consider it later. > + _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=3D$1 > local lang=3D$2 > shift 2 > @@ -554,31 +572,31 @@ test-flag-PROG() { > # @USAGE: > # @DESCRIPTION: > # Returns shell true if is supported by the C compiler, else retu= rns shell false. > -test-flag-CC() { test-flag-PROG "CC" c "$@"; } > +test-flag-CC() { _test-flag-PROG "CC" c "$@"; } > =20 > # @FUNCTION: test-flag-CXX > # @USAGE: > # @DESCRIPTION: > # Returns shell true if is supported by the C++ compiler, else re= turns shell false. > -test-flag-CXX() { test-flag-PROG "CXX" c++ "$@"; } > +test-flag-CXX() { _test-flag-PROG "CXX" c++ "$@"; } > =20 > # @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 "$@"; } > =20 > # @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 "$@"; } > =20 > # @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 "$@"; } > =20 > test-flags-PROG() { > local comp=3D$1 > --=20 > 2.31.0 >=20 --=20 Sergei --Sig_/ypnsU5iio3JODQ0hhBjZ=dw Content-Type: application/pgp-signature Content-Description: Цифровая подпись OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQKTBAEBCgB9FiEE+g11JqJ4cL44QkmN7V5F4G8qwpMFAmBmEtxfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZB MEQ3NTI2QTI3ODcwQkUzODQyNDk4REVENUU0NUUwNkYyQUMyOTMACgkQ7V5F4G8q wpM4UQ/7BlRnAZq5YH8QPdjcSMeDmxx8+FO5BFMBs72YaLKHOoc9iXPsNvFZ7+aU D7HoHdjiFwoMyu7RQhvTwNDFI9L911OGzutEVvoBKpINTN+6/ycjK/M6AwTgCN/w nIaHnWPg6+3Ns8vpzBrDpVe7RGxD6VxbO+rZh9o2PGCVb/Ij2eKcv701tnaPCHrQ G05sGkxQLc935HPdoxuDkfTsiKB53WqsyEJEt08kHvYTWkSFFYh2MpR63ageYB8G qP0y/b0w0+snDXNR9qb+6Rgr+jmw2xUZfoOUdM6Tp9R+2nqvc0iuHQxLLgZFC+a9 JYAj5a58THEgqxK59o3uPyGABJfcO4ErVR8m4x21f/3/ymxrkMMr5vor+o+ZktIx 76RCDEef2oQnIQ9p0T1Bs31eTDakzqQVCHCn77T2lKPdfa+ea+I9xEzfNQPwA4Qv fJzfXE7+RKLevEKDw15/zxyzvR9h3uAewZo3ePjudf8kMiX8fSW8HM+61vPspKXh rpKKndffW8y9Rhrf6w1YGiBSqBjQm5ON41E1zP90NGWGslj33yNyWn+CkFYxaAO7 3Q3b+86mBr5HwdxAfs5VXmvuGC0uQBjp3ca/OJHm3qTAKFE/ORDx1VY1a6un5PcX RrUMgmCaZcwsfeF195K7jQXw9hL/x2YWtkvLB4DjZluSaIG+uKE= =Kvk7 -----END PGP SIGNATURE----- --Sig_/ypnsU5iio3JODQ0hhBjZ=dw--