Ignore:
Timestamp:
Jan 23, 2014, 8:09:07 PM (5 years ago)
Author:
sean@…
Message:

compilers-1.0: add enforce_fortran proc

File:
1 edited

Legend:

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

    r116306 r116307  
    441441}
    442442
     443proc compilers.enforce_fortran {args} {
     444    foreach portname $args {
     445        if {![catch {set result [active_variants $portname "" ""]}]} {
     446            set otf  [fortran_active_variant_name $portname]
     447            set myf  [fortran_variant_name]
     448
     449            # gfortran is nothing more than the fortran compiler from gcc48
     450            set equiv 0
     451            if {($otf eq "gcc48" || $otf eq "gfortran") && ($myf eq "gcc48" || $myf eq "gfortran")} {
     452                set equiv 1
     453            }
     454
     455            if {$otf ne "" && $myf eq ""} {
     456                default_variants +$otf
     457            } elseif {$otf ne $myf && !$equiv} {
     458                ui_error "Install $portname +$myf"
     459                return -code error "$portname +$myf not installed"
     460            }
     461        }
     462    }
     463}
     464
    443465proc compilers.setup {args} {
    444466    global cdb compilers.variants compilers.clang_variants compilers.gcc_variants
Note: See TracChangeset for help on using the changeset viewer.