40 | | variant gcc46 conflicts gcc47 description {Build with GCC 4.6} { |
41 | | configure.compiler macports-gcc-4.6 |
| 47 | set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9} |
| 48 | set default_fortran_variant +gcc48 |
| 49 | set g95_conflicts {} |
| 50 | |
| 51 | foreach ver ${gcc_versions} { |
| 52 | set ver_no_dot [join [split ${ver} "."] ""] |
| 53 | |
| 54 | set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95} |
| 55 | |
| 56 | foreach over ${gcc_versions} { |
| 57 | if {${ver} == ${over}} { |
| 58 | continue |
| 59 | } |
| 60 | |
| 61 | set over_no_dot [join [split ${over} "."] ""] |
| 62 | append variant_line " conflicts gcc${over_no_dot}" |
| 63 | } |
| 64 | append variant_line { {}} |
| 65 | |
| 66 | eval $variant_line |
| 67 | |
| 68 | append g95_conflicts " conflicts gcc${ver_no_dot}" |
| 69 | |
| 70 | if {[variant_isset gcc${ver_no_dot}]} { |
| 71 | if {${default_fortran_variant} != "+gcc${ver_no_dot}"} { |
| 72 | set default_fortran_variant "" |
| 73 | } |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}] |
| 78 | |
| 79 | if {[variant_isset g95]} { |
| 80 | if {${default_fortran_variant} != "+g95"} { |
| 81 | set default_fortran_variant "" |
| 82 | } |
48 | | if {![variant_isset gcc46]} { |
49 | | default_variants +gcc47 |
| 89 | foreach ver ${gcc_versions} { |
| 90 | set ver_no_dot [join [split ${ver} "."] ""] |
| 91 | |
| 92 | if {[variant_isset gcc${ver_no_dot}]} { |
| 93 | depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc |
| 94 | depends_build-append port:gcc${ver_no_dot} |
| 95 | |
| 96 | build.args-append F77=${prefix}/bin/gfortran-mp-${ver} |
| 97 | test.args-append F77=${prefix}/bin/gfortran-mp-${ver} FC=${prefix}/bin/gfortran-mp-${ver} |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | if {[variant_isset g95]} { |
| 102 | depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc |
| 103 | depends_build-append port:g95 |
| 104 | |
| 105 | build.args-append F77=${prefix}/bin/g95 |
| 106 | test.args-append F77=${prefix}/bin/g95 FC=${prefix}/bin/g95 |