PortSystem 1.0
PortGroup  cmake 1.1
PortGroup  github 1.0

github.setup        danfis libccd 2.1 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
epoch               20190111
revision            1
categories          science
maintainers         nomaintainer
description         A library for collision detection between convex shapes
long_description    {*}$description
license             BSD
configure.args-append -DCCD_DOUBLE:BOOL=ON

checksums           rmd160  6e36c4276ac47b3e79dadc0b0e2ecf42f36e5b20 \
                    sha256  aa00bcff8781528144557c0c92fc4f70f6505903d6ef07fd56998f352402aeff \
                    size    73979

post-patch {
    reinplace "s|if(NOT WIN32)|if(NOT WIN32 AND NOT APPLE)|" ${worksrcpath}/src/CMakeLists.txt
}

variant single_precision {
    configure.args-delete -DCCD_DOUBLE:BOOL=ON
    configure.args-append -DCCD_SINGLE:BOOL=ON
}
