# $Id$ PortSystem 1.0 PortGroup cmake 1.0 PortGroup python 1.0 set realname shiboken name py-${realname} version 1.2.1 revision 1 python.versions 26 27 32 33 python.default_version 27 categories-append 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://qt-project.org/wiki/PySide platforms darwin master_sites http://download.qt-project.org/official_releases/pyside checksums md5 06100e2c91ab4433dbf15c26f5bb6c17 \ rmd160 1ad3ac82b6e41004e0bbe25c315482d7fd07a395 \ sha1 f310ac163f3407109051ccebfd192bc9620e9124 distname ${realname}-${version} use_bzip2 yes if {${name} ne ${subport}} { pre-patch { # MacOS cannot have a file and directory with the same name, as occurs here system "mv -v '${worksrcpath}/generator/shiboken' '${worksrcpath}/generator/shiboken.d'" reinplace "s|3.2 3.1 3.0|${python.branch}|g" ${worksrcpath}/cmake/Modules/FindPython3Libs.cmake reinplace "s|NAMES python3.2mu python3.2m python3.2u python3.2 python3.1 python3.0 python3|NAMES python${python.branch}|g" ${worksrcpath}/cmake/Modules/FindPython3Interp.cmake } patchfiles default_visibility.patch \ filename_collision.patch depends_lib-append port:qt4-mac \ port:python${python.version} \ port:libxslt \ port:sparsehash use_configure yes configure.args-append -DBUILD_TESTS:BOOL=FALSE \ -DPYTHON_EXECUTABLE=${python.bin} \ -DPYTHON_LIBRARIES=${python.lib} \ -DPYTHON_INCLUDE_DIR=${python.include} \ -DPYTHON_SITE_PACKAGES=${python.pkgd} \ -DSPARSEHASH_INCLUDE_PATH=${prefix}/include if {${python.version} >= 30} { configure.args-append -DUSE_PYTHON3:BOOL=TRUE -DPYTHON3_LIBRARY=${python.lib} -DPYTHON3_INCLUDE_DIR=${python.include} } build.cmd make build.target all destroot.cmd make destroot.destdir DESTDIR=${destroot} post-destroot { move ${destroot}${prefix}/bin/shiboken ${destroot}${prefix}/bin/shiboken-${python.branch} move ${destroot}${prefix}/include/shiboken ${destroot}${prefix}/include/shiboken-${python.branch} move ${destroot}${prefix}/share/man/man1/shiboken.1 ${destroot}${prefix}/share/man/man1/shiboken-${python.branch}.1 if {${python.version} < 30} { file delete ${destroot}${prefix}/lib/cmake/Shiboken-${version}/ShibokenConfig-python${python.branch}.cmake } else { file delete ${destroot}${prefix}/lib/cmake/Shiboken-${version}/ShibokenConfig.cpython-${python.version}m.cmake } file delete ${destroot}${prefix}/lib/cmake/Shiboken-${version}/ShibokenConfig.cmake file delete ${destroot}${prefix}/lib/cmake/Shiboken-${version}/ShibokenConfigVersion.cmake file delete ${destroot}${prefix}/lib/pkgconfig/shiboken.pc } } if {${name} eq ${subport}} { livecheck.type regex livecheck.url http://qt-project.org/wiki/PySideDownloads livecheck.regex ${realname}-(\[0-9.\]+)\\.tar\\.bz2 } else { livecheck.type none }