Changeset 82161
- Timestamp:
- 08/08/11 23:58:23 (4 years ago)
- Location:
- trunk/dports/math/atlas
- Files:
-
- 15 added
- 1 edited
-
Portfile (modified) (3 diffs)
-
files/ar2 (added)
-
files/patch-ATL_AVgcc-fix.diff (added)
-
files/patch-ATL_dmvnk_c.diff (added)
-
files/patch-ATL_go_parallel_c.diff (added)
-
files/patch-ATL_goparallel_prank_c.diff (added)
-
files/patch-Make_ttune-i386.diff (added)
-
files/patch-Make_ttune.diff (added)
-
files/patch-Makefile_pthreads_misc.diff (added)
-
files/patch-SpewMakeInc_c.diff (added)
-
files/patch-archinfo_freebsd.c.diff (added)
-
files/patch-atlas_l2g_base.diff (added)
-
files/patch-atlcomp_txt.diff (added)
-
files/patch-build-Make.top.diff (added)
-
files/patch-make_ttune.diff (added)
-
files/patch-threads-i386.diff (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dports/math/atlas/Portfile
r80831 r82161 1 1 # $Id$ 2 2 3 PortSystem 1.0 4 PortGroup muniversal 1.0 5 6 categories math 7 license BSD 8 name atlas 9 version 3.9.37 10 #revision 4 3 PortSystem 1.0 4 PortGroup muniversal 1.0 5 6 categories math 7 license BSD 8 name atlas 9 version 3.9.46 11 10 12 11 # additional versions 13 set lapackversion 3.3.0 14 set lapackname lapack 15 set atlasdist ${name}${version}.tar.bz2 16 set lapackdist ${lapackname}-${lapackversion}.tgz 17 18 maintainers jameskyle 19 platforms darwin 20 21 description Portable optimal linear algebra software 22 long_description The current version provides a complete BLAS and LAPACK API.\ 23 For many operations, ATLAS achieves performance on par with\ 24 machine-specific tuned libraries. 25 26 homepage http://math-atlas.sourceforge.net/ 27 28 master_sites sourceforge:math-atlas:atlas \ 29 http://www.netlib.org/lapack:lapack 30 31 distfiles ${atlasdist}:atlas \ 32 ${lapackdist}:lapack 33 34 patchfiles patch-SpewMakeInc.c.diff \ 35 patch-emit_mm_c.diff \ 36 patch-archinfo_freebsd_c.diff 37 38 checksums atlas${version}.tar.bz2 \ 39 sha1 71dd254dad1fc9ad3dec123a561706c9a1a5d7d1 \ 40 rmd160 87bb689e7a956df74ea4091552ac3cfd30430093 \ 41 lapack-${lapackversion}.tgz \ 42 md5 84213fca70936cc5f1b59a7b1bf71697 \ 43 sha1 4f0b103da52110e7f60d1d7676727103aca9785e \ 44 rmd160 cc72e7c93ab13464fd892d684b00b910cbbd3b3e 45 46 47 use_parallel_build no 48 build.target build 49 build.dir ${workpath}/${name}-${version}/build 50 51 variant gcc45 conflicts gcc42 gcc43 gcc44 description {build using macports-gcc-4.5} {} 52 variant gcc44 conflicts gcc42 gcc43 description {build using macports-gcc-4.4} {} 53 variant gcc43 conflicts gcc42 gcc44 conflicts universal description {build using macports-gcc-4.3} {} 54 variant gcc42 conflicts gcc43 gcc44 conflicts universal description {build using macports-gcc-4.2} {} 55 56 if { [variant_isset gcc42] } { 57 set gccversion 4.2 58 } elseif { [variant_isset gcc43] } { 59 set gccversion 4.3 60 } elseif { [variant_isset gcc45 ] } { 61 set gccversion 4.5 12 set lapackversion 3.3.1 13 set lapackname lapack 14 set atlasdist ${name}${version}.tar.bz2 15 set lapackdist ${lapackname}-${lapackversion}.tgz 16 17 maintainers jameskyle 18 platforms darwin 19 20 description Portable optimal linear algebra software 21 long_description The current version provides a complete BLAS and LAPACK API.\ 22 For many operations, ATLAS achieves performance on par with\ 23 machine-specific tuned libraries. 24 25 homepage http://math-atlas.sourceforge.net/ 26 27 master_sites sourceforge:math-atlas:atlas \ 28 http://www.netlib.org/lapack:lapack 29 30 distfiles ${atlasdist}:atlas \ 31 ${lapackdist}:lapack 32 33 patchfiles patch-SpewMakeInc_c.diff \ 34 patch-archinfo_freebsd_c.diff \ 35 patch-ATL_goparallel_prank_c.diff \ 36 patch-ATL_go_parallel_c.diff \ 37 patch-atlcomp_txt.diff \ 38 patch-atlas_l2g_base.diff 39 40 41 checksums atlas${version}.tar.bz2 \ 42 sha1 aef8b696bc1bc50b304db953e2f20a653b783317 \ 43 rmd160 1fbe0f403fc8a35b2b355edabc756c65c19befa2 \ 44 lapack-${lapackversion}.tgz \ 45 md5 d0d533ec9a5b74933c2a1e84eedc58b4 \ 46 sha1 3ce437e05f0e9a3c8148ec41922f6efeef0ebdac \ 47 rmd160 5e9d90122110045e07351f3ab30dc4e2b43d52db 48 49 50 use_parallel_build no 51 build.target build 52 build.dir ${workpath}/${name}-${version}/build 53 54 variant gcc46 conflicts gcc42 gcc43 gcc44 gcc45 description {build using macports-gcc-4.6} {} 55 variant gcc45 conflicts gcc42 gcc43 gcc44 gcc46 description {build using macports-gcc-4.5} {} 56 variant gcc44 conflicts gcc42 gcc43 gcc45 gcc46 description {build using macports-gcc-4.4} {} 57 variant gcc43 conflicts gcc42 gcc44 gcc45 gcc46 conflicts universal description {build using macports-gcc-4.3} {} 58 variant gcc42 conflicts gcc43 gcc44 gcc45 gcc46 conflicts universal description {build using macports-gcc-4.2} { 59 ui_warn 'Use of gcc42 is deprecated. Please upgrade if possible'} 60 61 if { ${os.major} < 11 || ![variant_isset dragonegg45] } { 62 if { [variant_isset gcc42] } { 63 set gccversion 4.2 64 } elseif { [variant_isset gcc43] } { 65 set gccversion 4.3 66 } elseif { [variant_isset gcc44] } { 67 set gccversion 4.4 68 } elseif { [variant_isset gcc45 ] } { 69 set gccversion 4.5 70 } elseif { [variant_isset gcc46] } { 71 set gccversion 4.6 72 } else { 73 default_variants +gcc44 74 set gccversion 4.4 75 } 62 76 } else { 63 default_variants +gcc44 64 set gccversion 4.4 65 } 66 67 set gccnumber [join [split ${gccversion} .] ""] 68 69 destroot.dir ${build.dir} 70 destroot.destdir DESTDIR=${destroot}${prefix} 71 depends_lib port:gcc${gccnumber} \ 72 port:bzip2 \ 73 port:gzip 74 75 if {[info exists depends_skip_archcheck]} { 76 depends_skip_archcheck gcc${gccnumber} 77 } 78 79 configure.compiler macports-gcc-${gccversion} 80 81 if { ${os.arch}=="i386" } { 82 set universal_archs_supported { i386 x86_64 } 77 # On Lion, we can also select clang and llvm-gcc42 since these compilers 78 # give performance at least as good as gcc. 79 # Fortran compiler remains gcc (dragonegg to come?) 80 if { [variant_isset gcc42] } { 81 set gccversion 4.2 82 } elseif { [variant_isset gcc43] } { 83 set gccversion 4.3 84 } elseif { [variant_isset gcc44] } { 85 set gccversion 4.4 86 } elseif { [variant_isset gcc45 ] } { 87 set gccversion 4.5 88 } elseif { [variant_isset gcc46] } { 89 return -code error "GCC/GFortran 4.6 is not yet available" 90 } elseif { [variant_isset dragonegg45] } { 91 configure.compiler clang 92 configure.f77 ${prefix}/bin/gfortran-mp-4.5 93 } else { 94 return -code error "GCC/GFortran 4.6 is not yet available" 95 } 96 } 97 98 destroot.dir ${build.dir} 99 destroot.destdir DESTDIR=${destroot}${prefix} 100 depends_lib port:bzip2 \ 101 port:gzip 102 103 if { [info exists gccversion] } { 104 set gccnumber [join [split ${gccversion} .] ""] 105 configure.compiler macports-gcc-${gccversion} 106 depends_lib-append port:gcc${gccnumber} 107 } 108 109 if {[info exists depends_skip_archcheck] && [info exists gccversion]} { 110 depends_skip_archcheck gcc${gccnumber} 111 } 112 113 # No cross-compilation possible 114 if { ${os.arch} == "i386" } { 115 set universal_archs_supported { i386 x86_64 } 83 116 } else { 84 set universal_archs_supported { ppc ppc64 }117 set universal_archs_supported { ppc ppc64 } 85 118 } 86 119 87 120 if {${build_arch} == "x86_64" || ${build_arch} == "ppc64" } { 88 set my_arch 64121 set my_arch 64 89 122 } else { 90 set my_arch 32 91 } 92 93 configure.args -C xc ${configure.cc} \ 94 -C gc ${configure.cc} \ 95 -C if ${configure.f77} \ 96 -C ic ${configure.cc} \ 97 -C dm ${configure.cc} \ 98 -C sm ${configure.cc} \ 99 -C dk ${configure.cc} \ 100 -C sk ${configure.cc} \ 101 --cc=${configure.cc} \ 102 --with-netlib-lapack-tarfile=${distpath}/${lapackdist} \ 103 -O 12 \ 104 -b ${my_arch} \ 105 -Fa alg -fPIC 106 123 set my_arch 32 124 } 125 126 configure.args -C xc ${configure.cc} \ 127 -C gc ${configure.cc} \ 128 -C if ${configure.f77} \ 129 -C ic ${configure.cc} \ 130 -C dm ${configure.cc} \ 131 -C sm ${configure.cc} \ 132 -C dk ${configure.cc} \ 133 -C sk ${configure.cc} \ 134 --cc=${configure.cc} \ 135 --with-netlib-lapack-tarfile=${distpath}/${lapackdist} \ 136 -O 12 \ 137 -b ${my_arch} \ 138 -Fa alg -fPIC 139 140 # Dragonegg 141 if { [variant_isset dragonegg45] } { 142 configure.args-append -Fa if -fplugin=${prefix}/lib/dragonegg.so 143 } 144 107 145 # At this point, no threading for ppc/ppc64 108 146 … … 115 153 116 154 if {${build_arch} == "ppc" && ! [variant_isset universal]} { 117 configure.args-delete --cc=${configure.cc} \118 -Fa alg -fPIC155 configure.args-delete --cc=${configure.cc} \ 156 -Fa alg -fPIC 119 157 120 158 configure.args-append --cc='${configure.cc} -m32' \ 121 159 -A 4 \ 122 -Fa alg '-fPIC -m32' 123 124 # On Leopard, we may warn the user that ppc is not as efficient as ppc64 125 if {${os.major} == 9} { 126 if {[exec sysctl -n hw.cpu64bit_capable] == 1} { 127 ui_msg "--- Compiling for G4 arch (ppc) on a G5 (ppc64) machine." 128 ui_msg "--- This will lead to inferior performance." 129 } 130 } 160 -Fa alg '-fPIC -m32' 161 162 # On Leopard, we may warn the user that ppc is not as efficient as ppc64 163 if {${os.major} == 9} { 164 if {[exec sysctl -n hw.cpu64bit_capable] == 1} { 165 ui_msg "--- Compiling for G4 arch (ppc) on a G5 (ppc64) machine." 166 ui_msg "--- This will lead to inferior performance." 167 } 168 } 169 170 } 171 172 if { ${os.major} == 11 && \ 173 [exec sysctl -n hw.optional.avx1_0] == 1 } { 174 # Corei2 is not supported yet because gcc4.5 does not 175 # support AVX instructions and gcc4.6 does not compile yet. 176 # Set CPU to Corei1 instead 177 configure.args-append -A 18 131 178 } 132 179 133 180 if { [variant_isset universal] } { 134 configure.universal_args-delete--disable-dependency-tracking135 configure.args-delete--cc=${configure.cc} \136 -b ${my_arch} \137 -Fa alg -fPIC138 139 lappend merger_configure_args(ppc) --cc='${configure.cc} -m32' \140 -b 32 \141 -A 4 \181 configure.universal_args-delete --disable-dependency-tracking 182 configure.args-delete --cc=${configure.cc} \ 183 -b ${my_arch} \ 184 -Fa alg -fPIC 185 186 lappend merger_configure_args(ppc) --cc='${configure.cc} -m32' \ 187 -b 32 \ 188 -A 4 \ 142 189 -t 0 \ 143 -s gas_ppc \144 -Fa alg '-fPIC -m32'145 lappend merger_configure_args(ppc64) --cc='${configure.cc} -m64' \146 -b 64 \147 -A 5 \190 -s gas_ppc \ 191 -Fa alg '-fPIC -m32' 192 lappend merger_configure_args(ppc64) --cc='${configure.cc} -m64' \ 193 -b 64 \ 194 -A 5 \ 148 195 -t 0 \ 149 -s gas_ppc \150 -Fa alg '-fPIC -m64'151 lappend merger_configure_args(i386) --cc='${configure.cc} -m32' \152 -b 32 \153 -s gas_x86_32 \154 -Fa alg '-fPIC -m32'155 lappend merger_configure_args(x86_64) --cc='${configure.cc} -m64' \156 -b 64 \157 -s gas_x86_64 \158 -Fa alg '-fPIC -m64'196 -s gas_ppc \ 197 -Fa alg '-fPIC -m64' 198 lappend merger_configure_args(i386) --cc='${configure.cc} -m32' \ 199 -b 32 \ 200 -s gas_x86_32 \ 201 -Fa alg '-fPIC -m32' 202 lappend merger_configure_args(x86_64) --cc='${configure.cc} -m64' \ 203 -b 64 \ 204 -s gas_x86_64 \ 205 -Fa alg '-fPIC -m64' 159 206 } else { 160 lappend merger_configure_args(ppc)161 lappend merger_configure_args(ppc64)162 lappend merger_configure_args(i386)163 lappend merger_configure_args(x86_64)164 } 165 166 build.env-append "CC=${configure.cc} CXX=${configure.cxx}"207 lappend merger_configure_args(ppc) 208 lappend merger_configure_args(ppc64) 209 lappend merger_configure_args(i386) 210 lappend merger_configure_args(x86_64) 211 } 212 213 build.env-append "CC=${configure.cc} CXX=${configure.cxx}" 167 214 168 215 # we are configuring from the build directory 169 configure.dir ${workpath}/${name}-${version}/build170 configure.cmd ../configure216 configure.dir ${workpath}/${name}-${version}/build 217 configure.cmd ../configure 171 218 172 219 173 220 # change the default compilers to those of gcc and make into shared library 174 221 extract { 175 # extract atlas and move to a consistent working directory name176 system"cd ${workpath} && bunzip2 -dc ${distpath}/${atlasdist} | \177 gnutar --no-same-owner -xf -"178 system"mv ${workpath}/ATLAS ${workpath}/${name}-${version}"222 # extract atlas and move to a consistent working directory name 223 system "cd ${workpath} && bunzip2 -dc ${distpath}/${atlasdist} | \ 224 gnutar --no-same-owner -xf -" 225 system "mv ${workpath}/ATLAS ${workpath}/${name}-${version}" 179 226 } 180 227 181 228 post-patch { 182 reinplace "s|__MACPORTS_GCC__|${configure.cc}|g" \ 183 ${workpath}/${name}-${version}/CONFIG/src/SpewMakeInc.c 184 } 185 186 # Bug in 3.9.37 187 proc bug3_9_37 {arch path} { 188 switch ${arch} { 189 190 x86_64 { 191 reinplace -E \ 192 "s|ATL_thread_exit.o ATL_thread_join.o|\ 193 ATL_thread_exit.o ATL_thread_join.o\ 194 ATL_DecAtomicCount_amd64.o|" ${path} 195 } 196 197 i386 { 198 reinplace -E \ 199 "s|ATL_thread_exit.o ATL_thread_join.o|\ 200 ATL_thread_exit.o ATL_thread_join.o\ 201 ATL_DecAtomicCount_ia32.o|" ${path} 202 } 203 204 ppc64 { 205 reinplace -E \ 206 "s|ATL_thread_exit.o ATL_thread_join.o|\ 207 ATL_thread_exit.o ATL_thread_join.o\ 208 ATL_DecAtomicCount_ppc.o|" ${path} 209 } 210 211 ppc { 212 reinplace -E \ 213 "s|ATL_thread_exit.o ATL_thread_join.o|\ 214 ATL_thread_exit.o ATL_thread_join.o\ 215 ATL_DecAtomicCount_ppc.o|" ${path} 216 } 217 } 229 reinplace "s|__MACPORTS_GCC__|${configure.cc}|g" \ 230 ${workpath}/${name}-${version}/CONFIG/src/SpewMakeInc.c 231 232 # ar -r / ranlib / libtool seems to be buggy, so we have to supply a 233 # workaround to link properly. 234 reinplace "s|XXXXX|${filespath}/ar2|" \ 235 ${workpath}/${name}-${version}/CONFIG/src/SpewMakeInc.c 218 236 } 219 237 220 238 pre-configure { 221 if { [variant_isset universal] } { 222 foreach arch ${universal_archs_to_use} { 223 copy ${workpath}/${name}-${version} ${workpath}/${name}-${version}-${arch} 224 } 225 } 226 227 reinplace "s|cc=gcc|cc=${configure.cc}|g" ${worksrcpath}/configure 228 reinplace "s|-no-cpp-precomp||g" ${workpath}/${name}-${version}/CONFIG/src/atlcomp.txt 229 230 # Get some system specific variables for maximum optimization 231 set cpufreq [expr {[exec sysctl -n hw.cpufrequency]/1000000}] 232 ui_debug "Setting CPU Frequency for: ${cpufreq}" 233 234 if {[string equal "${os.arch}" "powerpc"]} { 235 configure.args-append -D c -DWALL 236 } else { 237 configure.args-append -D c -DPentiumCPS=${cpufreq} 238 } 239 240 if { [variant_isset universal] } { 241 set archs ${universal_archs_to_use} 242 } else { 243 set archs ${build_arch} 244 } 245 246 foreach arch ${archs} { 247 248 if { ! [variant_isset universal] } { 249 set atlas_path ${workpath}/${name}-${version} 250 } else { 251 set atlas_path ${workpath}/${name}-${version}-${arch} 252 } 253 254 file mkdir ${atlas_path}/build 255 256 # Correct a bug in 3.9.37 257 set mkt ${atlas_path}/makes/Make.thr 258 bug3_9_37 ${arch} ${mkt} 239 240 # i386 builds must be patch otherwise threading does not work. 241 if { [variant_isset universal] } { 242 foreach arch ${universal_archs_to_use} { 243 copy ${workpath}/${name}-${version} \ 244 ${workpath}/${name}-${version}-${arch} 245 if { ${arch} == "i386" } { 246 ui_msg "Patching Make.ttune for i386 universal build" 247 system "cd ${workpath}/${name}-${version}-i386/makes && \ 248 patch < ${filespath}/patch-Make_ttune-i386.diff" 249 } 250 } 251 } 252 253 if { ${build_arch} == "i386" && ! [variant_isset universal] } { 254 ui_msg "Patching Make.ttune for i386 build" 255 system "cd ${workpath}/${name}-${version}/makes && \ 256 patch < ${filespath}/patch-Make_ttune-i386.diff" 257 } 258 259 reinplace "s|cc=gcc|cc=${configure.cc}|g" ${worksrcpath}/configure 260 reinplace "s|-no-cpp-precomp||g" \ 261 ${workpath}/${name}-${version}/CONFIG/src/atlcomp.txt 262 263 # Get some system specific variables for maximum optimization 264 set cpufreq [expr {[exec sysctl -n hw.cpufrequency]/1000000}] 265 ui_debug "Setting CPU Frequency for: ${cpufreq}" 266 267 if { ${os.arch} == "powerpc" } { 268 configure.args-append -D c -DWALL 269 } else { 270 configure.args-append -D c -DPentiumCPS=${cpufreq} 271 } 272 273 if { [variant_isset universal] } { 274 set archs ${universal_archs_to_use} 275 } else { 276 set archs ${build_arch} 277 } 278 279 foreach arch ${archs} { 280 if { ! [variant_isset universal] } { 281 set atlas_path ${workpath}/${name}-${version} 282 } else { 283 set atlas_path ${workpath}/${name}-${version}-${arch} 284 } 285 286 file mkdir ${atlas_path}/build 259 287 } 260 288 } 261 289 262 290 post-configure { 263 if { [variant_isset universal] } { 264 set archs ${universal_archs_to_use} 265 } else { 266 set archs ${build_arch} 267 } 268 269 foreach arch ${archs} { 270 if { ! [variant_isset universal] } { 271 set atlas_path ${workpath}/${name}-${version} 272 } else { 273 set atlas_path ${workpath}/${name}-${version}-${arch} 274 } 275 276 # recursively remove directories 277 ui_debug "reinplace for make to recursively remove directories on clean" 278 reinplace "s|rm -f|rm -rf|g" ${atlas_path}/build/Makefile 279 } 291 if { [variant_isset universal] } { 292 set archs ${universal_archs_to_use} 293 } else { 294 set archs ${build_arch} 295 } 296 297 foreach arch ${archs} { 298 if { ! [variant_isset universal] } { 299 set atlas_path ${workpath}/${name}-${version} 300 } else { 301 set atlas_path ${workpath}/${name}-${version}-${arch} 302 } 303 304 # recursively remove directories 305 ui_debug "patch to recursively remove directories on clean" 306 reinplace "s|rm -f|rm -rf|g" ${atlas_path}/build/Makefile 307 308 #Second patch for i386 309 if { ${arch} == "i386" } { 310 system "cd ${atlas_path}/build/src/threads && \ 311 patch < ${filespath}/patch-threads-i386.diff" 312 system "cd ${atlas_path}/build/src/pthreads/misc && \ 313 patch < ${filespath}/patch-Makefile_pthreads_misc.diff" 314 } 315 } 280 316 } 281 317 282 318 proc make_dylib { lib lib_dir arch libs } { 283 global destroot prefix gccnumber284 system "cd ${lib_dir} && \285 ( test ! -e ${lib}.a || \286 /usr/bin/ld -arch ${arch} -dynamic -dylib -single_module -dead_strip \287 -x -all_load -L. -L${prefix}/lib/gcc${gccnumber}/${arch} \ -L${prefix}/lib/gcc${gccnumber} -ldylib1.o \288 -dylib_install_name ${prefix}/lib/${lib}.dylib \289 ${lib}.a -o ${lib}.dylib ${libs} )"319 global destroot prefix gccnumber 320 system "cd ${lib_dir} && \ 321 ( test ! -e ${lib}.a || \ 322 /usr/bin/ld -arch ${arch} -dynamic -dylib -single_module -dead_strip \ 323 -x -all_load -L. -L${prefix}/lib/gcc${gccnumber}/${arch} \ -L${prefix}/lib/gcc${gccnumber} -ldylib1.o \ 324 -dylib_install_name ${prefix}/lib/${lib}.dylib \ 325 ${lib}.a -o ${lib}.dylib ${libs} )" 290 326 } 291 327 … … 295 331 set ncpu [exec sysctl -n hw.ncpu] 296 332 297 if { [variant_isset universal] } {298 setarchs ${universal_archs_to_use}299 } else {300 setarchs ${build_arch}301 }302 303 foreach arch ${archs} {304 if { ! [variant_isset universal] } {305 setatlas_path ${workpath}/${name}-${version}306 } else {307 setatlas_path ${workpath}/${name}-${version}-${arch}308 }309 set lib_dir ${atlas_path}/build/lib 310 311 make_dyliblibatlas ${lib_dir} ${arch} { -lSystem }312 313 if {${ncpu} == "1" } {314 # there are no threaded libraries (libpt*) on single-core machines315 make_dyliblibcblas ${lib_dir} ${arch} { -latlas -lSystem }316 make_dyliblibf77blas ${lib_dir} ${arch} { -lgfortran -latlas -lSystem }317 } else {318 make_dyliblibptcblas ${lib_dir} ${arch} { -latlas -lSystem }319 make_dyliblibptf77blas ${lib_dir} ${arch} { -lgfortran -latlas -lSystem }320 }321 322 make_dylibliblapack ${lib_dir} ${arch} { -lf77blas -lcblas -latlas -lgfortran -lgcc_s.1 -lSystem }323 }333 if { [variant_isset universal] } { 334 set archs ${universal_archs_to_use} 335 } else { 336 set archs ${build_arch} 337 } 338 339 foreach arch ${archs} { 340 if { ! [variant_isset universal] } { 341 set atlas_path ${workpath}/${name}-${version} 342 } else { 343 set atlas_path ${workpath}/${name}-${version}-${arch} 344 } 345 346 set lib_dir ${atlas_path}/build/lib 347 make_dylib libatlas ${lib_dir} ${arch} { -lSystem } 348 349 if { ${ncpu} == "1" } { 350 # there are no threaded libraries (libpt*) on single-core machines 351 make_dylib libcblas ${lib_dir} ${arch} { -latlas -lSystem } 352 make_dylib libf77blas ${lib_dir} ${arch} { -lgfortran -latlas -lSystem } 353 } else { 354 make_dylib libptcblas ${lib_dir} ${arch} { -latlas -lSystem } 355 make_dylib libptf77blas ${lib_dir} ${arch} { -lgfortran -latlas -lSystem } 356 } 357 358 make_dylib liblapack ${lib_dir} ${arch} { -lf77blas -lcblas -latlas -lgfortran -lgcc_s.1 -lSystem } 359 } 324 360 } 325 361 326 362 pre-destroot { 327 if { [variant_isset universal] } {328 setarchs ${universal_archs_to_use}329 } else {330 setarchs ${build_arch}331 }332 333 foreach arch ${archs} {334 if { ! [variant_isset universal] } {335 setatlas_path ${workpath}/${name}-${version}336 setdest_path ${destroot}${prefix}/lib/337 } else {338 setatlas_path ${workpath}/${name}-${version}-${arch}339 setdest_path ${destroot}-${arch}${prefix}/lib/340 }341 set lib_dir ${atlas_path}/build/lib 342 343 filemkdir ${dest_path}344 evalxinstall -m 755 [glob ${lib_dir}/*.dylib] ${dest_path}345 }363 if { [variant_isset universal] } { 364 set archs ${universal_archs_to_use} 365 } else { 366 set archs ${build_arch} 367 } 368 369 foreach arch ${archs} { 370 if { ! [variant_isset universal] } { 371 set atlas_path ${workpath}/${name}-${version} 372 set dest_path ${destroot}${prefix}/lib/ 373 } else { 374 set atlas_path ${workpath}/${name}-${version}-${arch} 375 set dest_path ${destroot}-${arch}${prefix}/lib/ 376 } 377 378 set lib_dir ${atlas_path}/build/lib 379 file mkdir ${dest_path} 380 eval xinstall -m 755 [glob ${lib_dir}/*.dylib] ${dest_path} 381 } 346 382 } 347 383 348 384 post-destroot { 349 if { ![file exists ${destroot}${prefix}/lib/libcblas.dylib] && [file exists ${destroot}${prefix}/lib/libptcblas.dylib]} {350 ln -s libptcblas.dylib ${destroot}${prefix}/lib/libcblas.dylib351 }352 if { ![file exists ${destroot}${prefix}/lib/libf77blas.dylib] && [file exists ${destroot}${prefix}/lib/libptf77blas.dylib]} {353 ln -s libptf77blas.dylib ${destroot}${prefix}/lib/libf77blas.dylib354 }355 } 356 357 livecheck.name math-atlas358 livecheck.distname Stable385 if { ![file exists ${destroot}${prefix}/lib/libcblas.dylib] && [file exists ${destroot}${prefix}/lib/libptcblas.dylib]} { 386 ln -s libptcblas.dylib ${destroot}${prefix}/lib/libcblas.dylib 387 } 388 if { ![file exists ${destroot}${prefix}/lib/libf77blas.dylib] && [file exists ${destroot}${prefix}/lib/libptf77blas.dylib]} { 389 ln -s libptf77blas.dylib ${destroot}${prefix}/lib/libf77blas.dylib 390 } 391 } 392 393 livecheck.name math-atlas 394 livecheck.distname Stable
Note: See TracChangeset
for help on using the changeset viewer.

