# -*- 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            cddlib cddlib 0.94n

categories              devel math
license                 GPL-2+
homepage                https://people.inf.ethz.ch/fukudak/cdd_home
maintainers             {sethm.id.au:dev @McDaMastR} \
                        openmaintainer

description             An efficient implementation of the Double Description \
                        Method
long_description        cddlib is a C implementation of the Double Description \
                        Method of Motzkin et al. for generating all vertices \
                        (i.e. extreme points) and extreme rays of a general \
                        convex polyhedron in R^d given by a system of linear \
                        inequalities: \
                        \n \
                        P = \{ x = (x_1, ..., x_d)^T : b - Ax >= 0 } \
                        \n \
                        where A is a given m×d real matrix, b is a given \
                        m-vector, and 0 is the m-vector of all zeros.

depends_lib-append      port:gmp

checksums               rmd160  999668f74b8a1a23d7248084c21c064fa933ce38 \
                        sha256  b87ee07ba2c1d0ab92a3e4eccacdf568f981a095a392e3b9efd7e7e4a9e125b1 \
                        size    1381376

compiler.c_standard     2011
compiler.thread_local_storage \
                        yes

configure.args-append   --enable-shared \
                        --disable-static \
                        --bindir=${prefix}/libexec/${name}/bin

test.run                yes
test.target             check

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

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

notes "
The ${name} binary files are now installed into ${prefix}/libexec/${name}/bin
"
