# -*- 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
PortGroup               mpi    1.0

github.setup            diatomic diy 3.5.0
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from     tarball
revision                0
categories              devel
license                 BSD
maintainers             {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
platforms               any
description             data-parallel out-of-core library
long_description        DIY is a block-parallel library for implementing scalable algorithms that can execute both in-core and out-of-core.

checksums               rmd160  940a8052e158e2a5a437c5c2e2c0c56a8b36b9b6 \
                        sha256  a7fdff1bb7986f730da337d3c091df9fdc9d4f01a16b4c75cfded685afb5f301 \
                        size    283299

mpi.setup               require

compiler.cxx_standard   2011

# project is header only
supported_archs         noarch

# install CMake config files
patchfiles-append       patch-cmake.diff

configure.args-append   -Dbuild_examples=OFF \
                        -Dbuild_tests=OFF

post-destroot {
    # allow project to be found by VTK and ParaView
    set cmake [open "${destroot}${prefix}/lib/cmake/diy/diyConfig.cmake" a 0644]
    puts ${cmake} ""
    puts ${cmake} "set(DIY_INCLUDE_DIRS \"${prefix}/include\")"
    close ${cmake}
}
