Files
haikuports/dev-util/cppcheck/cppcheck-1.83.recipe
miqlas c9fce821ee Cppcheck 1.83 (#2422)
* CPPCheck: new recipe

* Cleanup
2018-04-09 18:24:54 +02:00

70 lines
1.6 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.net/"
COPYRIGHT="2007-2018 Cppcheck team"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/danmar/cppcheck/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="7d3656762beee8087e234a796c900c84b004ac241301106b6a2c01ef2beff095"
PATCHES="cppcheck-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
cppcheck$secondaryArchSuffix = $portVersion
cmd:cppcheck$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libpcre$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libpcre$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
defineDebugInfoPackage cppcheck$secondaryArchSuffix \
$binDir/cppcheck
BUILD()
{
mkdir -p build
cd build
cmake .. \
-DUSE_CLANG=OFF \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTS=ON \
-DHAVE_RULES=ON \
$cmakeDirArgs
make $jobArgs
}
INSTALL()
{
cd build
make install
}
TEST()
{
cd build
make test
}