# -*- 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
# $Id: Portfile 116202 2014-01-21 15:54:04Z mojca@macports.org $

PortSystem              1.0

PortGroup               python 1.0
PortGroup               github 1.0
PortGroup               wxWidgets 1.0

github.setup            enthought pyface 4.4.0
revision                1

name                    py-pyface
categories-append       devel
license                 BSD
maintainers             gmail.com: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  667a4b7acbab68167c53a158dd21487d0303e97b \
                        sha256  f675d9ddb736328fc6ec8d1daf94d3779b66ed6640596dcc4a1d96c141806548

python.versions         26 27

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

    variant wxpython30 conflicts wxpython28 description "Use wxWidgets-3.0 (cocoa) backend (experimental)" {
        depends_lib-append  port:py${python.version}-wxpython-3.0
        notes-append "Warning: wxpython-3.0 is not fully compatible with pyface, but the wxpython30 variant exists for testing and future use.\n"
    }

    variant wxpython28 conflicts wxpython30 description "Use wxWidgets-2.8 (gtk or carbon) backend" {
        depends_lib-append  port:py${python.version}-wxpython-2.8
    }

    variant pyqt4 description "Qt backend using PyQt4" {
        # Can use either py*-pyqt4 or py*-pyqt4-devel.
        depends_lib-append  path:share/py${python.version}-sip/PyQt4:py${python.version}-pyqt4
    }

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

    if {![variant_isset wxpython30] && ![variant_isset wxpython28] && ![variant_isset pyqt4] && ![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"
}
