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

github.setup        indygreg python-zstandard 0.24.0
github.tarball_from archive
name                py-zstd

license             BSD
maintainers         nomaintainer

description         Zstandard compression
long_description    This extension allows Zstandard compression from Python

homepage            https://github.com/indygreg/python-zstandard

checksums           rmd160  ed62a53cebc9c202a40167bfdbdb632e5e18abfe \
                    sha256  cc63af195abef8c57e8eba154e2d3c642d41da50063c3e83080b64798b7f25f5 \
                    size    751192

python.versions     39 310 311 312 313

if {${name} ne ${subport}} {
    depends_build-append \
                    port:py${python.version}-cffi \
                    port:py${python.version}-packaging

    depends_lib-append \
                    port:zstd

    configure.args-append \
                    --install-option="--system-zstd"

    post-destroot {
        xinstall -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 0644 -W ${worksrcpath} LICENSE README.rst \
             ${destroot}${prefix}/share/doc/${subport}
    }
}
