diff options
author | Luke Peterson <hazelnusse@gmail.com> | 2021-05-18 11:10:25 -0700 |
---|---|---|
committer | Matthias Maier <tamiko@gentoo.org> | 2021-05-30 22:59:37 -0500 |
commit | cd42cd0ed94bf92cf0719487596755402cc6c32a (patch) | |
tree | 87358d1d0f880a7ff2be91f3336a541426b1048d /dev-util/cppcheck | |
parent | sys-apps/systemd-tmpfiles: add 248.3, unkeyworded (diff) | |
download | gentoo-cd42cd0ed94bf92cf0719487596755402cc6c32a.tar.gz gentoo-cd42cd0ed94bf92cf0719487596755402cc6c32a.tar.bz2 gentoo-cd42cd0ed94bf92cf0719487596755402cc6c32a.zip |
dev-util/cppcheck: Add version 2.4.1
Closes: https://bugs.gentoo.org/786633
Closes: https://github.com/gentoo/gentoo/pull/20874
Signed-off-by: Dale Lukas Peterson <hazelnusse@gmail.com>
Signed-off-by: Matthias Maier <tamiko@gentoo.org>
Diffstat (limited to 'dev-util/cppcheck')
-rw-r--r-- | dev-util/cppcheck/Manifest | 1 | ||||
-rw-r--r-- | dev-util/cppcheck/cppcheck-2.4.1.ebuild | 84 | ||||
-rw-r--r-- | dev-util/cppcheck/files/cppcheck-2.4.1-limits.patch | 12 |
3 files changed, 97 insertions, 0 deletions
diff --git a/dev-util/cppcheck/Manifest b/dev-util/cppcheck/Manifest index 51d80e257e39..c78e131f4306 100644 --- a/dev-util/cppcheck/Manifest +++ b/dev-util/cppcheck/Manifest @@ -1,2 +1,3 @@ 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 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> |