suggestion for Fortran recipe

Eric Gallager egall at gwmail.gwu.edu
Fri Oct 4 07:41:09 PDT 2013


I think it was Sean Farley, so I'm explicitly adding him on cc to this
conversation...



On Fri, Oct 4, 2013 at 10:32 AM, Jeremy Huddleston Sequoia <
jeremyhu at macports.org> wrote:

> Yeah, that sounds reasonable.
>
> As for the PortGroup, IIRC, someone was working on a general compilers
> PortGroup which would incorporate this.
>
> On Oct 3, 2013, at 18:47, David Strubbe <dstrubbe at mit.edu> wrote:
>
> > Hi Jeremy and others,
> >
> > I think a few lines can be simplified in the new Fortran recipe. For
> default variants, it seems to me that it makes no difference whether it is
> set when the variant was explicitly selected.
> >
> > i.e this code from the Portfile recipe
> >
> > if {![variant_isset q8] && ![variant_isset q32]} {
> >     default_variants +q16
> > }
> >
> > is functionally equivalent to
> >
> >
> > if {![variant_isset q8] && ![variant_isset q16] && ![variant_isset q32]}
> {
> >     default_variants +q16
> > }
> >
> > since if +q16 is selected it is not important whether we consider that
> choice to have been made by default or not.
> >
> > As a result, in the Fortran recipe,
> >
> >     if {[variant_isset gcc${ver_no_dot}]} {
> >         if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
> >             set default_fortran_variant ""
> >         }
> >     }
> >
> > is equivalent in functionality to
> >
> >     if {[variant_isset gcc${ver_no_dot}]} {
> >         set default_fortran_variant ""
> >     }
> >
> > and the corresponding if-condition can be removed in the g95 statement,
> thus removing some lines and simplifying it.
> >
> > I am also wondering, can't the Fortran recipe be made a PortGroup? It
> seems problematic for the maintainability of the portfiles for there to be
> such a large block duplicated in many portfiles. If it were a PortGroup,
> then issues like the one above could be settled centrally.
> >
> > Best,
> > David
>
>
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20131004/78d4df2e/attachment.html>


More information about the macports-dev mailing list