# -*- 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 2.0.0 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from     tarball
name                    diy2
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  39ddd00e2b3c3cac9658c0e408fbe8b21b79ab5c \
                        sha256  ff0fa7603309aab8ada024ab04ebe2a7f7158978cf4e871d609c1eb73463de61 \
                        size    200746

mpi.setup               require

# project is header only
supported_archs         noarch

# see https://trac.macports.org/ticket/60589
configure.cxxflags-append \
                        -std=c++98

# add code to install
patchfiles-append       patch-install.diff

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