source: trunk/dports/python/py-shiboken/Portfile

Last change on this file was 149413, checked in by mojca@…, 13 months ago

py-pyside, py-shiboken: revbump after relocation of Qt4

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1# $Id: Portfile 149413 2016-06-18 15:23:14Z ryandesign@macports.org $
2
3PortSystem 1.0
4PortGroup cmake 1.0
5PortGroup qt4 1.0
6PortGroup python 1.0
7cmake.out_of_source yes
8
9set realname        shiboken
10name                py-${realname}
11version             1.2.2
12revision            4
13python.versions     27 34 35
14python.default_version 27
15categories-append   devel
16maintainers         openmaintainer mmoll
17license             LGPL
18description         Plugin for generatorrunner that generates python bindings \
19                    for C++ libraries
20long_description    Shiboken is a plugin (front-end) for generatorrunner that \
21                    generates python bindings for C++ libraries using CPython \
22                    source code.
23homepage            http://qt-project.org/wiki/PySide
24platforms           darwin
25master_sites        http://download.qt-project.org/official_releases/pyside
26
27checksums           md5     9f5bee9d414ce51be07ff7a20054a48d \
28                    rmd160  19c8ea09d552bf371668cd8359d9602f5ac13634 \
29                    sha1    55731616791500750ef373f382057a43e133fa08
30distname            ${realname}-${version}
31use_bzip2           yes
32
33if {${name} ne ${subport}} {
34    pre-patch {
35        # MacOS cannot have a file and directory with the same name, as occurs here
36        system "mv -v '${worksrcpath}/generator/shiboken' '${worksrcpath}/generator/shiboken.d'"
37        reinplace "s|3.2 3.1 3.0|${python.branch}|g" ${worksrcpath}/cmake/Modules/FindPython3Libs.cmake
38        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
39    }
40
41    patchfiles          default_visibility.patch \
42                        filename_collision.patch \
43                        patch-cmakepkgconfig.diff
44
45    depends_lib-append  port:python${python.version} \
46                        port:libxslt \
47                        port:sparsehash
48    use_configure   yes
49    configure.args-append -DBUILD_TESTS:BOOL=FALSE \
50                    -DPYTHON_EXECUTABLE=${python.bin} \
51                    -DPYTHON_LIBRARIES=${python.lib} \
52                    -DPYTHON_INCLUDE_DIR=${python.include} \
53                    -DPYTHON_SITE_PACKAGES=${python.pkgd} \
54                    -DSPARSEHASH_INCLUDE_PATH=${prefix}/include \
55                    -DPYTHONBRANCH=${python.branch} \
56                    -DPYTHONPREFIX=${python.prefix}
57    if {${python.version} >= 30} {
58        configure.args-append -DUSE_PYTHON3:BOOL=TRUE -DPYTHON3_LIBRARY=${python.lib} -DPYTHON3_INCLUDE_DIR=${python.include}
59    }
60    build.cmd       make
61    build.target    all
62    destroot.cmd    make
63    destroot.destdir DESTDIR=${destroot}
64    post-destroot {
65        move ${destroot}${prefix}/bin/shiboken ${destroot}${prefix}/bin/shiboken-${python.branch}
66        move ${destroot}${prefix}/include/shiboken ${destroot}${prefix}/include/shiboken-${python.branch}
67        move ${destroot}${prefix}/share/man/man1/shiboken.1 ${destroot}${prefix}/share/man/man1/shiboken-${python.branch}.1
68        move ${destroot}${prefix}/lib/cmake ${destroot}${python.prefix}/lib/cmake
69        move ${destroot}${prefix}/lib/pkgconfig ${destroot}${python.prefix}/lib/pkgconfig
70    }
71}
72
73if {${name} eq ${subport}} {
74    livecheck.type      regex
75    livecheck.url       http://qt-project.org/wiki/PySideDownloads
76    livecheck.regex     ${realname}-(\[0-9.\]+)\\.tar\\.bz2
77} else {
78    livecheck.type      none
79}
Note: See TracBrowser for help on using the repository browser.