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

github.setup    simunova mtl4 09d8523d59baf5fdec29f3509a63babc2763af4a
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
name            mtl
version         2021.03.06
revision        0
categories      math devel
license         Restrictive/Distributable
platforms       any
maintainers     {@barracuda156 gmail.com:vital.had} openmaintainer
supported_archs noarch

description     The Matrix Template Library (MTL)
long_description \
                {*}${description} is a high-performance \
                generic component library that provides comprehensive linear \
                algebra functionality for a wide variety of matrix formats.

# The website is historic.
homepage        https://web.archive.org/web/20171217181912/http://www.osl.iu.edu/research/mtl \
                https://web.archive.org/web/20171216224505/http://www.simunova.com/en/node/24

checksums       rmd160  0722f9f01892eeb8e9aed4d51f91c6cbd0d4f970 \
                sha256  de33e43546a297f1f3c1262466c323e94e85ba87afcd1ae6cca670c4cba5fba6 \
                size    2546282

post-patch {
    reinplace "s|DESTINATION include PATTERN|DESTINATION include/mtl PATTERN|" \
                ${worksrcpath}/CMakeLists.txt
}

compiler.cxx_standard 2011
compiler.blacklist-append \
                {clang} {macports-clang-1[5-9]}

configure.args-append \
                -DENABLE_GCOV=OFF \
                -DENABLE_WARNINGS=ON \
                -DENABLE_TESTS=ON \
                -DENABLE_DEVELOPMENT=OFF

# One test fails on ppc: https://github.com/simunova/mtl4/issues/3
test.run        yes
