# -*- 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 106911 2013-06-11 14:40:14Z jmr@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-pymunk
version             3.0.0
revision            0
categories-append   devel
license             MIT
platforms           darwin
supported_archs     i386 x86_64

maintainers         stromnov openmaintainer

description         Python wrapper around the 2d physics library Chipmunk

long_description    ${description}

homepage            http://code.google.com/p/pymunk/
master_sites        googlecode:pymunk

distname            pymunk-${version}
use_zip             yes

checksums           rmd160  60a5f19a42f358042533a1346d3ea88d61b6624f \
                    sha256  effa4d2a9564914180c41c748e5ca91f84723c53696d310d763711c414a4a933

python.default_version  27
python.versions     26 27 32

patchfiles          patch-setup.py.diff \
                    patch-pymunkoptions-__init__.py.diff

variant debug description {Build with debug messages} {
    patchfiles-delete   patch-pymunkoptions-__init__.py.diff
}

if {$subport != $name} {
    depends_build   port:py${python.version}-setuptools

    post-build {
        if {![variant_isset debug]} {
            system -W ${worksrcpath} "${python.bin} setup.py build_chipmunk --release"
        } else {
            system -W ${worksrcpath} "${python.bin} setup.py build_chipmunk"
        }
    }
}
