# -*- 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

name                tree
version             2.2.0
categories          sysutils
license             GPL-2+
maintainers         {larryv @larryv} \
                    openmaintainer

description         display tree-view of directories with optional \
                    color/HTML output
long_description    Tree is a simple utility that displays a tree-view \
                    of directories and files. It has options to use ANSI \
                    color escape-sequences or ASCII graphic characters, \
                    and can also output in HTML format. Tree was written \
                    by Steve Baker for Linux.
homepage            http://oldmanprogrammer.net/source.php?dir=projects/tree
master_sites        https://oldmanprogrammer.net/tar/tree/
extract.suffix      .tgz

checksums           rmd160  60f11ba92f08f44caf65410a3792ab2f03711af7 \
                    sha256  627557b2f55bd9abc91ee7689af1ab7ff385b9058be0fb58cb123dd0a3d4288f \
                    size    65048

patchfiles          patch-Makefile.diff

use_configure       no

variant universal {}

build.args          CC=${configure.cc} \
                    CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
                    LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"

destroot.args       BINDIR=${destroot}${prefix}/bin \
                    MANDIR=${destroot}${prefix}/share/man/man1

post-destroot {
    xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
    xinstall -m 0644 -W ${worksrcpath} README CHANGES LICENSE \
        ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
