Ticket #49267: patch-atlas-gfortran.diff

File patch-atlas-gfortran.diff, 1.5 KB (added by seanfarley (Sean Farley), 9 years ago)
  • dports/math/atlas/Portfile

    # HG changeset patch
    # User Sean Farley <sean@farley.io>
    # Date 1444503380 25200
    #      Sat Oct 10 11:56:20 2015 -0700
    # Node ID d25a9e7248e550692a63b5ae460a2bbc23d407cb
    # Parent  606edae6e11214bad07052c2988753e8c34e145a
    atlas: add support for finding gfortran 5
    
    diff --git a/dports/math/atlas/Portfile b/dports/math/atlas/Portfile
    a b pre-configure { 
    417417    # Fortran sources (do not impact overall Atlas performance)
    418418
    419419    if {${use_clang} != "" && ${fortran} == 1} {
    420420
    421421        if {![variant_isset perf]} {
    422             set gflist  [glob -noc ${prefix}/bin/gfortran-mp-4.*]
     422            set gflist  [glob -noc ${prefix}/bin/gfortran-mp-*]
    423423            if {[llength ${gflist}] == 0} {
    424424
    425425                # No fortran compiler found, bail out
    426426                return -code error "Atlas could not detect any fortran compiler.\
    427427                                    If you really don’t need the fortran interface\
    pre-configure { 
    433433                # Select most recent gfortran
    434434                global gcc_version
    435435
    436436                configure.f77   [lindex [lsort -dec ${gflist}] 0]
    437437                set gcc_version   \
    438                 [join [split [string range ${configure.f77} end-2 end] "."] ""]           
     438                [string replace ${configure.f77} 0 [string length ${prefix}]+[string length bin/gfortran-mp-]]
    439439            }
    440440        } else {
    441441            set libgccpath                  ${prefix}/lib/gcc48
    442442        }
    443443    }