PortSystem 1.0
PortGroup python 1.0
PortGroup qt4 1.0
PortGroup cmake 1.0
PortGroup github 1.0
cmake.out_of_source yes

github.setup        pyside PySide 1.2.4
name                py-pyside
revision            0
set          qt.ver 4.8
python.versions     27 34 35 36 37
python.default_version 27
categories-append   devel
maintainers         openmaintainer {mmoll @mamoll}
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.
platforms           darwin
license             LGPL

checksums           md5     bb9da39fcc7000e0c254bca160b36e51 \
                    rmd160  7a13c41e91011849ad22f57dc50d2826a500a6b5 \
                    sha1    3d3d6d09ede989c7f70b3cd488599456df75370a \
                    sha256  412133c4f37697296e4631aa5a9435336727df3ec0835b0b5eef536e0ace0a86

if {${name} ne ${subport}} {
    patchfiles      patch-cmakepkgconfig.diff
    depends_lib-append port:py${python.version}-shiboken
    use_configure   yes
    configure.env-append CMAKE_PREFIX_PATH=${python.prefix}
    configure.args-append -DBUILD_TESTS:BOOL=FALSE \
                          -DSITE_PACKAGE=${python.pkgd} \
                          -DPYTHONBRANCH=${python.branch} \
                          -DPYTHONPREFIX=${python.prefix}
    build.cmd       make
    build.target    all
    destroot.cmd    make
    destroot.destdir DESTDIR=${destroot}
    post-destroot {
        move ${destroot}${prefix}/include/PySide ${destroot}${prefix}/include/PySide-${python.branch}
        move ${destroot}${prefix}/share/PySide ${destroot}${prefix}/share/PySide-${python.branch}
        move ${destroot}${prefix}/lib/cmake ${destroot}${python.prefix}/lib/cmake
        move ${destroot}${prefix}/lib/pkgconfig ${destroot}${python.prefix}/lib/pkgconfig
    }

    livecheck.type      none
}