59 | | foreach ver ${gcc_versions} { |
60 | | set ver_no_dot [join [split ${ver} "."] ""] |
61 | | |
62 | | set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95} |
63 | | |
64 | | foreach over ${gcc_versions} { |
65 | | if {${ver} eq ${over}} { |
66 | | continue |
67 | | } |
68 | | |
69 | | set over_no_dot [join [split ${over} "."] ""] |
70 | | append variant_line " conflicts gcc${over_no_dot}" |
71 | | } |
72 | | append variant_line { {}} |
73 | | |
74 | | eval $variant_line |
75 | | |
76 | | append g95_conflicts " conflicts gcc${ver_no_dot}" |
77 | | |
78 | | if {[variant_isset gcc${ver_no_dot}]} { |
79 | | if {${default_fortran_variant} ne "+gcc${ver_no_dot}"} { |
80 | | set default_fortran_variant "" |
81 | | } |
82 | | } |
83 | | } |
84 | | |
85 | | eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}] |
86 | | |
87 | | if {[variant_isset g95]} { |
88 | | if {${default_fortran_variant} ne "+g95"} { |
89 | | set default_fortran_variant "" |
90 | | } |
91 | | } |
92 | | |
93 | | if {${default_fortran_variant} ne ""} { |
94 | | default_variants-append "${default_fortran_variant}" |
95 | | } |
96 | | |
97 | | foreach ver ${gcc_versions} { |
98 | | set ver_no_dot [join [split ${ver} "."] ""] |
99 | | |
100 | | if {[variant_isset gcc${ver_no_dot}]} { |
101 | | depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc |
102 | | depends_build-append port:gcc${ver_no_dot} |
103 | | |
104 | | configure.fc ${prefix}/bin/gfortran-mp-${ver} |
105 | | configure.f77 ${prefix}/bin/gfortran-mp-${ver} |
106 | | configure.f90 ${prefix}/bin/gfortran-mp-${ver} |
107 | | |
108 | | build.env-append F2CLIBS=gfortran \ |
109 | | F2CLIBS_PREFIX=${prefix}/lib/gcc${ver_no_dot} \ |
110 | | CC=${configure.cc} |
111 | | } |
112 | | } |
113 | | |
114 | | if {[variant_isset g95]} { |
115 | | depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc |
116 | | depends_build-append port:g95 |
117 | | |
118 | | configure.fc ${prefix}/bin/g95 |
119 | | configure.f77 ${prefix}/bin/g95 |
120 | | configure.f90 ${prefix}/bin/g95 |
121 | | |
| 59 | if {[gcc_variant_isset]} { |
| 60 | build.env-append F2CLIBS=gfortran \ |
| 61 | F2CLIBS_PREFIX=${prefix}/lib/[gcc_variant_name] |
| 62 | } else { |
| 63 | # g95 |