54 lines
1.5 KiB
Bash
54 lines
1.5 KiB
Bash
# Template file for 'cppcheck'
|
|
pkgname=cppcheck
|
|
version=2.13.0
|
|
revision=1
|
|
build_style=cmake
|
|
configure_args="
|
|
-DBUILD_GUI=ON
|
|
-DFILESDIR=/usr/share/cppcheck
|
|
-DHAVE_RULES=ON
|
|
-DUSE_BUNDLED_TINYXML2=OFF
|
|
-DUSE_MATCHCOMPILER=ON"
|
|
hostmakedepends="libxslt docbook-xsl python3 qt5-tools-devel"
|
|
makedepends="pcre-devel tinyxml2-devel qt5-devel qt5-tools-devel qt5-plugin-mysql
|
|
qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
|
|
depends="python3"
|
|
short_desc="Static analysis of C/C++ code"
|
|
maintainer="Duncaen <duncaen@voidlinux.org>"
|
|
license="GPL-3.0-or-later"
|
|
homepage="http://cppcheck.sourceforge.net"
|
|
changelog="https://sourceforge.net/p/cppcheck/news/"
|
|
distfiles="https://github.com/danmar/cppcheck/archive/${version}.tar.gz"
|
|
checksum=8229afe1dddc3ed893248b8a723b428dc221ea014fbc76e6289840857c03d450
|
|
|
|
export CXXFLAGS="-DNDEBUG"
|
|
|
|
if [ -n "$XBPS_CHECK_PKGS" ]; then
|
|
configure_args+=" -DBUILD_TESTS=ON"
|
|
fi
|
|
|
|
post_extract() {
|
|
if [ "$CROSS_BUILD" ]; then
|
|
vsed -e '/run-dmake/d' -i test/CMakeLists.txt -i cli/CMakeLists.txt
|
|
fi
|
|
}
|
|
|
|
post_install() {
|
|
make DB2MAN=/usr/share/xsl/docbook/manpages/docbook.xsl man
|
|
vman cppcheck.1
|
|
|
|
vmkdir usr/share/cppcheck/cfg/lang
|
|
mv "${DESTDIR}/usr/bin/cppcheck_"*.qm "${DESTDIR}/usr/share/cppcheck/cfg/lang/"
|
|
}
|
|
|
|
cppcheck-gui_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - Qt5 GUI"
|
|
pkg_install() {
|
|
vmove usr/bin/cppcheck-gui
|
|
vmove usr/share/cppcheck/cfg/lang
|
|
vmove usr/share/applications
|
|
vmove usr/share/icons
|
|
}
|
|
}
|