# -*- 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 24.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             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  686538ca2147a37496550867a9fd2835dd219329 \
                    sha256  7db2e6ebb3c6a45c5604bff82291a957c62287a61e63aceb90c12335fc3cf8ad \
                    size    67629090

depends_build-append \
                    path:bin/cmake:cmake

depends_lib-append  port:python314

build.env-append    PYO3_PYTHON=${prefix}/bin/python3.14
# distrib_features minus viz_static, whose static image export downloads a
# chromedriver and needs a Chrome install at build time; viz keeps the
# viz command itself.
build.args-append   --features=feature_capable,apply,fetch,foreach,geocode,geoconnex,get,get_cloud,luau,mcp,polars,profile,readstat,synthesize,to,viz \
                    --bin ${name}

patchfiles cargo-toml-fix.diff

cargo.offline_cmd

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