summaryrefslogtreecommitdiff
path: root/dev-util/cppcheck
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/cppcheck')
-rw-r--r--dev-util/cppcheck/Manifest5
-rw-r--r--dev-util/cppcheck/cppcheck-2.2.ebuild2
-rw-r--r--dev-util/cppcheck/cppcheck-2.4.1.ebuild84
-rw-r--r--dev-util/cppcheck/files/cppcheck-2.4.1-limits.patch12
4 files changed, 101 insertions, 2 deletions
diff --git a/dev-util/cppcheck/Manifest b/dev-util/cppcheck/Manifest
index d5a3baadeaf8..a0b7d28455de 100644
--- a/dev-util/cppcheck/Manifest
+++ b/dev-util/cppcheck/Manifest
@@ -1,7 +1,10 @@
AUX cppcheck-1.88-ldflags.patch 967 BLAKE2B c88cf4c199e686b6befe353c25d1507969c3c48d9f30e6a0e6bf18389f28acf4c6b62a0f6a6521da453090140ed77dd86102811b296918dde238e928ff0c8cac SHA512 62f8bd8ed415bafd57cd204d51d29de73832e2510f329e57e51d19605d4df1681cbf2c1813b88681cb3b203d093ef0ec0edf44c45b7bbdb610bde7406e400035
AUX cppcheck-1.88-tinyxml2.patch 4689 BLAKE2B a4ad83cfa7e9edf7c52493ae78c72f730dea604be12ef8ae885c82b65fcbd5dc1a3b36c154da0c2c691a0f445b44a256f48de74f00daba7d544fd14d8237ee77 SHA512 2d8a90d2698607abfedcbeda806ad6e0589fd637c2b5b755cab2f6ba99f144ff11dce05162fa6a2b4b753f7814a3fc1cc83510bbbd5ed8811b6353ed30c27d5f
+AUX cppcheck-2.4.1-limits.patch 317 BLAKE2B a85978e5c6f5cdadcb8603719075f6982a739a4e8549f7cec1b64113889329a5bc75c321317797d8aceb6f12165c774bebcc5bd64724cbe07e78240eaecb1345 SHA512 dd56acfc19031cb380c8d0b04989f0a8aae5c9c47b9c22c3212cd0fa633455b87982ec9317fe05adf210f34c04e4edbbea0e64a751339d3dd3522705328cadcd
DIST cppcheck-1.88.tar.gz 2364053 BLAKE2B b688974ff83019422cc5b2ec575d9838bdff4ada17d71fb3d436f07eea50429490c222659163b845667d98c0ec186b3288464827894e379fd017dd0c3fea645f SHA512 fa4ede0665546341af0ba3dae09a00b6efae09ec7838c616c580be01ff6902594d61168a059539779be0c78e1708d2bd9c8e7987dd0bb67dc8fa332a10d1de6a
DIST cppcheck-2.2.tar.gz 3561406 BLAKE2B e436de4bec5412a18f013c8557a966c28c14edcd07fbb80eb53a897848d15f32afc180798ea1a074742f896b15d4020755c104b87dc8f82252121b58a92b92dc SHA512 d766187a69d6aa839e072e3c0ed44009621ca8492504257288ca2f49774f705a1ebcf2957f0801ac6eab2ffbdd845e9237f1213f85c6d0fcdbf16b1e7c690327
+DIST cppcheck-2.4.1.tar.gz 3761646 BLAKE2B 4c791088621f989e2529c92de38a73676fc3394e8cac72822596f7a75594283d0983693d693aa903a3ffb80bc0e1e20e71b55db5682d4d01c135ed77b2fc2e3c SHA512 8fb1ed5faa0071fc69405b7eb5b41e9f94b77d097158ea0d4f5e4da8a5087b9d1ab7bf37f8dc73d00096d3d2494aeb431af8029f0d4f1e2085f5b9b72bdc2d09
EBUILD cppcheck-1.88.ebuild 2343 BLAKE2B e669f6356fd39c2f736c1a5f9131b9757592db79a6bbe231d053ec5dade9fd692b6fd084b086e219f99a400309632a2c35281866c1b92bd029b926fde510f07c SHA512 c4c390e5dc1f6d1c484b1d016973fa7bf114b165b451413d95b85b46e3af878060da6b1932709157963c67d2666392818111761159845681c165bbef203204e3
-EBUILD cppcheck-2.2.ebuild 1705 BLAKE2B e8e600dcb615870e42ecbe01924a8d7e98bee0f022cb9a01e5e6d6e81630a871cfa4dc5530b649a1da7990ddc0ac2f85d24a678bad0fa09e85f5da7967880d19 SHA512 bb71babdeb6688859a6928eba84bc7f0f8b40a5ef55c525738fc15db1c288d4806b77a9814959c4b411c466a8a4b5bdb205e2d3f3b05a9cc665dcd997a0023de
+EBUILD cppcheck-2.2.ebuild 1703 BLAKE2B 1e1f847145c2aadc055b883831e85c841c2ba0a298914c577f5a742770593bca36326f7a18f63c12fb293e7aaf4e19bfa10778d9b32314bacb37c62ade437e65 SHA512 db26782ed3215d110a9419763aba386e742ccb74b791aad5136a8e147570b93db3713badba01a04dec434d957816f938e3c912a8aba5752a2d24ce2ec3bdce7f
+EBUILD cppcheck-2.4.1.ebuild 1767 BLAKE2B d00753321c8fdd0ca9be2ecbc97b0a1cf802395fd084b1c5eda17b27193f26e241d2398aa32988e809e4e8c8cb00d09bfbff2c157b7aa96b92fe85aceab4114d SHA512 d981a44eccdbb90891f7d7b409f46b2b2e586e196dc6d88aa8038e497691a7d6c9fa2bbc611e7dc25c6c6d4b26cc876df3f71dcb96977a2436677f6991198081
MISC metadata.xml 490 BLAKE2B 63b66d1ab0e87f0dd53dfaec62c4d17c1e806ddf2208df30b1a5fcc0f198ca343afa5a39ab55d92a3b4ac3b0143c24ec5c161afe23982c3c5eaca2050621c776 SHA512 1db095c4b258ccea938d6e4648aca9c3a165a123a703311de95f1743f641c5860cd1dd0369e6539efadd270b9f82f25694f504c34129cf55c74b323ffb3ac3c5
diff --git a/dev-util/cppcheck/cppcheck-2.2.ebuild b/dev-util/cppcheck/cppcheck-2.2.ebuild
index ddda0e4b2158..4014a57d6c95 100644
--- a/dev-util/cppcheck/cppcheck-2.2.ebuild
+++ b/dev-util/cppcheck/cppcheck-2.2.ebuild
@@ -11,7 +11,7 @@ SRC_URI="https://github.com/danmar/cppcheck/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3+"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~sparc ~x86"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc64 sparc ~x86"
IUSE="htmlreport pcre qt5 +z3"
RDEPEND="
diff --git a/dev-util/cppcheck/cppcheck-2.4.1.ebuild b/dev-util/cppcheck/cppcheck-2.4.1.ebuild
new file mode 100644
index 000000000000..8ee6ca9778e5
--- /dev/null
+++ b/dev-util/cppcheck/cppcheck-2.4.1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python{3_7,3_8,3_9} )
+inherit distutils-r1 toolchain-funcs cmake
+
+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 ~hppa ~ppc64 ~sparc ~x86"
+IUSE="htmlreport pcre qt5 +z3"
+
+RDEPEND="
+ htmlreport? ( dev-python/pygments[${PYTHON_USEDEP}] )
+ pcre? ( dev-libs/libpcre )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qthelp
+ dev-qt/qtprintsupport:5
+ )
+"
+DEPEND="${RDEPEND}
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ virtual/pkgconfig
+ z3? ( sci-mathematics/z3 )
+"
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.4.1-limits.patch
+)
+
+src_prepare() {
+ cmake_src_prepare
+}
+
+src_configure() {
+
+ local mycmakeargs=(
+ -DHAVE_RULES="$(usex pcre)"
+ -DBUILD_GUI="$(usex qt5)"
+ -DUSE_Z3="$(usex z3)"
+ -DFILESDIR="${EROOT}/usr/share/${PN}/"
+ -DENABLE_OSS_FUZZ=OFF
+ )
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+
+ if use htmlreport ; then
+ pushd htmlreport || die
+ distutils-r1_src_compile
+ popd || die
+ fi
+}
+
+src_install() {
+ # it's not autotools-based, so "${ED}" here, not "${D}", bug 531760
+ emake install DESTDIR="${ED}" \
+ FILESDIR="${EROOT}/usr/share/${PN}/"
+
+ insinto "/usr/share/${PN}/cfg"
+ doins cfg/*.cfg
+ if use qt5 ; then
+ dobin "${WORKDIR}/${P}_build/bin/${PN}-gui"
+ dodoc gui/{projectfile.txt,gui.${PN}}
+ fi
+ if use htmlreport ; then
+ pushd htmlreport || die
+ distutils-r1_src_install
+ popd || die
+ find "${D}" -name "*.egg-info" -delete
+ else
+ rm "${ED}/usr/bin/cppcheck-htmlreport" || die
+ fi
+
+ dodoc -r tools/triage
+}
diff --git a/dev-util/cppcheck/files/cppcheck-2.4.1-limits.patch b/dev-util/cppcheck/files/cppcheck-2.4.1-limits.patch
new file mode 100644
index 000000000000..8b8db9cb8a42
--- /dev/null
+++ b/dev-util/cppcheck/files/cppcheck-2.4.1-limits.patch
@@ -0,0 +1,12 @@
+diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp
+index d59789236..3604d517f 100644
+--- a/lib/symboldatabase.cpp
++++ b/lib/symboldatabase.cpp
+@@ -35,6 +35,7 @@
+ #include <cassert>
+ #include <climits>
+ #include <cstring>
++#include <limits>
+ #include <iomanip>
+ #include <iostream>
+ #include <unordered_map>