Ticket #40595: Portfile-etsf_io.diff

File Portfile-etsf_io.diff, 2.4 KB (added by dstrubbe (David Strubbe), 11 years ago)
  • Portfile

    old new  
    4040test.cmd            make
    4141test.target         check
    4242
    43 variant gcc46 conflicts gcc47 description {Build with GCC 4.6} {
    44     configure.compiler  macports-gcc-4.6
    45     require_active_variants netcdf-fortran gcc46
     43# Fortran recipe
     44set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
     45set default_fortran_variant +gcc48
     46set g95_conflicts {}
     47
     48foreach ver ${gcc_versions} {
     49    set ver_no_dot [join [split ${ver} "."] ""]
     50
     51    set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95}
     52
     53    foreach over ${gcc_versions} {
     54        if {${ver} == ${over}} {
     55            continue
     56        }
     57
     58        set over_no_dot [join [split ${over} "."] ""]
     59        append variant_line " conflicts gcc${over_no_dot}"
     60    }
     61    append variant_line { {}}
     62
     63    eval $variant_line
     64
     65    append g95_conflicts " conflicts gcc${ver_no_dot}"
     66
     67    if {[variant_isset gcc${ver_no_dot}]} {
     68        if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
     69            set default_fortran_variant ""
     70        }
     71    }
     72}
     73
     74eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}]
     75
     76if {[variant_isset g95]} {
     77    if {${default_fortran_variant} != "+g95"} {
     78        set default_fortran_variant ""
     79    }
     80}
     81
     82if {${default_fortran_variant} != ""} {
     83    default_variants-append "${default_fortran_variant}"
    4684}
    47 variant gcc47 conflicts gcc46 description {Build with GCC 4.7} {
    48     configure.compiler  macports-gcc-4.7
    49     require_active_variants netcdf-fortran gcc47
     85
     86foreach ver ${gcc_versions} {
     87    set ver_no_dot [join [split ${ver} "."] ""]
     88
     89    if {[variant_isset gcc${ver_no_dot}]} {
     90        depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
     91        depends_build-append port:gcc${ver_no_dot}
     92
     93        configure.fc              gfortran-mp-${ver}
     94        require_active_variants   netcdf-fortran gcc${ver_no_dot}
     95    }
    5096}
    5197
    52 if {![variant_isset gcc46]} {
    53     default_variants    +gcc47
     98if {[variant_isset g95]} {
     99    depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
     100    depends_build-append port:g95
     101
     102    configure.fc              ${prefix}/bin/g95
     103    require_active_variants   netcdf-fortran g95
     104    # Warning: a few tests will fail with g95.
    54105}
    55106
    56107livecheck.url       ${homepage}