Ticket #30450: Portfile_unified

File Portfile_unified, 2.4 KB (added by michelle.lynn.gill@…, 13 years ago)
Line 
1# $Id: Portfile 73275 2010-11-08 21:04:38Z mww@macports.org $
2
3PortSystem 1.0
4PortGroup  python 1.0
5
6name            py-wxpython-devel
7version         2.9.2.1
8
9categories      python graphics
10platforms       darwin
11maintainers openmaintainer     
12description     Python interface to the wxWindows cross platform GUI
13long_description        wxPython is a GUI toolkit for the Python programming \
14    language. It allows Python programmers to create \
15    programs with a robust, highly functional graphical \
16    user interface, simply and easily. It is implemented \
17    as a Python extension module (native code) that wraps \
18    the popular wxWindows cross platform GUI library, \
19    which is written in C++.
20
21homepage        http://www.wxpython.org/
22master_sites    sourceforge:wxpython
23distname        wxPython-src-${version}
24use_bzip2       yes
25checksums           md5     1cb1e0757cda9afe2da35d5ee0003262 \
26                    sha1    00bba6ba2bd983c0b905e06415ae61e626099299 \
27                    rmd160  62e0dcd39aa83aa89fb33bb5eed8f39d03be1935
28
29python.versions    24 25 26 27
30python.default_version 27
31
32
33depends_lib     port:wxWidgets-devel
34
35worksrcdir      ${distname}/wxPython
36
37patchfiles          patch-setup.py.diff \
38                    patch-config.py.diff
39
40set wxport cocoa
41
42variant cocoa conflicts carbon gtk description {use osx_cocoa} {
43    set wxport "osx_cocoa"
44}
45
46variant carbon conflicts cocoa gtk description {use osx_carbon} {
47    set wxport "osx_carbon"
48}
49
50variant gtk conflicts carbon cocoa dscription {use gtk} {
51    set wxport "gtk2"
52}
53
54if {![variant_isset carbon] && ![variant_isset cocoa] && ![variant_isset gtk]} {
55    default_variants +cocoa
56}
57
58pre-configure {
59    reinplace  "s|^WX_CONFIG = None|WX_CONFIG = \"${prefix}/bin/wx-config\"|g" \
60                ${worksrcpath}/config.py
61    reinplace  "s|^WXPORT = \'gtk2\'|WXPORT = \'${wxport}\'|g" \
62                ${worksrcpath}/config.py
63}
64
65extract.post_args       "| tar -xf - ${worksrcdir} ${distname}/docs"
66
67build.env       UNICODE="1" WXPORT="mac" PATH="${prefix}/lib/wx/config:$env(PATH)"
68
69destroot.env    UNICODE="1" WXPORT="mac" PATH="${prefix}/lib/wx/config:$env(PATH)"
70
71post-destroot {
72    xinstall -d -m 755 ${destroot}${prefix}/share/doc/
73    file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/${subport}
74    file copy ${worksrcpath}/samples \
75        ${destroot}${prefix}/share/doc/${subport}/examples
76}
77
78livecheck.type  regex
79livecheck.url   ${homepage}
80livecheck.regex wxPython (2\\.\[0-9\]+\\.\[0-9\]+\\.\[0-9\]+)