# $Id: Portfile 105915 2013-05-09 20:51:20Z mww@macports.org $

PortSystem 1.0

name                pstree
version             2.36
categories          sysutils
maintainers         mww
license             GPL-2
description         pstree shows the output of the ps command as a tree
platforms           darwin freebsd
long_description    ${description}

homepage            http://freecode.com/projects/pstree/
master_sites        ftp://ftp.thp.uni-duisburg.de/pub/source/ \
                    http://fresh.t-systems-sfr.com/unix/src/misc/
checksums           rmd160  b98c5ce530cd4193a883a0c09e080da595595cd5 \
                    sha256  9d05d28432a12fe8744b895e10b4a39008bba4fc3787b3595da3cf599b75a4ef

installs_libs       no

# http://llvm.org/pr10514
# <rdar://problem/10015171>
if {${configure.compiler} == "clang"} {
    configure.cflags-delete -O2
    configure.cflags-append -O1
}

variant universal   {}

pre-extract {
    file mkdir ${worksrcpath}
    xinstall -m 755 ${filespath}/configure ${worksrcpath}
}
extract.dir    ${worksrcpath}

destroot {
    xinstall -s ${worksrcpath}/pstree ${destroot}${prefix}/bin
    set docdir ${prefix}/share/doc/${name}-${version}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 ${worksrcpath}/README \
        ${destroot}${docdir}
}

livecheck.type      regex
livecheck.url       ftp://ftp.thp.uni-duisburg.de/pub/source/
livecheck.regex     pstree.tar.gz -> pstree-(\[0-9\]+\\.\[0-9\]+)

