Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/c/cppcheck/abi_libs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cppcheck
cppcheck-gui
2,021 changes: 1 addition & 2,020 deletions packages/c/cppcheck/abi_symbols

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions packages/c/cppcheck/abi_used_libs
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
ld-linux-x86-64.so.2
libQt6Core.so.6
libQt6Gui.so.6
libQt6Help.so.6
libQt6Network.so.6
libQt6PrintSupport.so.6
libQt6Widgets.so.6
libc.so.6
libgcc_s.so.1
libm.so.6
Expand Down
1,052 changes: 1,052 additions & 0 deletions packages/c/cppcheck/abi_used_symbols

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions packages/c/cppcheck/files/cppcheck-2.11-translations.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
diff -urp cppcheck-2.11.orig/gui/CMakeLists.txt cppcheck-2.11/gui/CMakeLists.txt
--- cppcheck-2.11.orig/gui/CMakeLists.txt 2023-06-22 05:07:56.000000000 -0400
+++ cppcheck-2.11/gui/CMakeLists.txt 2023-06-22 15:34:50.096373560 -0400
@@ -70,7 +70,7 @@ CheckOptions:
endif()

install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
- install(FILES ${qms} DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
+ install(FILES ${qms} DESTINATION share/${PROJECT_NAME}/lang COMPONENT applications)

install(FILES cppcheck-gui.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)

diff -urp cppcheck-2.11.orig/gui/translationhandler.cpp cppcheck-2.11/gui/translationhandler.cpp
--- cppcheck-2.11.orig/gui/translationhandler.cpp 2023-06-22 05:07:56.000000000 -0400
+++ cppcheck-2.11/gui/translationhandler.cpp 2023-06-22 15:34:50.096373560 -0400
@@ -99,15 +99,7 @@ bool TranslationHandler::setLanguage(con

QString datadir = getDataDir();

- 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/lang/" + mTranslations[index].mFilename + ".qm");

if (!mTranslator->load(translationFile)) {
failure = true;
13 changes: 11 additions & 2 deletions packages/c/cppcheck/package.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# yaml-language-server: $schema=/usr/share/ypkg/schema/schema.json
name : cppcheck
version : 2.20.0
release : 36
release : 37
source :
- https://github.com/danmar/cppcheck/archive/refs/tags/2.20.0.tar.gz : 7be7992439339017edb551d8e7d2315f9bb57c402da50c2cee9cd0e2724600a1
homepage : https://cppcheck.sourceforge.io/
Expand All @@ -11,9 +11,18 @@ summary : Static source code analysis tool for C and C++ code
description: |
Cppcheck is a static analysis tool for C/C++ code. It 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).
builddeps :
- pkgconfig(Qt6Gui)
- pkgconfig(Qt6Linguist)
- pcre2
patterns :
- gui :
- /usr/bin/cppcheck-gui
- /usr/share/Cppcheck/lang/*
- /usr/share/applications/*
- /usr/share/icons/*
Comment on lines +17 to +22
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be moved to the bottom of the file? It makes everything easier to find.

setup : |
%cmake_ninja . -DBUILD_TESTS=ON -DHAVE_RULES=OFF -DUSE_MATCHCOMPILER=On
%patch -p1 -i $pkgfiles/cppcheck-2.11-translations.patch
%cmake_ninja . -DBUILD_TESTS=ON -DHAVE_RULES=OFF -DUSE_MATCHCOMPILER=On -DBUILD_GUI=ON
build : |
%ninja_build
install : |
Expand Down
38 changes: 32 additions & 6 deletions packages/c/cppcheck/pspec_x86_64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<Name>cppcheck</Name>
<Homepage>https://cppcheck.sourceforge.io/</Homepage>
<Packager>
<Name>Silke Hofstra</Name>
<Email>silke@slxh.eu</Email>
<Name>Jacek Jagosz</Name>
<Email>jacek.jagosz@outlook.com</Email>
</Packager>
<License>GPL-3.0-or-later</License>
<PartOf>programming.tools</PartOf>
Expand Down Expand Up @@ -103,13 +103,39 @@
<Path fileType="data">/usr/share/licenses/cppcheck/COPYING</Path>
</Files>
</Package>
<Package>
<Name>cppcheck-gui</Name>
<Summary xml:lang="en">Static source code analysis tool for C and C++ code</Summary>
<Description xml:lang="en">Cppcheck is a static analysis tool for C/C++ code. It 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).
</Description>
<Files>
<Path fileType="executable">/usr/bin/cppcheck-gui</Path>
<Path fileType="data">/usr/share/Cppcheck/lang/cppcheck_de.qm</Path>
<Path fileType="data">/usr/share/Cppcheck/lang/cppcheck_es.qm</Path>
<Path fileType="data">/usr/share/Cppcheck/lang/cppcheck_fi.qm</Path>
<Path fileType="data">/usr/share/Cppcheck/lang/cppcheck_fr.qm</Path>
<Path fileType="data">/usr/share/Cppcheck/lang/cppcheck_it.qm</Path>
<Path fileType="data">/usr/share/Cppcheck/lang/cppcheck_ja.qm</Path>
<Path fileType="data">/usr/share/Cppcheck/lang/cppcheck_ka.qm</Path>
<Path fileType="data">/usr/share/Cppcheck/lang/cppcheck_ko.qm</Path>
<Path fileType="data">/usr/share/Cppcheck/lang/cppcheck_nl.qm</Path>
<Path fileType="data">/usr/share/Cppcheck/lang/cppcheck_ru.qm</Path>
<Path fileType="data">/usr/share/Cppcheck/lang/cppcheck_sr.qm</Path>
<Path fileType="data">/usr/share/Cppcheck/lang/cppcheck_sv.qm</Path>
<Path fileType="data">/usr/share/Cppcheck/lang/cppcheck_zh_CN.qm</Path>
<Path fileType="data">/usr/share/Cppcheck/lang/cppcheck_zh_TW.qm</Path>
<Path fileType="data">/usr/share/applications/cppcheck-gui.desktop</Path>
<Path fileType="data">/usr/share/icons/hicolor/64x64/apps/cppcheck-gui.png</Path>
<Path fileType="data">/usr/share/icons/hicolor/scalable/apps/cppcheck-gui.svg</Path>
</Files>
</Package>
<History>
<Update release="36">
<Date>2026-04-06</Date>
<Update release="37">
<Date>2026-04-19</Date>
<Version>2.20.0</Version>
<Comment>Packaging update</Comment>
<Name>Silke Hofstra</Name>
<Email>silke@slxh.eu</Email>
<Name>Jacek Jagosz</Name>
<Email>jacek.jagosz@outlook.com</Email>
</Update>
</History>
</PISI>