Gentoo Archives: gentoo-dev

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

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies