1 | # -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2 |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup python 1.0 |
---|
5 | PortGroup wxWidgets 1.0 |
---|
6 | |
---|
7 | name py-wxpython-4.0 |
---|
8 | version 4.0.7 |
---|
9 | distname wxPython-${version}.post2 |
---|
10 | set wx_version [join [lrange [split ${version} .] 0 2] .] |
---|
11 | set branch [join [lrange [split ${version} .] 0 1] .] |
---|
12 | categories-append graphics devel |
---|
13 | license wxwidgets-3.1 |
---|
14 | platforms darwin |
---|
15 | maintainers {mojca @mojca} openmaintainer |
---|
16 | |
---|
17 | description Python interface to the wxWidgets ${branch} cross platform GUI |
---|
18 | long_description wxPython is a GUI toolkit for the Python programming \ |
---|
19 | language. It allows Python programmers to create \ |
---|
20 | programs with a robust, highly functional graphical \ |
---|
21 | user interface, simply and easily. It is implemented \ |
---|
22 | as a Python extension module (native code) that wraps \ |
---|
23 | the wxWidgets cross platform GUI library, written in C++. |
---|
24 | |
---|
25 | homepage http://www.wxpython.org/ |
---|
26 | master_sites pypi:w/wxPython |
---|
27 | |
---|
28 | checksums rmd160 0acb106cb0095a743096875449a23454c8d4378c \ |
---|
29 | sha256 5a229e695b64f9864d30a5315e0c1e4ff5e02effede0a07f16e8d856737a0c4e \ |
---|
30 | size 68891167 |
---|
31 | |
---|
32 | python.versions 27 34 35 36 37 |
---|
33 | python.default_version 37 |
---|
34 | |
---|
35 | |
---|
36 | if {${name} ne ${subport}} { |
---|
37 | conflicts py${python.version}-wxpython-2.8 py${python.version}-wxpython-3.0 |
---|
38 | # As long as wxPython and wxWidgets are at the same version, |
---|
39 | # this port could also depend on wxWidgets-3.0. |
---|
40 | # A separate port is there just because wxPython usually lags behind. |
---|
41 | wxWidgets.use wxWidgets-3.2 |
---|
42 | depends_lib-append \ |
---|
43 | port:${wxWidgets.port} \ |
---|
44 | port:py${python.version}-pathlib2 \ |
---|
45 | port:py${python.version}-pip |
---|
46 | |
---|
47 | # patchfiles patch-config.py.diff |
---|
48 | |
---|
49 | # TODO: is it possible to use build arguments instead of redefining the whole command? |
---|
50 | set boptions "--enable-plugins --enable-utf8 --enable-std_string_conv_in_wxstring \ |
---|
51 | --enable-permissive" |
---|
52 | build.cmd ${python.bin} setup.py WX_CONFIG="${wxWidgets.wxconfig}" |
---|
53 | destroot.cmd ${python.bin} setup.py WX_CONFIG="${wxWidgets.wxconfig}" |
---|
54 | |
---|
55 | post-destroot { |
---|
56 | # When a new release of wxPython comes out, the contents of |
---|
57 | # ${destroot}${wxWidgets.prefix}/Versions/wxPython/${branch}/include/wx-${branch}/wx/wxPython |
---|
58 | # should be stored separately into wxPython-${version}-MacPorts-subset.tar.bz2 |
---|
59 | # to be extracted/installed by wxPython-3.0 rather than this port. |
---|
60 | # This allows parallel installation of several versions of py**-wxpython-3.0. |
---|
61 | delete ${destroot}${wxWidgets.prefix} |
---|
62 | } |
---|
63 | |
---|
64 | livecheck.type none |
---|
65 | } else { |
---|
66 | # Once upon a time this would install the documentation, |
---|
67 | # however the python PortGroup disables all steps including fetching & extracting |
---|
68 | # which makes it a bit inconvenient to do things like this. |
---|
69 | # If anyone is missing the docs badly enough, you are welcome to fix this |
---|
70 | # in both py-wxpython-2.8 and py-wxpython-3.0. |
---|
71 | # |
---|
72 | # post-destroot { |
---|
73 | # xinstall -d -m 755 ${destroot}${prefix}/share/doc/ |
---|
74 | # file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/${name} |
---|
75 | # file copy ${worksrcpath}/samples ${destroot}${prefix}/share/doc/${name}/examples |
---|
76 | # } |
---|
77 | |
---|
78 | livecheck.url https://api.github.com/repos/wxWidgets/wxPython/tags |
---|
79 | livecheck.regex tarball/wxPy-(3\\.0\\.\[^"\]+) |
---|
80 | } |
---|