Fortran recipe

Chris Jones jonesc at hep.phy.cam.ac.uk
Sun Aug 25 03:45:53 PDT 2013


Hi,

For the science/root port, the reason the port provides variants to use various gcc (and clang) compilers is not really because of fortran. ROOT provides an interactive build environment, and that environment is based on the compiler used to build ROOT. As such the user might have a reason to want a particular compiler, so the port provides various options to allow this. So for this port, I don't think changing anything makes sense.

cheers Chris

On 25 Aug 2013, at 3:20am, Jeremy Huddleston Sequoia <jeremyhu at macports.org> wrote:

> ping.  Can I please get some feedback on this?  Can some maintainers of fortran ports in math/science categories give this a try?  We really need to get ports weened off of g++-mp-4.X ...
> 
> Thanks,
> Jeremy
> 
> On Aug 19, 2013, at 15:05, Jeremy Huddleston Sequoia <jeremyhu at macports.org> wrote:
> 
>> Most ports that require fortran set configure.compiler to macports-gcc-4.X.  This gets the port a fortran compiler, but it also switches the C and C++ compilers as well.  If the port also has C and C++ sources, then it would be preferable to leave configure.cc and configure.cxx alone and just choose a fortran compiler.
>> 
>> I'm suggesting that such ports be updated to do this and want some feedback on this Portfile recipe:
>> 
>> set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
>> set default_fortran_variant "+gcc48"
>> 
>> foreach ver ${gcc_versions} {
>>   set ver_no_dot [join [split ${ver} "."] ""]
>>   variant gcc${ver_no_dot} description {build with gfortran from gcc${ver_no_dot}} conflicts g95 {
>>       depends_lib-append port:libgcc
>>       depends_build-append port:gcc${ver_no_dot}
>> 
>>       configure.fc  ${prefix}/bin/gfortran-mp-${ver}
>>       configure.f77 ${prefix}/bin/gfortran-mp-${ver}
>>       configure.f90 ${prefix}/bin/gfortran-mp-${ver}
>>   }
>> 
>>   foreach over ${gcc_versions} {
>>       if {${ver} == ${over}} {
>>           continue
>>       }
>> 
>>       set over_no_dot [join [split ${over} "."] ""]
>>       variant gcc${ver_no_dot} conflicts gcc${over_no_dot} {}
>>   }
>> 
>>   variant g95 conflicts gcc${ver_no_dot} {}
>> 
>>   if {[variant_isset gcc${ver_no_dot}]} {
>>       set default_fortran_variant ""
>>   }
>> }
>> 
>> variant g95 description {build with g95} {
>>   depends_build-append port:g95
>>   configure.fc ${prefix}/bin/g95
>>   configure.f77 ${prefix}/bin/g95
>>   configure.f90 ${prefix}/bin/g95
>> }
>> 
>> if {[variant_isset g95]} {
>>   set default_fortran_variant ""
>> }
>> 
>> if {${default_fortran_variant} != ""} {
>>   default_variants ${default_fortran_variant}
>> }
> 
> 
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2030 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20130825/4467941f/attachment-0001.p7s>


More information about the macports-dev mailing list