# -*- 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
# $Id: Portfile 46738 2009-02-11 19:00:53Z snc@macports.org $

PortSystem          1.0
PortGroup           cmake 1.0

name                chipmunk
version             4.1.0
categories          devel
maintainers         fs.ei.tum.de:jonas openmaintainer
description         Fast and lightweight 2D rigid body physics library in C
long_description    ${description}
platforms           darwin
homepage            http://wiki.slembcke.net/main/published/Chipmunk
master_sites        http://files.slembcke.net/chipmunk/release/
distname            Chipmunk-${version}
extract.suffix      .tgz
checksums           md5     804d0e478f2a27a1d272fa07e41480ba \
                    sha1    c5da0977e6bba110d13ea98dc89743726daab90d \
                    rmd160  0e1714bc744cdb478f53d7f65924dff3c4c58440

patchfiles          patch-Demo-CMakeLists.diff \
                    patch-ruby-CMakeLists.diff \
                    patch-CMakeLists.diff

use_parallel_build  yes

configure.args-append   ../${distname}

variant demos description "compile and install a demo application" {
    configure.args-append       -DBUILD_DEMOS=ON
}

variant ruby description "compile and install the ruby extension" {
    configure.args-append       -DBUILD_RUBY_EXT=ON
    depends_lib-append          port:ruby
}
