107 | | set gcc_versions {4.5 4.6 4.7 4.8 4.9} |
108 | | set default_fortran_variant +gfortran48 |
109 | | |
110 | | foreach ver ${gcc_versions} { |
111 | | set ver_no_dot [join [split ${ver} "."] ""] |
112 | | |
113 | | set variant_line {variant gfortran${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}"} |
114 | | |
115 | | foreach over ${gcc_versions} { |
116 | | if {${ver} == ${over}} { |
117 | | continue |
118 | | } |
119 | | |
120 | | set over_no_dot [join [split ${over} "."] ""] |
121 | | append variant_line " conflicts gfortran${over_no_dot}" |
122 | | } |
123 | | append variant_line { {}} |
124 | | |
125 | | eval $variant_line |
126 | | |
127 | | if {[variant_isset gfortran${ver_no_dot}]} { |
128 | | if {${default_fortran_variant} != "+gfortran${ver_no_dot}"} { |
129 | | set default_fortran_variant "" |
130 | | } |
131 | | } |
132 | | } |
133 | | |
134 | | if {${default_fortran_variant} != ""} { |
135 | | default_variants-append "${default_fortran_variant}" |
136 | | } |
137 | | |
138 | | foreach ver ${gcc_versions} { |
139 | | set ver_no_dot [join [split ${ver} "."] ""] |
140 | | |
141 | | if {[variant_isset gfortran${ver_no_dot}]} { |
142 | | depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc |
143 | | depends_build-append port:gcc${ver_no_dot} |
144 | | |
145 | | configure.fc ${prefix}/bin/gfortran-mp-${ver} |
146 | | configure.f77 ${prefix}/bin/gfortran-mp-${ver} |
147 | | configure.f90 ${prefix}/bin/gfortran-mp-${ver} |
148 | | } |
149 | | } |
150 | | |