# $Id: Portfile 90908 2012-03-18 03:18:35Z mmoll@macports.org $

PortSystem 1.0
PortGroup python 1.0
PortGroup cmake 1.0

set realname        pyside
name                py-${realname}
version             1.1.0
revision            1
python.versions     25 26 27
python.default_version 27
categories          python devel
maintainers         openmaintainer mmoll
license             LGPL
description         LGPL-licensed Python bindings for Qt
long_description    The PySide project provides LGPL-licensed Python bindings \
                    for the Qt cross-platform application and UI framework. \
                    PySide Qt bindings allow both free open source and \
                    proprietary software development and ultimately aim to \
                    support all of the platforms as Qt itself.
homepage            http://www.pyside.org/
platforms           darwin
license             LGPL
master_sites        http://www.pyside.org/files/

checksums           md5     233f0c6d2b3daf58cf88877d7f74557b \
                    rmd160  f274d82c855ea4e7ba2b011155374969a69eafcb \
                    sha1    e0f0440cf2a3d20b305397faf8bfed74bdcab873
distname            ${realname}-qt4.7+${version}
use_bzip2           yes

if {$subport != $name} {
    depends_lib-append  port:qt4-mac port:generatorrunner \
                        port:py${python.version}-shiboken \
                        port:python${python.version}
    use_configure   yes
    configure.args-append -DBUILD_TESTS:BOOL=FALSE \
                          -DPYTHON_EXECUTABLE=${python.bin} \
                          -DPYTHON_LIBRARY=${python.lib} \
                          -DPYTHON_INCLUDE_DIR=${python.include} \
                          -DSITE_PACKAGE=${python.pkgd}
    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}-qt4.7\\+(\[0-9.\]+)\\.tar\\.bz2
} else {
    livecheck.type      none
}