Ticket #30450: Portfile

File Portfile, 2.3 KB (added by ajb78@…, 13 years ago)
Line 
1# $Id: Portfile 73275 2010-11-08 21:04:38Z mww@macports.org $
2
3PortSystem 1.0
4PortGroup       python27 1.0
5
6name            py27-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
29depends_lib     port:wxWidgets-devel
30
31worksrcdir      ${distname}/wxPython
32
33patchfiles          patch-setup.py.diff \
34                    patch-config.py.diff
35
36set wxport cocoa
37
38variant cocoa conflicts carbon gtk description {use osx_cocoa} {
39    set wxport "osx_cocoa"
40}
41
42variant carbon conflicts cocoa gtk description {use osx_carbon} {
43    set wxport "osx_carbon"
44}
45
46variant gtk conflicts carbon cocoa dscription {use gtk} {
47    set wxport "gtk2"
48}
49
50if {![variant_isset carbon] && ![variant_isset cocoa] && ![variant_isset gtk]} {
51    default_variants +cocoa
52}
53
54pre-configure {
55    reinplace  "s|^WX_CONFIG = None|WX_CONFIG = \"${prefix}/bin/wx-config\"|g" \
56                ${worksrcpath}/config.py
57    reinplace  "s|^WXPORT = \'gtk2\'|WXPORT = \'${wxport}\'|g" \
58                ${worksrcpath}/config.py
59}
60
61extract.post_args       "| tar -xf - ${worksrcdir} ${distname}/docs"
62
63build.env       UNICODE="1" WXPORT="mac" PATH="${prefix}/lib/wx/config:$env(PATH)"
64
65destroot.env    UNICODE="1" WXPORT="mac" PATH="${prefix}/lib/wx/config:$env(PATH)"
66
67post-destroot {
68    xinstall -d -m 755 ${destroot}${prefix}/share/doc/
69    file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/${name}
70    file copy ${worksrcpath}/samples \
71        ${destroot}${prefix}/share/doc/${name}/examples
72}
73
74livecheck.type  regex
75livecheck.url   ${homepage}
76livecheck.regex wxPython (2\\.\[0-9\]+\\.\[0-9\]+\\.\[0-9\]+)