# $Id: Portfile 117225 2014-02-19 21:48:17Z mmoll@macports.org $

PortSystem              1.0
PortGroup xcodeversion  1.0
PortGroup bitbucket     1.0

bitbucket.setup odedevs ode 0.13
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     81de6df79c90401e94ecb614c25c9dfd \
                        sha1    27438c625556feee992fbd967fe163bac2f6bd27 \
                        rmd160  51a3f1cae136c2804ad7c053c5368c5867b3d4f5

depends_build-append    port:libtool port:autoconf port:automake
patch {
    reinplace "s|#    LIBTOOLIZE=glibtoolize|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

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
}
