# -*- 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
PortGroup           github 1.0

# no source available on pypi for 0.48.0
github.setup        numba llvmlite 0.48.0 v
github.tarball_from archive
name                py-llvmlite
#version             0.48.0
categories-append   devel science
license             BSD

python.versions     310 311 312 313 314

maintainers         {stromnov @stromnov} openmaintainer

description         A lightweight LLVM python binding for writing JIT compilers
long_description    {*}${description}

homepage            https://llvmlite.pydata.org/

checksums           rmd160  b547f09a3f8e6418a8dcaefb7e47f25d2ac08735 \
                    sha256  a15971f69eb17e07718be1a7d18185918c298d3b0f82f0bf08e9a5893b2f53ca \
                    size    313109

if {${name} ne ${subport}} {
    PortGroup           legacysupport 1.1
    PortGroup           compiler_wrapper 1.0

    legacysupport.newest_darwin_requires_legacy \
                        17
    legacysupport.use_mp_libcxx yes

    set llvmver         22

    build.env-append    LLVM_DIR=${prefix}/libexec/llvm-${llvmver}/lib/cmake/
    depends_build-append \
                        path:bin/cmake:cmake

    depends_lib-append  port:llvm-${llvmver} \
                        port:zstd \
                        port:zlib
}
