# -*- 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        mookid diffr 0.1.5 v
github.tarball_from archive
revision            0

description         Yet another diff highlighting tool

long_description    \
    Reviewing changes involves reading diffs. Sometimes, a line-oriented \
    presentation of changes is not precise enough, especially when changes \
    involve long lines or very similar consecutive lines. \
\
    This program processes such diffs, and outputs them \(in the console\) \
    with additional diff information on top of the unified diff format, using \
    text attributes. \
\
    It works hunk by hunk, recomputing the diff on a word-by-word basis.

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

checksums           ${distname}${extract.suffix} \
                    rmd160  ef1a4cd810be23dba1a380701b9c98f0a916a194 \
                    sha256  6c5861e5b8f5d798e027fe69cc186452848dc4ae5641326b41b5c160d3e91654 \
                    size    263493

depends_run-append  port:less

notes {
Add the following to your ~/.gitconfig:

    [core]
        pager = diffr | less -R
    [interactive]
        diffFilter = diffr

Alternatively, you can run from the command line:

    git config --global core.pager 'diffr | less -R'
    git config --global interactive.difffilter diffr

}

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

cargo.crates \
    atty                            0.2.11  9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652 \
    libc                            0.2.58  6281b86796ba5e4366000be6e9e18bf35580adf9e63fbe2294aadb587613a319 \
    numtoa                           0.1.0  b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef \
    redox_syscall                   0.1.54  12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252 \
    redox_termios                    0.1.1  7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76 \
    termcolor                        1.1.0  bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f \
    termion                          1.5.3  6a8fb22f7cde82c8220e5aeacb3258ed7ce996142c77cba193f203515e26c330 \
    winapi                           0.3.7  f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770 \
    winapi-i686-pc-windows-gnu       0.4.0  ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6 \
    winapi-util                      0.1.3  4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80 \
    winapi-x86_64-pc-windows-gnu     0.4.0  712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f
