mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-15 05:37:01 +02:00
cppcheck: update to 2.10.2.
This commit is contained in:
parent
2fde0c3888
commit
155b4e0c55
3 changed files with 57 additions and 14 deletions
1
srcpkgs/cppcheck-gui
Symbolic link
1
srcpkgs/cppcheck-gui
Symbolic link
|
@ -0,0 +1 @@
|
|||
cppcheck
|
19
srcpkgs/cppcheck/patches/translations-location.patch
Normal file
19
srcpkgs/cppcheck/patches/translations-location.patch
Normal 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
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue