118 | | # disallow searching for any fortran executable except what is |
119 | | # specified in this Portfile; NOTE: this change only works when |
120 | | # setting the GCC version; if this flag is not set (meaning no |
121 | | # +gcc4X variant is set), then F2PY may or not work. |
122 | | if {${gcc_version} != ""} { |
123 | | # set which fortran to use in the f2py Python scripts |
124 | | reinplace "/possible_executables/s|\\\[.*\\\]|\['gfortran-mp-${gcc_version}'\]|g" ${worksrcpath}/numpy/distutils/fcompiler/gnu.py |
125 | | } |
| 123 | if {[variant_isset universal] && [variant_isset atlas]} { |
| 124 | # Prepare wrappers |
| 125 | file copy -force ${filespath}/wrapper-template \ |
| 126 | ${worksrcpath}/c-wrapper |
| 127 | file copy -force ${filespath}/wrapper-template \ |
| 128 | ${worksrcpath}/f-wrapper |
| 129 | file copy -force ${filespath}/wrapper-template \ |
| 130 | ${worksrcpath}/cxx-wrapper |
| 131 | |
| 132 | if {[variant_isset gcc43]} { |
| 133 | set CC "${prefix}/bin/gcc-mp-4.3" |
| 134 | set CXX "${prefix}/bin/g++-mp-4.3" |
| 135 | set F90 "${prefix}/bin/gfortran-mp-4.3" |
| 136 | } elseif {[variant_isset gcc44]} { |
| 137 | set CC "${prefix}/bin/gcc-mp-4.4" |
| 138 | set CXX "${prefix}/bin/g++-mp-4.4" |
| 139 | set F90 "${prefix}/bin/gfortran-mp-4.4" |
| 140 | } elseif {[variant_isset gcc45]} { |
| 141 | set CC "${prefix}/bin/gcc-mp-4.5" |
| 142 | set CXX "${prefix}/bin/g++-mp-4.5" |
| 143 | set F90 "${prefix}/bin/gfortran-mp-4.5" |
| 144 | } |
| 145 | |
| 146 | reinplace "s|@@@|${CC}|" ${worksrcpath}/c-wrapper |
| 147 | reinplace "s|---|\\\\.c|" ${worksrcpath}/c-wrapper |
| 148 | reinplace "s|&&&|${prefix}|" ${worksrcpath}/c-wrapper |
| 149 | |
| 150 | reinplace "s|@@@|${CXX}|" ${worksrcpath}/cxx-wrapper |
| 151 | reinplace "s#---#(\\\\.C|\\\\.cpp|\\\\.cc)#" \ |
| 152 | ${worksrcpath}/cxx-wrapper |
| 153 | reinplace "s|&&&|${prefix}|" ${worksrcpath}/cxx-wrapper |
| 154 | |
| 155 | reinplace "s|@@@|${F90}|" ${worksrcpath}/f-wrapper |
| 156 | reinplace "s|---|\\\\.f|" ${worksrcpath}/f-wrapper |
| 157 | reinplace "s|&&&|${prefix}|" ${worksrcpath}/f-wrapper |
| 158 | |
| 159 | build.env-append CC="${worksrcpath}/c-wrapper" \ |
| 160 | CXX="${worksrcpath}/cxx-wrapper" \ |
| 161 | F77="${worksrcpath}/f-wrapper" \ |
| 162 | F90="${worksrcpath}/f-wrapper" |
| 163 | |
| 164 | destroot.env-append CC="${worksrcpath}/c-wrapper" \ |
| 165 | CXX="${worksrcpath}/cxx-wrapper" \ |
| 166 | F77="${worksrcpath}/f-wrapper" \ |
| 167 | F90="${worksrcpath}/f-wrapper" |
| 168 | } |