# -*- 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             1.8.0
categories          sysutils
platforms           darwin
license             GPL-2+
maintainers         {larryv @larryv}

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://mama.indstate.edu/users/ice/tree

master_sites        ${homepage}/src/ \
                    ftp://mama.indstate.edu/linux/tree/ \
                    ftp://mama.indstate.edu/linux/tree/old/
extract.suffix      .tgz
checksums           rmd160  7a8e488213e41729a21b1f455bafd09a1e2d0eea \
                    sha256  715d5d4b434321ce74706d0dd067505bb60c5ea83b5f0b3655dae40aa6f9b7c2 \
                    size    50286

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}"