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

github.setup        dathere qsv 12.0.0
github.tarball_from archive
revision            0

homepage            https://qsv.dathere.com

description         Ultra-fast CSV data-wrangling CLI toolkit

long_description    \
    qsv is a blazing fast, pleasingly parallel, CPU-accelerated, data \
    wrangling toolkit that\'s built on Rust and Polars to slice, dice, and \
    analyze your data in seconds from the command line. It's designed to \
    handle very large datasets without specialized programming skills.

categories          textproc
installs_libs       no
license             {public-domain MIT}
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  b08fd87cbfe291a136ff2ceafb11e7eef0b493cd \
                    sha256  194be4a193dfb95c77005dcdb900f1e0b2e4c6cc0f2ee5c2a3fa6adc7ca962f9 \
                    size    49246070

depends_build-append \
                    path:bin/cmake:cmake

depends_lib-append  port:python313

build.env-append    PYO3_PYTHON=${prefix}/bin/python3.13
build.args-append   --features=distrib_features --bin ${name}

patchfiles cargo-toml-fix.diff

cargo.offline_cmd

destroot {
    xinstall -m 0755 \
        ${worksrcpath}/target/[cargo.rust_platform]/release/${name} \
        ${destroot}${prefix}/bin/
}
