# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup cmake 1.1 PortGroup github 1.0 PortGroup linear_algebra 1.0 github.setup icl-utk-edu blaspp 2023.11.05 v revision 1 categories math science license BSD maintainers {@barracuda156 gmail.com:vital.had} openmaintainer description C++ API for the Basic Linear Algebra Subroutines long_description {*}${description} checksums rmd160 eebdcad4c306b4b25a8b56f83cdedec57af498e4 \ sha256 a25b155d7be158f2315a453625711c6b7ab6bac2531d7944a329189d5ccd9c50 \ size 226379 github.tarball_from archive platform darwin { if {${os.major} < 13} { depends_build-append port:git git.cmd ${prefix}/bin/git } } set py_ver 3.11 set py_ver_nodot [string map {. {}} ${py_ver}] configure.python ${prefix}/bin/python${py_ver} post-patch { reinplace "s,/usr/bin/env python3,${configure.python}," ${worksrcpath}/configure.py reinplace "s,/usr/bin/env python3,${configure.python}," ${worksrcpath}/test/run_tests.py reinplace "s,python3,${configure.python}," ${worksrcpath}/test/CMakeLists.txt if {[variant_isset openblas]} { reinplace "s,,,g" ${worksrcpath}/config/cblas.cc reinplace "s,,," ${worksrcpath}/config/openblas_version.cc reinplace "s,,,g" ${worksrcpath}/test/cblas_wrappers.hh } } compiler.cxx_standard 2011 compiler.openmp_version 3.0 pre-configure { if {[variant_isset accelerate]} { veclibfort no configure.args-append \ -Dblas="Apple Accelerate" \ -Dlapack="auto" } elseif {[variant_isset openblas]} { configure.args-append \ -Dblas="OpenBLAS" \ -Dlapack="auto" \ -Dblaspp_cblas_include=${prefix}/include } } configure.args-append \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DBUILD_TESTING:BOOL=ON \ -Dgpu_backend=none \ -Duse_openmp:BOOL=ON \ --log-level=trace if {[string match *clang* ${configure.compiler}]} { configure.ldflags-append \ -L${prefix}/lib/libomp \ -lomp } depends_test-append port:python${py_ver_nodot} # https://github.com/icl-utk-edu/blaspp/issues/34 pre-test { system -W ${cmake.build_dir} "make tester" system -W ${cmake.build_dir}/test "install_name_tool -change @rpath/libtestsweeper.dylib ${cmake.build_dir}/_deps/testsweeper-build/libtestsweeper.dylib ./tester" } test.run yes test.cmd make test.target check