Ignore:
Timestamp:
Jun 2, 2016, 6:40:35 PM (3 years ago)
Author:
dstrubbe@…
Message:

compilers portgroup: Add option to set Fortran as default but not required.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/compilers-1.0.tcl

    r149143 r149153  
    5353#   Blacklisted compilers are automatically removed, as are ones that do not support the compilers in compilers.choose:
    5454#   e.g. if choose is just f90, clang variants will not be added.
     55#   List "default_fortran" to make a Fortran variant be selected by default.
    5556#   This procedure must be in the Portfile to create all the compiler variants and set the default.
    5657#   Appropriate conflicts, dependencies, etc. are created too.
     
    8889default compilers.dragonegg_variants {}
    8990default compilers.require_fortran 0
     91default compilers.default_fortran 0
    9092default compilers.setup_done 0
    9193default compilers.required_c {}
     
    592594    global cdb compilers.variants compilers.clang_variants compilers.gcc_variants
    593595    global compilers.dragonegg_variants compilers.fortran_variants
    594     global compilers.require_fortran compilers.setup_done compilers.list
     596    global compilers.require_fortran compilers.default_fortran compilers.setup_done compilers.list
    595597    global compilers.gcc_default
    596598    global compiler.blacklist
     
    643645                    # this signals that fortran is required and not optional
    644646                    set compilers.require_fortran 1
     647                    set compilers.default_fortran 1
     648                }
     649                default_fortran {
     650                    set compilers.default_fortran 1
    645651                }
    646652                default {
     
    696702        lappend ordered_variants {g95}
    697703
    698         if {${compilers.require_fortran} && ![fortran_variant_isset]} {
     704        if {${compilers.default_fortran} && ![fortran_variant_isset]} {
    699705            foreach fv $ordered_variants {
    700706                # if the variant exists, then make it default
Note: See TracChangeset for help on using the changeset viewer.