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 |
Now using the new pkg_pretend for EAPI=4 |