[99448] trunk/dports/math/levmar

macsforever2000 at macports.org macsforever2000 at macports.org
Mon Nov 5 08:05:06 PST 2012


Revision: 99448
          http://trac.macports.org//changeset/99448
Author:   macsforever2000 at macports.org
Date:     2012-11-05 08:05:06 -0800 (Mon, 05 Nov 2012)
Log Message:
-----------
levmar: Move atlas to variant to fix build problem on Lion. (#36889)

Modified Paths:
--------------
    trunk/dports/math/levmar/Portfile
    trunk/dports/math/levmar/files/patch-Makefile.so.diff

Modified: trunk/dports/math/levmar/Portfile
===================================================================
--- trunk/dports/math/levmar/Portfile	2012-11-05 15:41:16 UTC (rev 99447)
+++ trunk/dports/math/levmar/Portfile	2012-11-05 16:05:06 UTC (rev 99448)
@@ -5,7 +5,7 @@
 
 name                levmar
 version             2.6
-revision            2
+revision            3
 categories          math
 platforms           darwin
 license             GPL
@@ -32,23 +32,34 @@
 checksums           rmd160  2b29daea12804050c8d3939b8c142d27d36bffc8 \
                     sha256  3bf4ef1ea4475ded5315e8d8fc992a725f2e7940a74ca3b0f9029d9e6e94bad7
 
-depends_lib-append  port:atlas
-
 # Patch taken from levmar RPM by Eric Smith <eric at brouhaha.com>
 patch.pre_args      -p1
 patchfiles          patch-Makefile.so.diff
 
-use_configure       no
+default_variants +atlas
 
 variant universal {}
 
+variant atlas description {Use MacPorts' ATLAS instead of Accelerate Framework} {
+    depends_lib-append  port:atlas
+}
+
+if {! [variant_isset atlas]} {
+    conflicts port:atlas
+}
+
+global makefile
+set makefile ${worksrcpath}/Makefile.so
+
+use_configure       no
+
 set ver_major [lindex [split ${version} "."] 0]
 set ver_minor [lindex [split ${version} "."] 1]
 set abi_major 2
 set abi_minor 2
 
 post-patch {
-    set fl [open ${worksrcpath}/Makefile.so]
+    set fl [open ${makefile}]
     set lines [read $fl]
     close $fl
     foreach line [split $lines \n] {
@@ -68,11 +79,15 @@
         return -code error
     }
 
+    if {[variant_isset atlas]} {
+        reinplace "s|^LAPACKLIBS=.*$|LAPACKLIBS= -L${prefix}/lib -lsatlas|g" ${makefile}
+    }
+
     reinplace "s|\r||g" ${worksrcpath}/README.txt
     file mkdir ${worksrcpath}/sobj
 }
 
-build.args-append   -f Makefile.so
+build.args-append   -f ${makefile}
 build.args-append   CC="${configure.cc} [get_canonical_archflags cc]"
 build.args-append   LDFLAGS+=-Wl,-rpath,${prefix}/lib
 # Add this local rpath to allow port test to run successfully

Modified: trunk/dports/math/levmar/files/patch-Makefile.so.diff
===================================================================
--- trunk/dports/math/levmar/files/patch-Makefile.so.diff	2012-11-05 15:41:16 UTC (rev 99447)
+++ trunk/dports/math/levmar/files/patch-Makefile.so.diff	2012-11-05 16:05:06 UTC (rev 99448)
@@ -19,7 +19,7 @@
 +DEMOSRCS=lmdemo.c
 +# -lf2c removed from LAPACKLIBS for Fedora
 +# comment the following line if you are not using LAPACK.
-+LAPACKLIBS=-lsatlas
++LAPACKLIBS=-llapack -lblas
                                   # On systems with a FORTRAN (not f2c'ed) version of LAPACK, -lf2c is
                                   # not necessary; on others, -lf2c is equivalent to -lF77 -lI77
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121105/7c4650bd/attachment-0001.html>


More information about the macports-changes mailing list