# -*- 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
PortGroup               github 1.0
PortGroup               wxWidgets 1.0

github.setup            enthought pyface 6.0.0

name                    py-pyface
categories-append       devel
license                 BSD
maintainers             {gmail.com:jjstickel @jjstickel} openmaintainer
supported_archs         noarch

description             The Enthought pyface package
long_description        The pyface project contains a toolkit-independent GUI\
                        abstraction layer, which is used to support the\
                        "visualization" features of the Traits package.
platforms               darwin

checksums           rmd160  eea3a99fe30520025d5d90d27daa4c9586111a6a \
                    sha256  467b6b990e22f3e2040b6e999e985fe947147ff4efaf5140eab00c7cb70f99d9 \
                    size    5242120

python.versions         27 35 36 37

if {${name} ne ${subport}} {
    depends_build-append    port:py${python.version}-setuptools
    depends_lib-append      port:py${python.version}-traits \
                            port:py${python.version}-pygments

    variant wxpython30 description "Use wxWidgets-3.0 backend (obsolete)" {
        depends_lib-append  port:py${python.version}-wxpython-3.0
        notes-append "Warning: wxpython-3.0 mostly works with Enthought packages, but qt is recommended.\n"
    }

    variant pyqt4 description "Qt backend using PyQt4" {
        depends_lib-append  port:py${python.version}-pyqt4
    }

    variant pyside description "Qt backend using PySide" {
        depends_lib-append  port:py${python.version}-pyside
    }
    
    variant pyqt5 description "Qt backend using PyQt5" {
        depends_lib-append  port:py${python.version}-pyqt5
        notes-append "To specify pyqt5, use: `ETS_TOOLKIT=qt4` and `QT_API=pyqt5`\n"
    }

    if {![variant_isset wxpython30] && ![variant_isset pyqt4] && ![variant_isset pyqt5] && ![variant_isset pyside]} {
        default_variants    +pyqt4
    }

    notes-append "If multiple backends are installed, the toolkit backend may be set\
 with environment variables ETS_TOOLKIT and QT_API, e.g., ETS_TOOLKIT=qt4, QT_API=pyqt.\n"
}