# -*- 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 114324 2013-12-05 08:44:51Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-pyopencl
version             2013.2
categories-append   science
license             MIT
platforms           darwin

maintainers         nomaintainer

description         Python wrapper for OpenCL.

long_description    PyOpenCL lets you access GPUs and \
                    other massively parallel compute \
                    devices from Python.

homepage            http://mathema.tician.de/software/pyopencl
master_sites        http://pypi.python.org/packages/source/p/pyopencl/

distname            pyopencl-${version}

checksums           rmd160  ad0d599183bd068db939e4eb1522d7887b4d9073 \
                    sha256  f8e4218e4e47d397886f5dabde16a4d8dcc12caa0cb16ec68cae31f89c94d918

patch.pre_args      -p1
patchfiles          patch-setup.py.diff

# Skipping 31 because there's no py31-mako
python.versions     26 27 32 33

if {${name} ne ${subport}} {
    depends_build-append \
                        port:py${python.version}-setuptools \
                        port:py${python.version}-numpy \
                        port:py${python.version}-mako

    depends_run-append  port:py${python.version}-decorator \
                        port:py${python.version}-pytools

    use_configure       yes
    configure.cmd       ${python.bin} configure.py
    configure.args      --cl-enable-gl
    configure.universal_args-delete --disable-dependency-tracking
    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     "pyopencl-(\\d+(?:\\.\\d+)*)${extract.suffix}"
}
