# $Id: Portfile 107943 2013-07-09 19:39:31Z mmoll@macports.org $

PortSystem 1.0
PortGroup python 1.0
PortGroup cmake 1.0

set realname        pyside
name                py-${realname}
version             1.2.0
set          qt.ver 4.8
revision            1
python.versions     25 26 27 31 32 33
python.default_version 27
categories-append   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://qt-project.org/wiki/PySide
platforms           darwin
license             LGPL
master_sites        http://download.qt-project.org/official_releases/pyside

checksums           md5     52b8c19485447a3100884f3c79dc5c98 \
                    rmd160  64af2d7ed25e54774b5b91ff1b3d6937ef36ca20 \
                    sha1    b7bbb068f775cea6c42a86dc2796ed7dd4f36555
distname            ${realname}-qt${qt.ver}+${version}
use_bzip2           yes

if {$subport != $name} {
    depends_lib-append  port:qt4-mac port:py${python.version}-shiboken
    use_configure   yes
    configure.args-append -DBUILD_TESTS:BOOL=FALSE \
                          -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       http://qt-project.org/wiki/PySideDownloads
    livecheck.regex     ${realname}-qt${qt.ver}\\+(\[0-9.\]+)\\.tar\\.bz2
} else {
    livecheck.type      none
}
