Ignore:
Timestamp:
May 11, 2015, 7:40:38 PM (4 years ago)
Author:
sean@…
Message:

compilers-1.0: remove assumption about gcc 4.x version; no behavioral change

File:
1 edited

Legend:

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

    r132358 r136116  
    5353
    5454# build database of gcc 4{4..9} compiler attributes
    55 set gcc_versions {4 5 6 7 8 9}
     55set gcc_versions {44 45 46 47 48 49}
    5656foreach v ${gcc_versions} {
    57     lappend compilers.gcc_variants gcc4$v
    58     set cdb(gcc4$v,variant)  gcc4$v
    59     set cdb(gcc4$v,compiler) macports-gcc-4.$v
    60     set cdb(gcc4$v,descrip)  "MacPorts gcc 4.$v"
    61     set cdb(gcc4$v,depends)  port:gcc4$v
    62     set cdb(gcc4$v,dependsl) path:lib/libgcc/libgcc_s.1.dylib:libgcc
    63     set cdb(gcc4$v,dependsd) port:g95
    64     set cdb(gcc4$v,dependsa) gcc4$v
    65     set cdb(gcc4$v,conflict) "gfortran g95"
    66     set cdb(gcc4$v,cc)       ${prefix}/bin/gcc-mp-4.$v
    67     set cdb(gcc4$v,cxx)      ${prefix}/bin/g++-mp-4.$v
    68     set cdb(gcc4$v,cpp)      ${prefix}/bin/cpp-mp-4.$v
    69     set cdb(gcc4$v,objc)     ${prefix}/bin/gcc-mp-4.$v
    70     set cdb(gcc4$v,fc)       ${prefix}/bin/gfortran-mp-4.$v
    71     set cdb(gcc4$v,f77)      ${prefix}/bin/gfortran-mp-4.$v
    72     set cdb(gcc4$v,f90)      ${prefix}/bin/gfortran-mp-4.$v
     57    # if the string is more than one character insert a '.' into it: e.g 49 -> 4.9
     58    set version $v
     59    if {[string length $v] > 1} {
     60        set version [string index $v 0].[string index $v 1]
     61    }
     62    lappend compilers.gcc_variants gcc$v
     63    set cdb(gcc$v,variant)  gcc$v
     64    set cdb(gcc$v,compiler) macports-gcc-$version
     65    set cdb(gcc$v,descrip)  "MacPorts gcc $version"
     66    set cdb(gcc$v,depends)  port:gcc$v
     67    set cdb(gcc$v,dependsl) path:lib/libgcc/libgcc_s.1.dylib:libgcc
     68    set cdb(gcc$v,dependsd) port:g95
     69    set cdb(gcc$v,dependsa) gcc$v
     70    set cdb(gcc$v,conflict) "gfortran g95"
     71    set cdb(gcc$v,cc)       ${prefix}/bin/gcc-mp-$version
     72    set cdb(gcc$v,cxx)      ${prefix}/bin/g++-mp-$version
     73    set cdb(gcc$v,cpp)      ${prefix}/bin/cpp-mp-$version
     74    set cdb(gcc$v,objc)     ${prefix}/bin/gcc-mp-$version
     75    set cdb(gcc$v,fc)       ${prefix}/bin/gfortran-mp-$version
     76    set cdb(gcc$v,f77)      ${prefix}/bin/gfortran-mp-$version
     77    set cdb(gcc$v,f90)      ${prefix}/bin/gfortran-mp-$version
    7378}
    7479
Note: See TracChangeset for help on using the changeset viewer.