# -*- 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           github 1.0
PortGroup           cmake 1.1

github.setup        CNugteren CLBlast 1.6.2
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball

name                clblast
categories          math
license             Apache-2

maintainers         {stromnov @stromnov} openmaintainer

description         Tuned OpenCL BLAS
long_description    {*}${description}

checksums           rmd160  0ad096c5b8628cd0577215e15dc6e06086896c7f \
                    sha256  783583b0b86e02ce9f50422f9e643e69c73b3d94bfcdff4e1e216b75d6a6ef7b \
                    size    462852

configure.args-append \
                    -DBUILD_SHARED_LIBS=ON \
                    -DSAMPLES=OFF \
                    -DTUNERS=ON \
                    -DCLIENTS=OFF \
                    -DTESTS=OFF \
                    -DCUBLAS=OFF \
                    -DNETLIB=ON \
                    -DOPENCL=ON \
                    -DVERBOSE=OFF

if {${os.major} < 11} {
    # See: https://github.com/CNugteren/CLBlast/issues/446
    known_fail      yes
    pre-fetch {
        ui_error "${name} requires OpenCL 1.1."
        return -code error "incompatible OS X version"
    }
}
