Changeset 143665 for trunk/dports/math


Ignore:
Timestamp:
Dec 17, 2015, 9:33:49 AM (4 years ago)
Author:
nicos@…
Message:

OpenBLAS: Fixing destroot with universal and lapack variants (ticket #49957)

File:
1 edited

Legend:

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

    r142927 r143665  
    179179destroot.args       "PREFIX=${prefix}"
    180180
    181 post-destroot {
    182     #Avoid conflict with Atlas
    183     move ${destroot}${prefix}/include/cblas.h \
    184         ${destroot}${prefix}/include/cblas_openblas.h
    185     #Correct library name
    186     system "install_name_tool -id \
    187         ${prefix}/lib/libopenblas-r1.dylib \
    188         ${destroot}${prefix}/lib/libopenblas-r1.dylib"
    189     delete file ${destroot}/${prefix}/lib/cmake
    190     if {[variant_isset lapack]} {
    191         #Install lapacke headers too
    192         xinstall -m 755 ${worksrcpath}/lapack-netlib/lapacke/include/lapacke_config.h \
    193             ${destroot}/${prefix}/include/lapacke_config.h
    194         xinstall -m 755 ${worksrcpath}/lapack-netlib/lapacke/include/lapacke_mangling.h \
    195             ${destroot}/${prefix}/include/lapacke_mangling.h
    196         xinstall -m 755 ${worksrcpath}/lapack-netlib/lapacke/include/lapacke_utils.h \
    197             ${destroot}/${prefix}/include/lapacke_utils.h
    198         xinstall -m 755 ${worksrcpath}/lapack-netlib/lapacke/include/lapacke.h \
    199             ${destroot}/${prefix}/include/lapacke.h
    200     }
    201 }
     181if {[variant_isset universal]} {
     182    merger-post-destroot {
     183        foreach arch ${universal_archs_to_use} {
     184            move ${destroot}-${arch}${prefix}/include/cblas.h \
     185                ${destroot}-${arch}${prefix}/include/cblas_openblas.h
     186            #Correct library name
     187            system "install_name_tool -id \
     188                ${prefix}/lib/libopenblas-r1.dylib \
     189                ${destroot}-${arch}${prefix}/lib/libopenblas-r1.dylib"
     190            delete file ${destroot}-${arch}/${prefix}/lib/cmake
     191            if {[variant_isset lapack]} {
     192                #Install lapacke headers too
     193                xinstall -m 755 ${worksrcpath}-${arch}/lapack-netlib/lapacke/include/lapacke_config.h \
     194                    ${destroot}-${arch}${prefix}/include/lapacke_config.h
     195                xinstall -m 755 ${worksrcpath}-${arch}/lapack-netlib/lapacke/include/lapacke_mangling.h \
     196                    ${destroot}-${arch}${prefix}/include/lapacke_mangling.h
     197                xinstall -m 755 ${worksrcpath}-${arch}/lapack-netlib/lapacke/include/lapacke_utils.h \
     198                    ${destroot}-${arch}${prefix}/include/lapacke_utils.h
     199                xinstall -m 755 ${worksrcpath}-${arch}/lapack-netlib/lapacke/include/lapacke.h \
     200                    ${destroot}-${arch}${prefix}/include/lapacke.h
     201            }
     202        }
     203    }
     204} else {
     205    post-destroot {
     206        #Avoid conflict with Atlas
     207        move ${destroot}${prefix}/include/cblas.h \
     208            ${destroot}${prefix}/include/cblas_openblas.h
     209        #Correct library name
     210        system "install_name_tool -id \
     211            ${prefix}/lib/libopenblas-r1.dylib \
     212            ${destroot}${prefix}/lib/libopenblas-r1.dylib"
     213        delete file ${destroot}/${prefix}/lib/cmake
     214        if {[variant_isset lapack]} {
     215            #Install lapacke headers too
     216            xinstall -m 755 ${worksrcpath}/lapack-netlib/lapacke/include/lapacke_config.h \
     217                ${destroot}${prefix}/include/lapacke_config.h
     218            xinstall -m 755 ${worksrcpath}/lapack-netlib/lapacke/include/lapacke_mangling.h \
     219                ${destroot}${prefix}/include/lapacke_mangling.h
     220            xinstall -m 755 ${worksrcpath}/lapack-netlib/lapacke/include/lapacke_utils.h \
     221                ${destroot}${prefix}/include/lapacke_utils.h
     222            xinstall -m 755 ${worksrcpath}/lapack-netlib/lapacke/include/lapacke.h \
     223                ${destroot}${prefix}/include/lapacke.h
     224        }
     225    }
     226}
Note: See TracChangeset for help on using the changeset viewer.