# -*- 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
# $Id: Portfile 120205 2014-05-19 15:32:00Z g5pw@macports.org $

PortSystem          1.0
PortGroup           github 1.0

github.setup        ggreer the_silver_searcher 0.22.0
categories          textproc
maintainers         g5pw openmaintainer
platforms           darwin
license             Apache-2.0
description         A code-searching tool similar to ack, but faster.
long_description    \
  An attempt to make something better than ack, which itself is better than grep.

checksums           rmd160  381c4a1b9fcf486e83e75851a885fea0549dbb2c \
                    sha256  c4c6002848acd23842ac09a16275a221367ad684610d045368cc20549b274011

depends_build       port:pkgconfig
depends_lib         port:pcre \
                    port:xz

use_autoreconf      yes

build.args-append   V=1

post-destroot {
    xinstall -d -m 755 ${destroot}${prefix}/share/bash-completion/completions
    move \
        ${destroot}${prefix}/share/${name}/completions/ag.bashcomp.sh \
        ${destroot}${prefix}/share/bash-completion/completions/ag
}
