mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +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'
|
# Template file for 'cppcheck'
|
||||||
pkgname=cppcheck
|
pkgname=cppcheck
|
||||||
version=2.10.1
|
version=2.10.2
|
||||||
revision=1
|
revision=1
|
||||||
build_style=gnu-makefile
|
build_style=cmake
|
||||||
make_build_args="
|
configure_args="
|
||||||
FILESDIR=/usr/share/cppcheck
|
-DBUILD_GUI=ON
|
||||||
MATCHCOMPILER=yes
|
-DFILESDIR=/usr/share/cppcheck
|
||||||
HAVE_RULES=yes
|
-DHAVE_RULES=ON
|
||||||
DB2MAN=/usr/share/xsl/docbook/manpages/docbook.xsl"
|
-DUSE_BUNDLED_TINYXML2=OFF
|
||||||
make_install_args="${make_build_args}"
|
-DUSE_MATCHCOMPILER=ON"
|
||||||
make_build_target="cppcheck man"
|
hostmakedepends="libxslt docbook-xsl python3 qt5-tools-devel"
|
||||||
python_version="3"
|
makedepends="pcre-devel tinyxml2-devel qt5-devel qt5-tools-devel qt5-plugin-mysql
|
||||||
hostmakedepends="libxslt docbook-xsl python3 which"
|
qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
|
||||||
makedepends="pcre-devel"
|
|
||||||
depends="python3"
|
depends="python3"
|
||||||
short_desc="Static analysis of C/C++ code"
|
short_desc="Static analysis of C/C++ code"
|
||||||
maintainer="Duncaen <duncaen@voidlinux.org>"
|
maintainer="Duncaen <duncaen@voidlinux.org>"
|
||||||
|
@ -20,11 +19,35 @@ license="GPL-3.0-or-later"
|
||||||
homepage="http://cppcheck.sourceforge.net"
|
homepage="http://cppcheck.sourceforge.net"
|
||||||
changelog="https://sourceforge.net/p/cppcheck/news/"
|
changelog="https://sourceforge.net/p/cppcheck/news/"
|
||||||
distfiles="https://github.com/danmar/cppcheck/archive/${version}.tar.gz"
|
distfiles="https://github.com/danmar/cppcheck/archive/${version}.tar.gz"
|
||||||
checksum=0a1aa45d00132ecee0c9af467e085efbda448094a89d90137249b080863466d2
|
checksum=915785d01fa6f5571e9d450102056466222b554525ce3ad67c61b75508a7a451
|
||||||
|
|
||||||
export CXXFLAGS="-DNDEBUG"
|
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() {
|
post_install() {
|
||||||
|
make DB2MAN=/usr/share/xsl/docbook/manpages/docbook.xsl man
|
||||||
vman cppcheck.1
|
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