On 6/13/11 11:19 AM, "Paweł Hajdan, Jr." wrote:
> On 6/13/11 11:06 AM, justin 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() {
>>      _have-valid-fortran || \
>>              die "Please emerge the current gcc with USE=fortran or export 
>> FC defining a working fortran compiler"
>>      export FC=$(tc-getFC)
>>      export F77=$(tc-getFC)
>>      export F90=$(tc-getFC)
>>      export F95=$(tc-getFC)
>>      if [[ ${FC_NEED_OPENMP} == 1 ]]; then
>>              _fortran-has-openmp || \
>>              die "Please emerge current gcc with USE=openmp or export FC 
>> with compiler that supports OpenMP"
>>      fi
>> }
>>
>> EXPORT_FUNCTIONS pkg_setup
> 
> I wonder if it's possible to take advantage of EAPI4's pkg_pretend, and
> fall back to pkg_setup for older EAPIs. pkg_pretend makes it possible to
> fix the setup before running emerge, instead of things breaking in the
> middle.
> 
> It's just a suggestion.
> 

You are right. Thought about it, but refused it, because I din't want to
force EAPI=4. But right I can just use a fall back for EAPI<4. Thanks
for the suggestion.

Reply via email to