[100663] trunk/dports/math/SuiteSparse/Portfile
vince at macports.org
vince at macports.org
Wed Dec 19 11:59:52 PST 2012
Revision: 100663
https://trac.macports.org/changeset/100663
Author: vince at macports.org
Date: 2012-12-19 11:59:52 -0800 (Wed, 19 Dec 2012)
Log Message:
-----------
Make SuiteSparse link against serial Atlas libraries (libsatlas) when threaded libraries (libtatlas) are missing (ppc case).
Modified Paths:
--------------
trunk/dports/math/SuiteSparse/Portfile
Modified: trunk/dports/math/SuiteSparse/Portfile
===================================================================
--- trunk/dports/math/SuiteSparse/Portfile 2012-12-19 19:56:39 UTC (rev 100662)
+++ trunk/dports/math/SuiteSparse/Portfile 2012-12-19 19:59:52 UTC (rev 100663)
@@ -89,9 +89,15 @@
reinplace -E "s|^\[^#\].*(CF = .*)$|\\1 \$(TARGET_ARCH)|g" ${makefile}
if {[variant_isset atlas]} {
- # linking to the threaded dylib, is there a reason to use non-threaded?
- reinplace "s|BLAS = .*$|BLAS = ${prefix}/lib/libtatlas.dylib|g" ${makefile}
- reinplace "s|LAPACK = .*$|LAPACK = ${prefix}/lib/libtatlas.dylib|g" ${makefile}
+ # Threaded lib gets priority over non-threaded (ppc)
+ if {[file exists ${prefix}/lib/libtatlas.dylib]} {
+ # linking to the threaded dylib, is there a reason to use non-threaded?
+ reinplace "s|BLAS = .*$|BLAS = ${prefix}/lib/libtatlas.dylib|g" ${makefile}
+ reinplace "s|LAPACK = .*$|LAPACK = ${prefix}/lib/libtatlas.dylib|g" ${makefile}
+ } else {
+ reinplace "s|BLAS = .*$|BLAS = ${prefix}/lib/libsatlas.dylib|g" ${makefile}
+ reinplace "s|LAPACK = .*$|LAPACK = ${prefix}/lib/libsatlas.dylib|g" ${makefile}
+ }
}
if {[variant_isset metis]} {
@@ -127,7 +133,11 @@
}
if {[variant_isset atlas]} {
- set atlas "-ltatlas"
+ if {[file exists ${prefix}/lib/libtatlas.dylib]} {
+ set atlas "-ltatlas"
+ } else {
+ set atlas "-lsatlas"
+ }
} else {
set atlas "-framework Accelerate"
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121219/e050c7f2/attachment.html>
More information about the macports-changes
mailing list