Ticket #30336: Portfile_accelerate.diff
File Portfile_accelerate.diff, 3.7 KB (added by tenomoto (Takeshi Enomoto), 13 years ago) |
---|
-
Portfile
23 23 worksrcdir ARPACK 24 24 patchfiles patch-arpack.diff 25 25 26 26 27 use_parallel_build no 27 28 28 29 pre-fetch { … … 45 46 build.args-append FFLAGS='-O2 -m64' 46 47 } else { 47 48 build.args-append FFLAGS='-O2 -m32' 48 49 } 49 50 } else { 50 51 foreach arch {x86_64 i386 ppc ppc64} { 51 52 set merger_build_args(${arch}) home=${worksrcpath}-${arch} … … 78 79 build.args-append FC=${configure.fc} MAKE=${build.cmd} 79 80 } 80 81 82 set lapacklibs "-latlas -llapack -lblas" 83 set flibs -lgfortran 84 set mpilibs "-lSystem" 85 if {![variant_isset g95]} { 81 86 post-build { 82 87 set curVer ${version} 83 88 set comVer [join [lrange [split ${version} '.'] 0 1 ] '.'] … … 95 100 set dir ${worksrcpath}-${arch} 96 101 } 97 102 98 make_dylib arpack ${dir} ${arch} "-latlas -llapack -lblas -lgfortran -lSystem" ${version} 99 100 if { [variant_isset mpi] } { 101 make_dylib parpack ${dir} ${arch} "-latlas -llapack -lblas -lgfortran -lmpi_f77 -lSystem -larpack.1" ${version} 102 } 103 make_dylib arpack ${dir} ${arch} "${lapacklibs} ${flibs} ${mpilibs}" ${version} 103 104 } 104 105 } 106 } 105 107 106 108 post-configure { 107 109 if { [variant_isset mpi] } { 108 110 set stlibs "libarpack.a libparpack.a" 109 111 set shlibs "libarpack.1.dylib libparpack.1.dylib" 112 } elseif {![variant_isset g95]} { 113 set stlibs "libarpack.a" 114 set shlibs "libarpack.1.dylib" 110 115 } else { 111 116 set stlibs "libarpack.a" 112 set shlibs " libarpack.1.dylib"117 set shlibs "" 113 118 } 114 119 115 120 if { ![variant_isset universal] } { … … 139 144 } 140 145 } 141 146 142 variant gcc42 description {build with gfortran-mp-4.2} conflicts gcc43 gcc44 gcc45 universal {147 variant gcc42 description {build with gfortran-mp-4.2} conflicts gcc43 gcc44 gcc45 g95 universal { 143 148 depends_build-append port:gcc42 144 149 configure.fc ${prefix}/bin/gfortran-mp-4.2 145 150 } 146 151 147 variant gcc43 description {build with gfortran-mp-4.3} conflicts gcc42 gcc44 gcc45 universal {152 variant gcc43 description {build with gfortran-mp-4.3} conflicts gcc42 gcc44 gcc45 g95 universal { 148 153 depends_build-append port:gcc43 149 154 configure.fc ${prefix}/bin/gfortran-mp-4.3 150 155 } 151 156 152 variant gcc44 description {build with gfortran-mp-4.4} conflicts gcc42 gcc43 gcc45 {157 variant gcc44 description {build with gfortran-mp-4.4} conflicts gcc42 gcc43 gcc45 g95 { 153 158 depends_build-append port:gcc44 154 159 configure.fc ${prefix}/bin/gfortran-mp-4.4 155 160 } 156 161 157 variant gcc45 description {build with gfortran-mp-4.5} conflicts gcc42 gcc43 gcc44 {162 variant gcc45 description {build with gfortran-mp-4.5} conflicts gcc42 gcc43 gcc44 g95 { 158 163 depends_build-append port:gcc45 159 164 configure.fc ${prefix}/bin/gfortran-mp-4.5 160 165 } 161 166 162 if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] } { 167 variant g95 description {build with g95} conflicts gcc42 gcc43 gcc44 gcc45 universal { 168 depends_build-append port:g95 169 configure.fc ${prefix}/bin/g95 170 } 171 172 if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset g95] } { 163 173 default_variants +gcc44 164 174 } 165 175 … … 187 197 188 198 depends_build port:openmpi 189 199 configure.fc ${prefix}/bin/openmpif77 200 set mpilibs "-lmpi_f77 -lSystem -larpack.1" 190 201 } 191 202 203 variant accelerate conflicts atlas description {build with Accelerate framework} { 204 set lapacklibs "-framework Accelerate" 205 } 192 206 207 variant arpack description {build with atlas} { 208 depends_lib-append port:atlas 209 set lapacklibs "-latlas -llapack -lblas" 210 } 193 211 212 if {![variant_isset atlas]} { 213 default_variants +accelerate 214 } 215 194 216 livecheck.type none