# -*- 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_15 Release_
version                 [string map {_ .} ${version}]

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}.

depends_lib-append      port:glpk \
                        port:gmp

distname                ${name}-${version}

checksums               rmd160  4d9c2ea2178f333e2830f361262d8b9a0a6fccea \
                        sha256  070e639398fda1a4665b3291e5ea80f2ba280d9bffd50656ad8482d471b96965 \
                        size    5905108

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

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

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

test.run                yes
test.target             check

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

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