# -*- 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        harelba q 3.1.6 v
name                q-textasdata
revision            0

homepage            http://harelba.github.io/q

description         ${name} - Run SQL directly on CSV or TSV files

long_description    ${name} is a command line tool that allows direct \
                    execution of SQL-like queries on CSVs/TSVs (and any other \
                    tabular text files). ${name} treats ordinary files as \
                    database tables, and supports all SQL constructs, such as \
                    WHERE, GROUP BY, JOINs, etc. It supports automatic column \
                    name and type detection, and q provides full support for \
                    multiple character encodings.

categories          textproc python
supported_archs     noarch
platforms           {darwin any}
license             GPL-3+
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  d4da63ed3d3292e000af776aae8d4223bb23dd54 \
                    sha256  e63ba4ae49647f764c5255ad7065d2c614fdf03a2f7349a795de69529701fab8 \
                    size    277643

python.versions     39

github.tarball_from archive

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

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

post-extract {
    # Remove invalid symlink, which breaks setup.py installation
    file delete ${worksrcpath}/bin/qtextasdata.py
}

post-destroot {
    ln -s q ${destroot}${prefix}/bin/${name}
}
