# -*- 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 PortSystem 1.0 PortGroup github 1.0 github.setup danmar cppcheck 2.13.4 revision 0 categories devel license GPL-3 maintainers {khindenburg @kurthindenburg} 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 do not detect \ syntax errors. Cppcheck only detects the types of bugs that \ the compilers normally fail to detect. The goal is no false \ positives. github.tarball_from archive checksums rmd160 74425bee8c1810582b7c7f7ef3b35d4f7526fe91 \ sha256 d6ea064ebab76c6aa000795440479767d8d814dd29405918df4c1bbfcd6cb86c \ size 3646131 set python_branch 3.12 set python_version [string map {"." ""} ${python_branch}] set python_bin ${prefix}/bin/python${python_branch} depends_build-append port:docbook-xsl-nons \ port:docbook-xml-4.5 \ port:libxslt depends_lib-append port:pcre \ port:python${python_version} \ port:py${python_version}-pygments # Jan 2023 - master base/github PG default to yes which errors if {[exists extract.rename]} { extract.rename no } post-patch { reinplace -W ${worksrcpath} "s|#!/usr/bin/env python3|#!${python_bin}|" htmlreport/cppcheck-htmlreport } compiler.cxx_standard 2011 compiler.thread_local_storage yes use_configure no variant universal {} set sharedir ${prefix}/share/${name} build.target all man build.args CXX="${configure.cxx} [get_canonical_archflags cxx] ${configure.cxxflags}" \ DB2MAN=${prefix}/share/xsl/docbook-xsl-nons/manpages/docbook.xsl \ FILESDIR=${sharedir} \ HAVE_RULES=yes \ MATCHCOMPILER=yes \ PREFIX=${prefix} \ PYTHON_INTERPRETER=${python_bin} # https://trac.macports.org/ticket/66418 platform darwin 8 { depends_build-append port:gmake-apple build.cmd gmake-apple } test.run yes test.target test test.args {*}${build.args} destroot.args {*}${build.args} post-destroot { xinstall -m 0644 ${worksrcpath}/cppcheck.1 ${destroot}${prefix}/share/man/man1 xinstall -d ${destroot}${sharedir} foreach f [glob -tails -directory ${worksrcpath}/cfg *] { copy ${worksrcpath}/cfg/${f} ${destroot}${sharedir}/${f}.dist } } post-activate { foreach f [glob -directory ${sharedir} *.dist] { if {![file exists [file rootname ${f}]]} { copy ${f} [file rootname ${f}] } } } notes " If you've updated cppcheck from a previous version,\ you may want to replace the included config files: sudo find ${sharedir} -type f -name \"*.dist\" -exec bash -c 'f=\"\{\}\"; cp \"\$f\" \"\$\{f%.dist\}\"' \\; " github.livecheck.regex {([0-9.]+)}