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 |
| 44 | set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9} |
| 45 | set default_fortran_variant +gcc48 |
| 46 | set g95_conflicts {} |
| 47 | |
| 48 | foreach 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 | |
| 74 | eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}] |
| 75 | |
| 76 | if {[variant_isset g95]} { |
| 77 | if {${default_fortran_variant} != "+g95"} { |
| 78 | set default_fortran_variant "" |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | if {${default_fortran_variant} != ""} { |
| 83 | default_variants-append "${default_fortran_variant}" |
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 | |
| 86 | foreach 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 | } |