# $Id: Portfile 90445 2012-03-05 22:08:09Z cal@macports.org $

PortSystem 1.0

name                pstree
version             2.33
revision            1
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           md5     b0a85caacd85f78bd83700afa86ec2e9 \
                    sha1    2f29ea2618cb6fd90529a543a94ed89b79db58b8 \
                    rmd160  4514485622955b66b162c1db2c1a454eda2df86d

# 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\]+)

