From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 93FE51381F3 for ; Thu, 18 Jul 2013 07:28:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 11B27E0899; Thu, 18 Jul 2013 07:28:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 30F35E086E for ; Thu, 18 Jul 2013 07:28:53 +0000 (UTC) Received: from leo.jlec.de (vpn-c2.not-your-server.de [IPv6:2a01:4f8:191:22ca::2:1002]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jlec) by smtp.gentoo.org (Postfix) with ESMTPSA id 91DA733E72B; Thu, 18 Jul 2013 07:28:51 +0000 (UTC) Message-ID: <51E79931.5040206@gentoo.org> Date: Thu, 18 Jul 2013 09:28:49 +0200 From: Justin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130708 Thunderbird/17.0.7 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 MIME-Version: 1.0 To: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= CC: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] RFC: fortran-2.eclass - Support for bin package system without compiler References: <51E7942A.7070309@gentoo.org> <20130718091255.594be68a@gentoo.org> In-Reply-To: <20130718091255.594be68a@gentoo.org> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2HXGCGMEBFRXOODSESQNI" X-Archives-Salt: 1f2826d4-1bf4-42ba-829a-a5e423ee7a43 X-Archives-Hash: f05cb72713ee2181b146c06fb4ac93c8 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2HXGCGMEBFRXOODSESQNI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 18/07/13 09:12, Micha=C5=82 G=C3=B3rny wrote: >> + >> +# @FUNCTION: fortran-2_pkg_setup >> +# @DESCRIPTION: >> +# Setup functionallity, >> +# checks for a valid fortran compiler and optionally for its openmp >> support. >> +fortran-2_pkg_setup() { >> + if [[ ${EAPI:-0} -lt 4 ]]; then >=20 > Someone else's going to tell you this, so I'll tell you it first hand: > EAPI is not guaranteed to be a number and you shouldn't be using > numerical comparison against it. >=20 > Not that you support any non-numerical EAPI. But then some people who > fork eclasses in overlays will have to patch it more to support their > weird EAPIs. And I'm not pointing my finger at anyone in particular. >=20 Doesn't matter to me who is doing crazy things. If I can support it easily then I will do it. Next try, which is removes one redundant check. Thanks for the suggestion. Index: fortran-2.eclass =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v retrieving revision 1.18 diff -u -B -b -u -p -r1.18 fortran-2.eclass --- fortran-2.eclass 18 Jul 2013 07:03:33 -0000 1.18 +++ fortran-2.eclass 18 Jul 2013 07:28:12 -0000 @@ -203,11 +203,11 @@ _fortran_test_function() { fi } -# @FUNCTION: fortran-2_pkg_setup +# @FUNCTION: _fortran-2_pkg_setup +# @INTERNAL # @DESCRIPTION: -# Setup functionallity, -# checks for a valid fortran compiler and optionally for its openmp support. -fortran-2_pkg_setup() { +# _The_ fortran-2_pkg_setup() +_fortran-2_pkg_setup() { for _f_use in ${FORTRAN_NEEDED}; do case ${_f_use} in always) @@ -229,6 +229,26 @@ fortran-2_pkg_setup() { done } + +# @FUNCTION: fortran-2_pkg_setup +# @DESCRIPTION: +# Setup functionallity, +# checks for a valid fortran compiler and optionally for its openmp support. +fortran-2_pkg_setup() { + case ${EAPI:-0} in + 0|1|2|3) + eqawarn "The fortran-2.eclass is going to deprecate support for= " + eqawarn "EAPI < 4. Please migrate your package to a higher EAPI= " + eqawarn "or file a bug at https://bugs.gentoo.org" + _fortran-2_pkg_setup ;; + 4|5) + if [[ ${MERGE_TYPE} !=3D binary ]]; then + _fortran-2_pkg_setup + fi + ;; + esac +} + ------enig2HXGCGMEBFRXOODSESQNI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCgAGBQJR55kxAAoJELnU8jG9FViro58P/idlNnQdbBiMZLlOShtwu+KX KVnhLKhRHpBRwgUwrZ167aKdPPkM9FxtxWFNODOpv4srUaXzPIAj9rQQAkkNzqN1 u9AXw7V7b5i2Q/gkatJnA2jTot+kRs3Pawqc2g3zzMTV+W9hMoGfbEhOjy+4D9rC JtgVRwT09gulOGfPWEbKauArigTyfbGIe9GPqRVfw67p4+xP1DJxmUL8e1gYdiez a0m0oaMZvwkH+2++9VyLDN7PZXPvjIFIiXiaQypadcMaLEKAhQklC0QdboAUHn7A CIZ83WFGaEfyt4hp/HFfaa4LuYUmWnNDDWKgpYRkQTV/2q9SoLq3M1KaaKi//rGV 2b7suofSIr/kR68egUIDeYKvjC6MX5IX5BcPUPT30+C1SB/aNXvSNOUqlZbGh51h /cUMs38i3VdTbFxWy8+oFytFWH73exfVfCFRHRRH46BdZkbfGs2dPpkkgIiKEVZb GuVpt/XlLioRs4sj66W62VAsiiLVlGYXDSi/vUC3eb+lkarRAg0Mv2VCDSaIt8K8 +VTi4FHJSyq8Iq9CTNG6NxQb840xfTdmLFXFsZQL0c7DprRsoMaYNDNgk542NHb2 KME6n/gqQvC3uzJQDhnoUrcvWAoCSBAVGIVRbisZIpqTYblrZd3sWvOVaGOjQGDG WFuU3g2RLU/qM4WtGaw4 =yYy+ -----END PGP SIGNATURE----- ------enig2HXGCGMEBFRXOODSESQNI--