# -*- 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 117029 2014-02-13 12:28:39Z jwa@macports.org $

PortSystem          1.0
PortGroup           python 1.0
PortGroup           wxWidgets 1.0

name                py-robotframework-ride
set internal_name   robotframework-ride

version             1.3

license             Apache-2

categories-append   devel
maintainers         jwa
description         Robot Framework test case editor
long_description    ${description}

homepage            http://code.google.com/p/${internal_name}

platforms           darwin
python.versions     26 27
python.default_version 27

master_sites        https://pypi.python.org/packages/source/r/${internal_name}
distname            ${internal_name}-${version}

checksums           rmd160  75c180f11b161d671e0aba3e45a6613e749bf1ff \
                    sha256  b35c2fa4c7f78880253e28ea48120cd733a23427aa61139c1d3973a1e1ba90b7

if {${name} ne ${subport}} {
    build.cmd           ${python.bin} setup.py
    destroot.cmd        ${python.bin} setup.py
    depends_lib-append  port:py${python.version}-robotframework \
                        port:py${python.version}-paver

    post-extract {
        reinplace "s/pybot/pybot-${python.branch}/g" $worksrcpath/src/robotide/contrib/testrunner/runprofiles.py
    }

    variant wxpython30 conflicts wxpython28 description {Use wxPython 3.0 with Cocoa (experimental)} {
        depends_lib-append  port:py${python.version}-wxpython-3.0
        notes-append "Warning: wxPython 3.0 is not fully compatible with robotframework-ride.\n"
    }

    variant wxpython28 conflicts wxpython30 description {Use wxPython 2.8 with GTK} {
        depends_lib-append  port:py${python.version}-wxpython-2.8
    }

    if {![variant_isset wxpython30] && ![variant_isset wxpython28]} {
        default_variants    +wxpython28
    }
}

if {${name} eq ${subport}} {
    livecheck.type      regex
    livecheck.url      https://pypi.python.org/pypi/${internal_name}
    livecheck.regex     ${internal_name}-(\[0-9.\]+)\\.tar\\.\[bg\]z
} else {
    livecheck.type      none
}
