Ticket #49511: Portfile-scalapack.diff

File Portfile-scalapack.diff, 2.2 KB (added by dstrubbe (David Strubbe), 9 years ago)
  • Portfile

     
    2929
    3030configure.args      -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib \
    3131                    -DBUILD_SHARED_LIBS=ON \
    32                     -DBUILD_TESTING=OFF
     32                    -DBUILD_TESTING=ON
     33# BUILD_TESTING only affects BLACS directory anyway
    3334
     35test.run            yes
     36
     37pre-test {
     38    # test infrastructure uses /bin/ps (I think for checking on job timeout), which is forbidden by sandboxing
     39    append portsandbox_profile " (allow process-exec (literal \"/bin/ps\") (with no-profile))"
     40}
     41
     42if {![variant_isset atlas] && ![variant_isset openblas]} {
     43    default_variants-append +accelerate
     44}
     45
     46variant accelerate conflicts atlas openblas description {Use built-in Accelerate for BLAS and LAPACK} {
     47    depends_lib-append    port:vecLibFort
     48    configure.args-append -DLAPACK_LIBRARIES=${prefix}/lib/libvecLibFort.dylib
     49}
     50
     51variant openblas conflicts accelerate atlas description {Use OpenBLAS for BLAS and LAPACK} {
     52    # allow OpenBLAS-devel too
     53    depends_lib-append    path:lib/libopenblas.dylib:OpenBLAS
     54    require_active_variants path:lib/libopenblas.dylib:OpenBLAS lapack
     55    configure.args-append -DLAPACK_LIBRARIES=${prefix}/lib/libopenblas.dylib
     56}
     57
     58variant atlas conflicts accelerate openblas description {Use ATLAS for BLAS and LAPACK} {
     59    depends_lib-append    port:atlas
     60    configure.args-append -DLAPACK_LIBRARIES=${prefix}/lib/libsatlas.dylib
     61}
     62
    3463pre-configure {
    3564    configure.args-append \
    3665                    -DMPI_C_COMPILER=${mpi.cc} \
    37                     -DMPI_Fortran_COMPILER=${mpi.fc}
     66                    -DMPI_Fortran_COMPILER=${mpi.fc} \
     67                    -DMPIEXEC=${prefix}/bin/${mpi.exec}
    3868}
    3969
     70post-destroot {
     71    delete ${prefix}/lib/cmake/scalapack-${version}/scalapack-config-version.cmake
     72    delete ${prefix}/lib/cmake/scalapack-${version}/scalapack-config.cmake
     73    delete ${prefix}/lib/cmake/scalapack-${version}/scalapack-targets-noconfig.cmake
     74    delete ${prefix}/lib/cmake/scalapack-${version}/scalapack-targets.cmake
     75}
     76
    4077livecheck.type      regex
    4178livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}