# -*- 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

github.setup            enthought pyface 7.4.1
github.tarball_from     archive
name                    py-pyface
revision                0

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.

checksums               rmd160  57356c20e10291efe49f58b80d7f5483dad741da \
                        sha256  d04d1869ec0b63966dd0a64b83fcea15a001a3220cf964e82f2745ad330e37c5 \
                        size    7756962

python.versions         37 38 39

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

    if {${python.version} < 39} {
        depends_lib-append  port:py${python.version}-importlib-resources
    }

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

    variant pyside description "Qt backend using PySide2" {
        depends_lib-append  port:py${python.version}-pyside2
    }

    variant pyqt5 description "Qt backend using PyQt5" {
        depends_lib-append  port:py${python.version}-pyqt5
        notes-append "To specify pyqt5 backend at run time, set the environmental variables: `ETS_TOOLKIT=qt4` and `QT_API=pyqt5`\n"
    }

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

    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=pyqt5.\n"
}
