# -*- 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
PortGroup               boost 1.0
PortGroup               perl5 1.0
PortGroup               conflicts_build 1.0

github.setup            polymake polymake 4.11 V
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from     tarball
revision                2
categories              math
license                 GPL-2+

maintainers             nomaintainer

description             polymake is open source software for research in polyhedral geometry.
long_description        {*}${description}

homepage                https://polymake.org/

checksums               rmd160  c60c7e4dc4eae5f557fc0773602b40aab7526dbf \
                        sha256  b45172dba59174c6bf0549e38b93d718702f1367978845c997b1014c32691610 \
                        size    47527627

# See: https://trac.macports.org/ticket/67813
conflicts_build         ${name}

compiler.cxx_standard   2014

depends_build-append    port:ninja

depends_lib-append      port:bliss \
                        port:flint \
                        port:gmp \
                        port:libxml2 \
                        port:libxslt \
                        port:lrslib \
                        port:mongo-c-driver \
                        port:mpfr \
                        port:normaliz \
                        port:p${perl5.major}-json \
                        port:p${perl5.major}-svg \
                        port:p${perl5.major}-term-readkey \
                        port:p${perl5.major}-term-readline-gnu \
                        port:p${perl5.major}-xml-sax \
                        port:p${perl5.major}-xml-writer \
                        port:permlib \
                        port:ppl \
                        port:readline \
                        port:scip \
                        port:singular \
                        port:soplex \
                        port:sympol

configure.perl          ${perl5.bin}
configure.args-append   --with-boost=[boost::install_area] \
                        --with-gmp=${prefix} \
                        --with-mpfr=${prefix} \
                        --with-cdd=${prefix} \
                        --with-lrs=${prefix} \
                        --with-permlib=${prefix} \
                        --with-libnormaliz=${prefix} \
                        --with-sympol=${prefix} \
                        --with-mongoc=${prefix} \
                        --without-java \
                        --without-nauty \
                        PERL=${configure.perl}

build.cmd               ninja
build.dir               ${worksrcpath}/build/Opt

destroot.dir            ${build.dir}
destroot.target         install
destroot.destdir
destroot.env-append     DESTDIR=${destroot}
