Gentoo Archives: gentoo-dev

From: justin <jlec@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Please review fortran-2.eclass
Date: Mon, 13 Jun 2011 09:31:34
Message-Id: 4DF5D8CE.2050707@gentoo.org
In Reply to: Re: [gentoo-dev] Please review fortran-2.eclass by "Paweł Hajdan
1 On 6/13/11 11:19 AM, "Paweł Hajdan, Jr." wrote:
2 > On 6/13/11 11:06 AM, justin wrote:
3 >> # @FUNCTION: fortran-2_pkg_setup
4 >> # @DESCRIPTION:
5 >> # Setup functionallity, checks for a valid fortran compiler and optionally for its openmp support.
6 >> fortran-2_pkg_setup() {
7 >> _have-valid-fortran || \
8 >> die "Please emerge the current gcc with USE=fortran or export FC defining a working fortran compiler"
9 >> export FC=$(tc-getFC)
10 >> export F77=$(tc-getFC)
11 >> export F90=$(tc-getFC)
12 >> export F95=$(tc-getFC)
13 >> if [[ ${FC_NEED_OPENMP} == 1 ]]; then
14 >> _fortran-has-openmp || \
15 >> die "Please emerge current gcc with USE=openmp or export FC with compiler that supports OpenMP"
16 >> fi
17 >> }
18 >>
19 >> EXPORT_FUNCTIONS pkg_setup
20 >
21 > I wonder if it's possible to take advantage of EAPI4's pkg_pretend, and
22 > fall back to pkg_setup for older EAPIs. pkg_pretend makes it possible to
23 > fix the setup before running emerge, instead of things breaking in the
24 > middle.
25 >
26 > It's just a suggestion.
27 >
28
29 You are right. Thought about it, but refused it, because I din't want to
30 force EAPI=4. But right I can just use a fall back for EAPI<4. Thanks
31 for the suggestion.