# -*- 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

PortSystem          1.0
PortGroup           python 1.0

name                py-pyopencl
version             2023.1.4
categories-append   science parallel
license             MIT

maintainers         {petr @petrrr} openmaintainer

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

homepage            https://mathema.tician.de/software/pyopencl

checksums           rmd160  d06a4f94eb2a85e9abe5e6b8eb1e72da96766bca \
                    sha256  220174efca900e9d5de5aef2aa1b77a6f2550501de92b035a91013aeae4d4c5e \
                    size    473899

python.versions     39 310 311
python.pep517       no


if {${name} ne ${subport}} {
    patch.pre_args-replace  -p0 -p1
    patchfiles  patch-setup.py.diff

    compiler.cxx_standard 2014

    depends_build-append \
                        port:py${python.version}-mako \
                        port:py${python.version}-numpy \
                        port:py${python.version}-pybind11 \
                        port:py${python.version}-setuptools

    depends_lib-append  port:py${python.version}-cffi \
                        port:py${python.version}-platformdirs

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

    use_configure       yes

    configure.cmd       ${python.bin} configure.py
    configure.args      --cl-enable-gl
    configure.universal_args-delete --disable-dependency-tracking
}
