# -*- 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 106911 2013-06-11 14:40:14Z jmr@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-pyopencl
version             2012.1
revision            0
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  bd4f5776ee7bd5393a8a46b4682d1e757372cc38 \
                    sha256  823c9af3540ab84221acf7978bf688d98c7635e19d6bdb4d6818c48235184297

patch.pre_args      -p1
patchfiles          patch-setup.py.diff \
                    patch-aksetup_helper.py.diff \
                    patch-clCreateProgramWithBuiltInKernels.diff

compiler.blacklist  clang

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

if {${subport} != ${name}} {
    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}"
}
