summaryrefslogtreecommitdiff
path: root/dev-util/cppcheck
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-07-15 12:27:33 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-07-15 12:27:33 +0100
commit868fd5dc8aab84930cfaa5252b8be06b35552765 (patch)
tree0c0cebf818c30c6f871f00ce1e7599775a7e561c /dev-util/cppcheck
parentf7adcd4ee556b2c3a420239c13fb74113d791f6a (diff)
gentoo auto-resync : 15:07:2024 - 12:27:33
Diffstat (limited to 'dev-util/cppcheck')
-rw-r--r--dev-util/cppcheck/Manifest5
-rw-r--r--dev-util/cppcheck/cppcheck-2.13.0.ebuild6
-rw-r--r--dev-util/cppcheck/cppcheck-2.14.2.ebuild152
-rw-r--r--dev-util/cppcheck/files/cppcheck-2.13.0-32-bit-tests.patch28
4 files changed, 189 insertions, 2 deletions
diff --git a/dev-util/cppcheck/Manifest b/dev-util/cppcheck/Manifest
index 21a33a07db7c..4704a3694209 100644
--- a/dev-util/cppcheck/Manifest
+++ b/dev-util/cppcheck/Manifest
@@ -1,5 +1,8 @@
+AUX cppcheck-2.13.0-32-bit-tests.patch 1241 BLAKE2B 8af4df092aa481b380e161b1d45f25000fb001e2d5172cbaa3a0ffe3257e811e495d446e8418d97e809011d067d03efacca9e1ee9c264ee45a56b0ade50e1340 SHA512 e916ff0bb845332626711447eb0af33927d26bc92f55ab9b378377e84a0ac3ddc504555f5862b97caa555f1a99bf2469610641bd9f7a5e268543fc649b1481fc
DIST cppcheck-2.13.0.tar.gz 3643744 BLAKE2B 942391bdc2ad009e1bf9f691835c268b33ae0a7c84ff68a1ea7985abbc65fc7ea6e319111ed6a968f4f93f3b682ce46447ba1e3b1fccd96535497f3fd190b913 SHA512 35f266cd247860aa0a0d84862faf4561f4efea096e641a01ebc3b1e4cea14c91c75773344da5bd3d48101c11ee7841b46f24419a9583e65bd242d0219a1ca418
+DIST cppcheck-2.14.2.tar.gz 3723248 BLAKE2B 551c783e13202f496b705602566799848b611bcc706f7a803c9ff530b3405db9e0b5294d2ce51ef5a4889e08c5b9d54c15d40a7ec6f4dc59333a7b6ed24b1f02 SHA512 8e90fa87845a083a4de66ec86edf707184a2293eb346fd79bfcafb73f93db049216472fcb2ab802ce529680f9708261ba3c26675c6fd9637e1dc83903bc44c4b
DIST cppcheck-2.9.tar.gz 3916529 BLAKE2B 5d75328e1fcd389376630502ad7427d3473392a9467e8731e6cd7c2c6349efccc05eddd7eca4cb361930661d2383a8d316e33bd3609b9333a710153d199e326d SHA512 69204a7ceac087470201482894e6422b99d0849f08641e80b2e341c9d164a1d2095e3a08a1fba2e9fa681783d07fe7277b30ea0cc0bf582431b5d13ab2f58c1f
-EBUILD cppcheck-2.13.0.ebuild 3116 BLAKE2B 01e4306a7beaed2c73dc553557e1db4c9ee37876b9df6b58b09d349e7b195e996ac8969e88f930d18807154e982627e4d35d952ab71095661aeb28c85698b95d SHA512 6cd5253508da734b7f93d0af760710674a0eb5f90dab7759c877fe34bde027f9aba812e7e790d3fda1825fa2da48448c82f478989ba2f29319ab2bca6f5e8dd1
+EBUILD cppcheck-2.13.0.ebuild 3175 BLAKE2B 733d2d97cf24693cad843da720a08a2356a5c2eaa3df8042e711fd65874368349370581dfd2ad56ca0b237636c84c6023511a4d7dedf3e6afe1c162cf7acaed6 SHA512 5df3ecf44339409e59bb15492119fd6679f2ca4329f0da343c900f3f3cb1741de0bd3c43f05ca3dbf5cdb4fcba23c72b48d8c11f6d5e96f45968f5c38c658c26
+EBUILD cppcheck-2.14.2.ebuild 3078 BLAKE2B 53e0031e13fb36b22cc1d4052157207fa3694745009c4c67baeb6859ed9ff012c641224a813f406a339745c90fef0167fc07234754f8495a7df89c888037ab94 SHA512 f80ae436fa324556ada875032705e5ac53cc4a6fe8ae27eb0d547f0980f2022e0af4b65358be0bfd76b38ad5a2fbb466d89f64b6a0539beaf136c7437dc64fd8
EBUILD cppcheck-2.9.ebuild 2369 BLAKE2B 909101f8491d35342282c8334e7a3e31fc8a13dd30ad8a46acbe469b2735842c7856c444bfb47950f15f62e353be9e724ba08eeec039ab58713d3832d161c83d SHA512 71152b0282b8628b4ba25110c90072b09d75c9828408688af0d025ebe111de0a28e29659bb6d95e5982badff5de5501bab1d4263635ccee9763e11a1c73889f0
MISC metadata.xml 519 BLAKE2B 8f520238cfead1bbf8f534fcfb733805de6c657379d6eb02e5e823d5cdb4716fa5fd2b3aae63009601d06e79f82519c159c86d234e59f0966568ceb3ad58f5fb SHA512 d4472b2285c72f3fb891678374c73f0204556d247ac56489484739b4cfaece956974189653feb81d58d8418cb9563378ce3f040d093238f1a2dd27216c8a361c
diff --git a/dev-util/cppcheck/cppcheck-2.13.0.ebuild b/dev-util/cppcheck/cppcheck-2.13.0.ebuild
index 71c678e92cc5..56fb9ec37a41 100644
--- a/dev-util/cppcheck/cppcheck-2.13.0.ebuild
+++ b/dev-util/cppcheck/cppcheck-2.13.0.ebuild
@@ -75,10 +75,14 @@ BDEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.13.0-32-bit-tests.patch
+)
+
src_prepare() {
cmake_src_prepare
- # Modify to an existing dockbook location
+ # Modify to an existing docbook location
sed -i \
-e "s|set(DB2MAN .*|set(DB2MAN \"${EPREFIX}/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl\")|" \
man/CMakeLists.txt || die
diff --git a/dev-util/cppcheck/cppcheck-2.14.2.ebuild b/dev-util/cppcheck/cppcheck-2.14.2.ebuild
new file mode 100644
index 000000000000..088bb97b6b42
--- /dev/null
+++ b/dev-util/cppcheck/cppcheck-2.14.2.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake python-single-r1 xdg
+
+DESCRIPTION="Static analyzer of C/C++ code"
+HOMEPAGE="https://github.com/danmar/cppcheck"
+SRC_URI="https://github.com/danmar/cppcheck/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="charts gui qt6 htmlreport pcre test"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ charts? ( gui )
+ qt6? ( gui )
+"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ dev-libs/tinyxml2:=
+ pcre? ( dev-libs/libpcre )
+ gui? (
+ qt6? (
+ dev-qt/qtbase:6[gui,widgets,network]
+ dev-qt/qttools:6[assistant,linguist]
+ charts? ( dev-qt/qtcharts:6 )
+ )
+ !qt6? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qthelp:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtwidgets:5
+ charts? ( dev-qt/qtcharts:5 )
+ )
+ )
+"
+RDEPEND="
+ ${DEPEND}
+ ${PYTHON_DEPS}
+ htmlreport? (
+ $(python_gen_cond_dep '
+ dev-python/pygments[${PYTHON_USEDEP}]
+ ')
+ )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ virtual/pkgconfig
+ gui? (
+ !qt6? (
+ dev-qt/linguist-tools:5
+ )
+ )
+ test? (
+ gui? (
+ !qt6? (
+ dev-qt/qttest:5
+ )
+ )
+ htmlreport? (
+ $(python_gen_cond_dep '
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ ')
+ )
+ )
+"
+
+src_prepare() {
+ cmake_src_prepare
+
+ # Modify to an existing docbook location
+ sed -i \
+ -e "s|set(DB2MAN .*|set(DB2MAN \"${EPREFIX}/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl\")|" \
+ man/CMakeLists.txt || die
+
+ # Make tests use cppcheck built in build dir.
+ sed -i -e "s|CPPCHECK_BIN = .*|CPPCHECK_BIN = '${BUILD_DIR}/bin/cppcheck'|" htmlreport/test_htmlreport.py || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DFILESDIR="${EPREFIX}"/usr/share/${PF}/
+ -DBUILD_MANPAGE=ON
+
+ -DHAVE_RULES=$(usex pcre)
+
+ -DBUILD_GUI=$(usex gui)
+ -DUSE_QT6=$(usex qt6)
+ -DWITH_QCHART=$(usex charts)
+
+ -DBUILD_TESTS=$(usex test)
+ -DREGISTER_TESTS=$(usex test)
+ -DREGISTER_GUI_TESTS=$(usex test)
+
+ -DUSE_MATCHCOMPILER=ON
+ -DUSE_LIBCXX=OFF
+
+ -DDISABLE_DMAKE=ON
+ -DUSE_BOOST=OFF
+ -DUSE_BUNDLED_TINYXML2=OFF
+
+ # Yes, this is necessary to use the correct python version.
+ # bug #826602
+ -DPython_EXECUTABLE=${PYTHON}
+ )
+
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ cmake_build man
+}
+
+src_test() {
+ local CMAKE_SKIP_TESTS=(
+ # Out of source builds breaks test TestFileLister
+ # https://github.com/danmar/cppcheck/pull/5462
+ TestFileLister
+ )
+ cmake_src_test
+ use htmlreport && epytest htmlreport
+}
+
+src_install() {
+ cmake_src_install
+
+ insinto /usr/share/${PF}/cfg
+ doins cfg/*.cfg
+
+ if use gui ; then
+ dobin "${WORKDIR}/${P}_build/bin/${PN}-gui"
+ dodoc gui/{projectfile.txt,gui.${PN}}
+ fi
+
+ use htmlreport && python_doscript htmlreport/cppcheck-htmlreport
+ python_fix_shebang "${ED}"/usr/share/${PF}
+ python_optimize "${ED}"/usr/share/${PF}
+
+ dodoc -r tools/triage
+ doman "${BUILD_DIR}"/man/cppcheck.1
+}
diff --git a/dev-util/cppcheck/files/cppcheck-2.13.0-32-bit-tests.patch b/dev-util/cppcheck/files/cppcheck-2.13.0-32-bit-tests.patch
new file mode 100644
index 000000000000..a31a014f5968
--- /dev/null
+++ b/dev-util/cppcheck/files/cppcheck-2.13.0-32-bit-tests.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/935368
+https://github.com/danmar/cppcheck/commit/9118d330d387e73a20e1bc46c65387306afa0895
+
+From 9118d330d387e73a20e1bc46c65387306afa0895 Mon Sep 17 00:00:00 2001
+From: chrchr-github <78114321+chrchr-github@users.noreply.github.com>
+Date: Sat, 23 Dec 2023 20:59:59 +0100
+Subject: [PATCH] Fix test failure on 32bit platform (#5803)
+
+--- a/test/testother.cpp
++++ b/test/testother.cpp
+@@ -2173,6 +2173,7 @@ class TestOther : public TestFixture {
+ "}\n");
+ ASSERT_EQUALS("[test.cpp:1]: (performance) Function parameter 't' should be passed by const reference.\n", errout.str());
+
++ Settings settings0 = settingsBuilder(_settings).platform(Platform::Type::Unix64).build();
+ check("struct S {\n" // #12138
+ " union {\n"
+ " int a = 0;\n"
+@@ -2189,7 +2190,7 @@ class TestOther : public TestFixture {
+ "};\n"
+ "void f(S s) {\n"
+ " if (s.x > s.y) {}\n"
+- "}\n");
++ "}\n", /*filename*/ nullptr, /*inconclusive*/ true, /*runSimpleChecks*/ true, /*verbose*/ false, &settings0);
+ ASSERT_EQUALS("", errout.str());
+
+ check("struct S { std::list<int> l; };\n" // #12147
+