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

github.setup            4ti2 4ti2 1_6_16 Release_
version                 [string map {_ .} ${version}]
revision                0
categories              math
license                 GPL-2+
homepage                https://4ti2.github.io
maintainers             {sethm.id.au:dev @McDaMastR} \
                        openmaintainer

description             A software package for algebraic, geometric \
                        and combinatorial problems on linear spaces
long_description        {*}${description}.

distname                ${name}-${version}

checksums               rmd160  8c7a2a9e0b6f8418e35bfd9dd908d50a62d4487a \
                        sha256  a45629835ac138bb17896c509278b956c11917ec58e57165a2ee0c54ed0307cb \
                        size    5926781

depends_lib-append      port:glpk \
                        port:gmp

compiler.cxx_standard   2011
# fatal error: 'cstdint' file not found
compiler.blacklist-append \
                        {clang < 600} \
                        {*gcc-4.*} \
                        {macports-clang-3.*}

configure.args-append   --enable-shared \
                        --disable-static

configure.checks.implicit_int \
                        no
# <https://trac.macports.org/wiki/WimplicitFunctionDeclaration>
configure.checks.implicit_function_declaration.whitelist-append \
                        strchr

post-destroot {
    set destdocdir  ${destroot}${prefix}/share/doc/${name}

    xinstall -d ${destdocdir}
    xinstall -W ${worksrcpath} -m 644 \
        AUTHORS \
        COPYING \
        NEWS \
        README.md \
        THANKS \
        ${destdocdir}
}

test.run                yes
test.target             check
