# -*- 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

github.setup        Viskores viskores 1.2.0 v
github.tarball_from archive
revision            0

categories          graphics science devel
license             BSD
maintainers         {reneeotten @reneeotten} openmaintainer

description         A visualization library for many-threaded devices
long_description    Viskores is a toolkit of scientific visualization algorithms \
                    for emerging processor architectures. Viskores supports the \
                    fine-grained concurrency for data analysis and visualization \
                    algorithms required to drive extreme scale computing by providing \
                    abstract models for data and execution that can be applied to a \
                    variety of algorithms across many different processor architectures.

homepage            https://viskores.org

checksums           rmd160  90df48925339a55c1ea221e621e2712495ff429a \
                    sha256  932480746ea516bc1091326e4de37a9d75f963aa52c5708d89d0d546d6df6c77 \
                    size    5241687

compiler.cxx_standard   2017
compiler.thread_local_storage yes

variant native description {Enable CPU-specific optimizations} {
    configure.args-append   -DViskores_Vectorization=native
}

variant openmp description {Enable OpenMP support} {
    configure.args-append   -DViskores_ENABLE_OPENMP=ON

    compiler.openmp_version 4.0

    if {[string match *clang* ${configure.compiler}]} {
        configure.cppflags-append -fopenmp-version=40
        configure.ldflags-append -L${prefix}/lib/libomp -lomp
    }
}

variant tbb description {Enable Intel Threading Building Blocks support} {
    configure.args-append   -DViskores_ENABLE_TBB=ON
    depends_lib-append      port:onetbb
}

variant hdf5 description {Enable HDF5 support} {
    configure.args-append   -DViskores_ENABLE_HDF5_IO=ON
    depends_lib-append      port:hdf5
}

github.livecheck.regex {([0-9\.]+)}
