Changeset 99448


Ignore:
Timestamp:
Nov 5, 2012, 4:05:06 PM (12 years ago)
Author:
macsforever2000@…
Message:

levmar: Move atlas to variant to fix build problem on Lion. (#36889)

Location:
trunk/dports/math/levmar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/math/levmar/Portfile

    r99337 r99448  
    66name                levmar
    77version             2.6
    8 revision            2
     8revision            3
    99categories          math
    1010platforms           darwin
     
    3333                    sha256  3bf4ef1ea4475ded5315e8d8fc992a725f2e7940a74ca3b0f9029d9e6e94bad7
    3434
    35 depends_lib-append  port:atlas
    36 
    3735# Patch taken from levmar RPM by Eric Smith <eric@brouhaha.com>
    3836patch.pre_args      -p1
    3937patchfiles          patch-Makefile.so.diff
    4038
    41 use_configure       no
     39default_variants +atlas
    4240
    4341variant universal {}
     42
     43variant atlas description {Use MacPorts' ATLAS instead of Accelerate Framework} {
     44    depends_lib-append  port:atlas
     45}
     46
     47if {! [variant_isset atlas]} {
     48    conflicts port:atlas
     49}
     50
     51global makefile
     52set makefile ${worksrcpath}/Makefile.so
     53
     54use_configure       no
    4455
    4556set ver_major [lindex [split ${version} "."] 0]
     
    4960
    5061post-patch {
    51     set fl [open ${worksrcpath}/Makefile.so]
     62    set fl [open ${makefile}]
    5263    set lines [read $fl]
    5364    close $fl
     
    6980    }
    7081
     82    if {[variant_isset atlas]} {
     83        reinplace "s|^LAPACKLIBS=.*$|LAPACKLIBS= -L${prefix}/lib -lsatlas|g" ${makefile}
     84    }
     85
    7186    reinplace "s|\r||g" ${worksrcpath}/README.txt
    7287    file mkdir ${worksrcpath}/sobj
    7388}
    7489
    75 build.args-append   -f Makefile.so
     90build.args-append   -f ${makefile}
    7691build.args-append   CC="${configure.cc} [get_canonical_archflags cc]"
    7792build.args-append   LDFLAGS+=-Wl,-rpath,${prefix}/lib
  • trunk/dports/math/levmar/files/patch-Makefile.so.diff

    r99337 r99448  
    2020+# -lf2c removed from LAPACKLIBS for Fedora
    2121+# comment the following line if you are not using LAPACK.
    22 +LAPACKLIBS=-lsatlas
     22+LAPACKLIBS=-llapack -lblas
    2323                                  # On systems with a FORTRAN (not f2c'ed) version of LAPACK, -lf2c is
    2424                                  # not necessary; on others, -lf2c is equivalent to -lF77 -lI77
Note: See TracChangeset for help on using the changeset viewer.