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

name                drachennest
github.setup        abolz Drachennest e6714a39ad331b4489d0b6aaf3968635bff4eb5e
version             2021.05.15
revision            0
categories          devel
license             Boost-1
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
description         Converting binary floating-point to decimal floating-point numbers
long_description    {*}${description}
checksums           rmd160  62df4635092a652cade61dfc454d0ffcd2e36836 \
                    sha256  82e867d1369b1d09725cc1e0ad8f1ea96ed737aaffeac6ea88bb3928a2d5fc3c \
                    size    696794
github.tarball_from archive

# https://github.com/abolz/Drachennest/issues/17
patchfiles          patch-fix-catch.diff

# https://github.com/abolz/Drachennest/issues/18
patchfiles-append   patch-disable-broken-bench.diff

compiler.cxx_standard   2017

destroot {
    copy ${cmake.build_dir}/src/libdrachennest.a ${destroot}${prefix}

    xinstall -d ${destroot}${prefix}/include/${name}
    fs-traverse f ${worksrcpath}/src {
        if {[file isfile ${f}] && [file extension ${f}] == ".h"} {
            copy ${f} ${destroot}${prefix}/include/${name}/
        }
    }
}

# On powerpc: All tests passed (62358 assertions in 26 test cases)
test.run            yes
test.dir            ${cmake.build_dir}
test.cmd            test/test_all
test.target
