Files
haikuports/dev-util/cppcheck/cppcheck-2.17.1.recipe
2025-04-30 10:29:28 +00:00

69 lines
1.8 KiB
Bash

SUMMARY="A static analysis tool for C/C++ code"
DESCRIPTION="Cppcheck provides unique code analysis to detect bugs and focuses on \
detecting undefined behaviour and dangerous coding constructs. The goal is \
to detect only real errors in the code (i.e. have very few false positives).
Features:
* Unique code analysis that detect various kinds of bugs in your code.
* Both command line interface and graphical user interface are available.
* Cppcheck has a strong focus on detecting undefined behaviour."
HOMEPAGE="http://cppcheck.sourceforge.io/"
COPYRIGHT="2007-2025 the Cppcheck team"
LICENSE="GNU GPL v3"
REVISION="2"
SOURCE_URI="https://github.com/danmar/cppcheck/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="bfd681868248ec03855ca7c2aea7bcb1f39b8b18860d76aec805a92a967b966c"
SOURCE_FILENAME="cppcheck-$portVersion.tar.gz"
PATCHES="cppcheck-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
cppcheck$secondaryArchSuffix = $portVersion
cmd:cppcheck$secondaryArchSuffix = $portVersion
cmd:cppcheck_htmlreport$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libpcre$secondaryArchSuffix
lib:libtinyxml2$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libpcre$secondaryArchSuffix
devel:libtinyxml2$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3
"
BUILD()
{
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTS=ON \
-DHAVE_RULES=ON \
-DFILESDIR=$dataDir/cppcheck \
-DUSE_BUNDLED_TINYXML2=OFF
make -C build $jobArgs
}
INSTALL()
{
make -C build install
}
TEST()
{
ctest --test-dir build --output-on-failure
}