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. |