# -*- 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           golang 1.0
go.setup            github.com/svent/sift 0.9.1 v

categories          sysutils
license             GPL-3+
installs_libs       no
maintainers         {gmail.com:esafak @esafak} openmaintainer
description         A fast and powerful open source alternative to grep
long_description    sift is an alternative that aims for both speed and flexibility, \
                    adding features while trying to reach (or even surpass) the performance \
                    of the original grep. The additional features include gitignore support, \
                    conditions (e.g., match A only when preceded by B within X lines), \
                    full multi-core support and multiline matching.
homepage            https://sift-tool.org

checksums           ${distname}${extract.suffix} \
                        rmd160  ef953c63f798bf353f400cbaeb987bbda215e0f6 \
                        sha256  8830db8aa7d34445eee66a5817127919040531c5ade186b909655ef274c3e4ce \
                        size    39189

go.vendors          github.com/jessevdk/go-flags \
                        lock    96dc06278ce32a0e9d957d590bb987c81ee66407 \
                        rmd160  c5f8e8883c50d74d974f473287f8e89c3f76f80a \
                        sha256  1981b872319a9496bb00d97b8cd10bed42518ee831a46538772dcfa999c701c6 \
                        size    55455 \
                    github.com/svent/go-nbreader \
                        lock    7cef48da76dca6a496faa7fe63e39ed665cbd219 \
                        rmd160  6fd0bad37adcf601cf22634cd58a66352651da03 \
                        sha256  09ec2d65c7d95e9ecde248ff8edfaf52acaf375cb57c281c2fabb5efa682d4d3 \
                        size    2782 \
                    golang.org/x/crypto \
                        lock    2faea1465de239e4babd8f5905cc25b781712442 \
                        rmd160  45f15e1dad9af8b4b544c283fe7ed88a4001ff6a \
                        sha256  af09f8a8b573cb6c18e026377b3359d7550edb3817863d46b3e50004fc77ef80 \
                        size    1429256

post-extract {
    # sift expects go-flags to be namespaced under svent for some reason.
    move ${gopath}/src/github.com/jessevdk/go-flags ${gopath}/src/github.com/svent/go-flags
}

destroot {
    xinstall -m 755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
}
