# -*- 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 106672 2013-06-04 16:55:04Z larryv@macports.org $

PortSystem          1.0

name                cppcheck
version             1.60.1
categories          devel
license             GPL-3
platforms           darwin
maintainers         etrix.com.au:brendan.simon openmaintainer

description         Static analysis of C and C++ code.

long_description    Cppcheck is an analysis tool for C and C++ code. Unlike \
                    compilers and many other analysis tools, we don't detect \
                    syntax errors. Cppcheck only detects the types of bugs that \
                    the compilers normally fail to detect. The goal is no false \
                    positives.

homepage            http://cppcheck.sourceforge.net/
master_sites        sourceforge:project/cppcheck/cppcheck/${version}

checksums           rmd160  8e90dd5a7f5c485d709d33bc4cf77d58a0b1ec9b \
                    sha256  73eb56e5ea268e917c73f64e68744add35409bdc93be99773d814f9cc0a7221e

depends_build       port:libxslt \
                    port:docbook-xsl

depends_lib         port:pcre

use_configure       no

variant universal {}

build.args          CXX="${configure.cxx} [get_canonical_archflags cxx]" \
                    HAVE_RULES=yes \
                    DB2MAN=${prefix}/share/xsl/docbook-xsl/manpages/docbook.xsl
build.target        all man

test.run            yes
test.target         test

destroot.args       PREFIX=${prefix}

post-destroot {
    xinstall -m 444 ${worksrcpath}/cppcheck.1 ${destroot}${prefix}/share/man/man1
}
