# $Id: Portfile 90897 2012-03-17 18:18:21Z mmoll@macports.org $

PortSystem 1.0
PortGroup cmake 1.0
PortGroup python 1.0

set realname        shiboken
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         Plugin for generatorrunner that generates python bindings \
                    for C++ libraries
long_description    Shiboken is a plugin (front-end) for generatorrunner that \
                    generates python bindings for C++ libraries using CPython \
                    source code.
homepage            http://www.pyside.org/docs/shiboken/
platforms           darwin
master_sites        http://www.pyside.org/files/

checksums           md5     9c9d696c8c426fb5abf28a6bd3759558 \
                    rmd160  c99179381511e16cf1fd68fc8581e9c612d1d5b9 \
                    sha1    c16300f72ea717e17e54bccd90d9494058c3f9a1
distname            ${realname}-${version}
use_bzip2           yes

if {$subport != $name} {
    depends_lib-append  port:qt4-mac port:apiextractor port:generatorrunner 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}
    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
}
