# $Id: Portfile 88595 2012-01-05 15:21:18Z jwa@macports.org $

PortSystem 1.0
PortGroup	python27 1.0

name		py27-wxpython-devel
version		2.9.3.1

categories	python graphics
platforms	darwin
maintainers	jwa
description	Python interface to the wxWindows cross platform GUI
long_description	wxPython is a GUI toolkit for the Python programming \
    language. It allows Python programmers to create \
    programs with a robust, highly functional graphical \
    user interface, simply and easily. It is implemented \
    as a Python extension module (native code) that wraps \
    the popular wxWindows cross platform GUI library, \
    which is written in C++.

homepage	http://www.wxpython.org/
master_sites	sourceforge:wxpython
distname	wxPython-src-${version}
use_bzip2	yes
checksums           md5     11f5a423c05c43b4ff8c9f11f1986f04 \
                    sha1    0202f64e1e99fb69d22d7be0d38cf7dcf3d80d79 \
                    rmd160  cd19b1d07d39c7918c72cf124f4f5cd48836d781

depends_lib	port:wxWidgets-devel

worksrcdir	${distname}/wxPython

extract.post_args	"| tar -xf - ${worksrcdir} ${distname}/docs"

universal_variant	no

build.env	UNICODE="1" WXPORT="osx_cocoa" PATH="${prefix}/lib/wx/config:$env(PATH)"

destroot.env	UNICODE="1" WXPORT="osx_cocoa" PATH="${prefix}/lib/wx/config:$env(PATH)"

if {${os.platform} == "darwin" && ${os.major} >= 10} {
    patchfiles		patch-config.py.diff
}

post-destroot {
    xinstall -d -m 755 ${destroot}${prefix}/share/doc/
    file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/${name}
    file copy ${worksrcpath}/samples \
	${destroot}${prefix}/share/doc/${name}/examples
}

livecheck.type	regex
livecheck.url	${homepage}
livecheck.regex	wxPython(?: | \\(classic\\) )(2\\.\[0-9\]+\\.\[0-9\]+\\.\[0-9\]+)
