# $Id: Portfile 86898 2011-11-06 22:43:58Z mmoll@macports.org $

PortSystem 1.0
PortGroup python 1.0
PortGroup cmake 1.0

set realname        pyside-tools
name                py-${realname}
version             0.2.13
python.versions     25 26 27
python.default_version 27
categories          python devel
maintainers         openmaintainer mmoll
license             LGPL
description         Tools for developing PySide applications
long_description    ${description}
homepage            http://www.pyside.org/
platforms           darwin
license             LGPL
master_sites        http://www.pyside.org/files/

checksums           md5     14d3a36df06d680357d7bc1960f19a6d \
                    rmd160  e1ba20a7d45cf6a69f82f7c5f9c9306842ea9e52 \
                    sha1    4d05444300331518c3b66536aec3048454db3380
distname            ${realname}-${version}
use_bzip2           yes

if {$subport != $name} {
    depends_lib-append  port:qt4-mac port:py${python.version}-pyside port:python${python.version}
    use_configure   yes
    configure.args-append -DBUILD_TESTS:BOOL=FALSE \
                    -DPYTHON_EXECUTABLE=${prefix}/bin/python${python.branch} \
                    -DSITE_PACKAGE=${prefix}/Library/Frameworks/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages
    build.cmd       make
    build.target    all
    destroot.cmd    make
    destroot.destdir DESTDIR=${destroot}
}

if {${name} == ${subport}} { 
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     ${realname}-(\[0-9.\]+)\\.tar\\.bz2
} else {
    livecheck.type      none
}