# $Id: Portfile 69969 2010-07-24 12:49:28Z nox@macports.org $

PortSystem      1.0
PortGroup       archcheck 1.0

name            rats
version         2.3
license         GPL-2
categories      security devel
maintainers     nomaintainer
platforms       darwin
description     Rough Auditing Tool for Security

long_description \
    RATS is a tool for scanning C, C++, Perl, PHP and Python source code and \
    flagging common security related programming errors such as buffer \
    overflows and TOCTOU (Time Of Check, Time Of Use) race conditions.

homepage        http://www.fortify.com/security-resources/rats.jsp
master_sites    http://www.fortify.com/servlet/download/public/

checksums       md5     339ebe60fc61789808a457f6f967d226 \
                sha1    02283f2a5f0482f09c7e33d2aa84d68c48a8ec5a \
                rmd160  0db9d6277ba03d68c4d3171ae07de02069622ca8

depends_lib \
    port:expat

archcheck.files \
    lib/libexpat.dylib

configure.args \
    --datadir='\${prefix}/share/rats' \
    --mandir='\${prefix}/share/man'

build.target rats

destroot.destdir prefix=${destroot}${prefix}

post-destroot {
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} COPYING README ${destroot}${docdir}
}

livecheck.type  regex
livecheck.regex {rats-(\d+(?:\.\d+)*)}
