# -*- 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 84834 2011-10-02 23:04:44Z ryandesign@macports.org $

PortSystem          1.0

name                tree
version             1.6.0
categories          sysutils
license             GPL-2+
platforms           darwin
maintainers         nomaintainer
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/

checksums           rmd160  d0e89f49fa902c7a72056d1a4ef826ddfee6be15 \
                    sha256  4dc470a74880338b01da41701d8db90d0fb178877e526d385931a007d68d7591

extract.suffix      .tgz

patchfiles          patch-caseinsensitive.diff \
                    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}"
