# $Id: Portfile 117986 2014-03-18 13:56:34Z mmoll@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-opengl
version             3.0.2
revision            1
categories-append   graphics
platforms           darwin
supported_archs     noarch
license             BSD
maintainers         jmr openmaintainer

description         Python binding to OpenGL
long_description    PyOpenGL is the cross platform Python binding to OpenGL \
                    and related APIs. The binding is created using the \
                    standard ctypes library and is provided under an \
                    extremely liberal BSD-style Open-Source licenses.

homepage            http://pyopengl.sourceforge.net/

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

checksums           md5    77becc24ffc0a6b28030aa109ad7ff8b \
                    rmd160 0cbf4bc7c2e9ba59225534085f05ee589b26fc54 \
                    sha256 9ef93bbea2c193898341f574e281c3ca0dfe87c53aa25fbec4b03581f6d1ba03

python.versions     26 27 32 33 34

if {${name} ne ${subport}} {
    depends_build   port:py${python.version}-setuptools
    depends_lib     port:py${python.version}-opengl-accelerate \
                    port:py${python.version}-tkinter
    if {${python.version} >= 30} {
        depends_lib-append port:py${python.version}-Pillow
    } else {
        depends_lib-append port:py${python.version}-pil
    }
    test.run        yes
    livecheck.type  none
} else {
    livecheck.type  regex
    livecheck.url   https://pypi.python.org/pypi/PyOpenGL
    livecheck.regex {PyOpenGL/([0-9.]+)"}
}
