# $Id$

PortSystem              1.0
PortGroup xcodeversion  1.0
PortGroup bitbucket     1.0

bitbucket.setup odedevs ode 0.14
categories              devel
platforms               darwin
license                 {LGPL-2.1+ BSD}
maintainers             nomaintainer
homepage                http://www.ode.org/

description             library for simulating articulated rigid body dynamics

long_description        ODE is a free, industrial quality library for \
                        simulating articulated rigid body dynamics - for \
                        example ground vehicles, legged creatures, and moving \
                        objects in VR environments. It is fast, flexible, \
                        robust and platform independent, with advanced joints, \
                        contact with friction, and built-in collision detection.

checksums               md5     fe9cffc2b2ddc121023181af360a2eb7 \
                        sha1    ee3854cc76e7ebf463bc2642ceab722b0001d04f \
                        rmd160  24816c5371f78036963756c7872aeee0b67e2e0f

depends_build-append    port:libtool port:autoconf port:automake port:libccd
patch {
    reinplace "s|libtoolize|glibtoolize|g" ${worksrcpath}/bootstrap
}
use_autoconf            yes
autoconf.cmd            ./bootstrap
configure.args          --with-trimesh=opcode \
                        --enable-double-precision \
                        --enable-release \
                        --enable-shared \
                        --disable-demos \
                        --enable-libccd

build.type              gnu

post-destroot {
    system "ranlib ${destroot}${prefix}/lib/libode.a"
}

minimum_xcodeversions {9 3.1}

variant debug description {Enable debugging checks} {
    configure.args-delete --enable-release
    configure.args-append --enable-debug
}