cppcheck: update to 2.10.2.

This commit is contained in:
Duncaen 2023-03-04 17:44:37 +01:00
parent 2fde0c3888
commit 155b4e0c55
No known key found for this signature in database
GPG key ID: 335C1D17EC3D6E35
3 changed files with 57 additions and 14 deletions

1
srcpkgs/cppcheck-gui Symbolic link
View file

@ -0,0 +1 @@
cppcheck

View file

@ -0,0 +1,19 @@
--- a/gui/translationhandler.cpp
+++ b/gui/translationhandler.cpp
@@ -116,15 +116,7 @@
if (datadir.isEmpty())
datadir = appPath;
- QString translationFile;
- if (QFile::exists(datadir + "/lang/" + mTranslations[index].mFilename + ".qm"))
- translationFile = datadir + "/lang/" + mTranslations[index].mFilename + ".qm";
-
- else if (QFile::exists(datadir + "/" + mTranslations[index].mFilename + ".qm"))
- translationFile = datadir + "/" + mTranslations[index].mFilename + ".qm";
-
- else
- translationFile = appPath + "/" + mTranslations[index].mFilename + ".qm";
+ QString translationFile("/usr/share/cppcheck/cfg/lang/" + mTranslations[index].mFilename + ".qm");
if (!mTranslator->load(translationFile) && !failure) {
//If it failed, lets check if the default file exists

View file

@ -1,18 +1,17 @@
# Template file for 'cppcheck'
pkgname=cppcheck
version=2.10.1
version=2.10.2
revision=1
build_style=gnu-makefile
make_build_args="
FILESDIR=/usr/share/cppcheck
MATCHCOMPILER=yes
HAVE_RULES=yes
DB2MAN=/usr/share/xsl/docbook/manpages/docbook.xsl"
make_install_args="${make_build_args}"
make_build_target="cppcheck man"
python_version="3"
hostmakedepends="libxslt docbook-xsl python3 which"
makedepends="pcre-devel"
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>"
@ -20,11 +19,35 @@ 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=0a1aa45d00132ecee0c9af467e085efbda448094a89d90137249b080863466d2
checksum=915785d01fa6f5571e9d450102056466222b554525ce3ad67c61b75508a7a451
export CXXFLAGS="-DNDEBUG"
export LDFLAGS="-pthread"
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
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
}
}