# -*- 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 64577 2010-03-09 17:20:34Z raphael@macports.org $

PortSystem          1.0
PortGroup           cmake 1.0

name                chipmunk
version             5.2.0
revision            1
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/Chipmunk-5.x
distname            Chipmunk-${version}
extract.suffix      .tgz
checksums           md5     99bfea59b41e543abb251b304af99c0d \
                    sha1    b5fdfaf185cb50cb866213c6e4c44dcdf6fbe2b0 \
                    rmd160  b95ebf02ba78fd2486ac235e71e17de949b4f81d

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
}

livecheck.type      regex
livecheck.url       ${master_sites}
livecheck.regex     "Chipmunk-(\\d+(?:\\.\\d+)*)"
