# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup python 1.0 name py-wxpython-4.0 python.rootname wxPython # check kicad's version before updating version 4.2.1 revision 0 categories-append graphics devel license wxwidgets-3.1 maintainers nomaintainer description Python interface to the wxWidgets 3.2 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 wxWidgets cross platform GUI library, written in C++. homepage https://www.wxpython.org/ checksums rmd160 ff4d6710cfd293d63ffe6baa1255acf6e604a26b \ sha256 e48de211a6606bf072ec3fa778771d6b746c00b7f4b970eb58728ddf56d13d5c \ size 73724359 python.versions 39 310 311 312 if {${name} ne ${subport}} { patchfiles-append \ buildtools_config_py.patch \ buildtools_build_wxwidgets_py.patch \ build_py.patch \ cython3.patch depends_build-append \ port:py${python.version}-setuptools depends_lib-append \ port:tiff depends_run-append \ port:py${python.version}-numpy \ port:py${python.version}-pillow \ port:py${python.version}-six \ port:py${python.version}-sip \ port:py${python.version}-pathlib2 build.env-append SIP=${python.prefix}/bin/sip build.env-append PATH=${python.prefix}/bin:$env(PATH) set wxpython_options "--no_magic --release --python ${python.bin} --osx_cocoa --nodoc --prefix=${python.prefix}" build.cmd ${python.bin} build.py build.target build ${wxpython_options} destroot.cmd ${python.bin} build.py destroot.target install destroot.destdir --destdir=${destroot} ${wxpython_options} compiler.c_standard 2011 compiler.cxx_standard 2011 post-destroot { # relink rpaths of wxWidgets' binaries foreach wxbin [split [exec find ${destroot}${python.prefix}/bin/ -type f] \n] { if {[string match *text* [exec file ${wxbin}]] == 0} { foreach line [lrange [split [exec otool -L ${wxbin}] \n] 1 end] { if {[regexp {\t(.*)(libwx_.*dylib)} $line matched path lib] == 1} { system "install_name_tool -change ${path}${lib} ${python.prefix}/lib/${lib} ${wxbin}" } } } } } post-patch { reinplace "s|MACOSX_DEPLOYMENT_TARGET = \"10.10\"|MACOSX_DEPLOYMENT_TARGET = \"${macosx_deployment_target}\"|" \ ${worksrcpath}/wscript reinplace "s|--with-macosx-version-min=10.10|--with-macosx-version-min=${macosx_deployment_target}|" \ ${worksrcpath}/buildtools/build_wxwidgets.py } test.run yes test.cmd "${python.bin} -c 'import wx ; print(wx.__version__)'" test.target }