summaryrefslogtreecommitdiff
path: root/dev-util/cppcheck
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-03-01 19:28:40 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-03-01 19:28:40 +0000
commitd628c1f8493d09e3deb5d19971cd21691d8758e4 (patch)
tree7afecb9f9148ecf631ac2093143278e041cc5acd /dev-util/cppcheck
parent4b1be5ef874aaeb61a2116048e0c2312e53f8c69 (diff)
gentoo auto-resync : 01:03:2025 - 19:28:40
Diffstat (limited to 'dev-util/cppcheck')
-rw-r--r--dev-util/cppcheck/Manifest4
-rw-r--r--dev-util/cppcheck/cppcheck-2.16.0.ebuild132
-rw-r--r--dev-util/cppcheck/metadata.xml9
3 files changed, 143 insertions, 2 deletions
diff --git a/dev-util/cppcheck/Manifest b/dev-util/cppcheck/Manifest
index 684fb5187630..95db06f92fc3 100644
--- a/dev-util/cppcheck/Manifest
+++ b/dev-util/cppcheck/Manifest
@@ -1,3 +1,5 @@
DIST cppcheck-2.14.2.tar.gz 3723248 BLAKE2B 551c783e13202f496b705602566799848b611bcc706f7a803c9ff530b3405db9e0b5294d2ce51ef5a4889e08c5b9d54c15d40a7ec6f4dc59333a7b6ed24b1f02 SHA512 8e90fa87845a083a4de66ec86edf707184a2293eb346fd79bfcafb73f93db049216472fcb2ab802ce529680f9708261ba3c26675c6fd9637e1dc83903bc44c4b
+DIST cppcheck-2.16.0.tar.gz 3845764 BLAKE2B f1945ec48774c6f2ebb566f649d3f931202b0270e133130ce8da6894be6cf1c8454f35fdc394fcbc2513206a8f899ce266cc1bd809455171050fe979117da2c3 SHA512 b224d4d62be1802c322f57a0674a01caecf3d034d36396d8375c302a518a6d5f0ca9160a2a94eaa33b498ff0bbd092785f0489abef30de8af446b5d381f44922
EBUILD cppcheck-2.14.2-r1.ebuild 2859 BLAKE2B 8ce5603c20534d73a2ae5134e9dcba0239332e20f0fa0fa23ad803ebefc1251eff2d8eb663b1090942104fc2d94cb7419f86732d26407aefbd5cd0e15ff097f7 SHA512 3e52198c062f802f0962921e2a8fd42c62778898a5d131702dbcc8dd9df5199200d8962cd600d93e13e82af657ee7f169bfeb191ab93c61501e5a07068435e06
-MISC metadata.xml 439 BLAKE2B 2fae88ef8445fcf382e68d615e7f9c4b41ce119785b9d3a8a3685297270043da641c8e454e40de2507f6e17a91846488e4dcb1a72e09e241287fb06cc531ae82 SHA512 64084c96f491b6f966d9b20409ec43a530280c01e29c2c531a43bb40d62263c7fb9e1c55079cddfe2eb437ffa6ca431a9dce758a5932c549bd8cb5850a8769c8
+EBUILD cppcheck-2.16.0.ebuild 2874 BLAKE2B 9fd1bb84726f155864dc2121183500615e4bdcf7ced2932a1c3ccea8df815107802313535c42439aefa6f3ab576f34786e564328fdacfee8ebf94e8d174bc318 SHA512 41c86d2cbd63de6871ddfd9a8a05843fb6ef8c1c32f0d38702314579abe13a1e37fe7f30092f7af7a4b1673bfa5e7cb8747f9d21c21cfef86a52350f612ecd10
+MISC metadata.xml 668 BLAKE2B da81419239f465fa6c33d05b660b99e2fbcd6c5ede59dc6ea6360a479a95732e41b49d67698e3b1e471a516e12627e004c3a7675e2811e862e17e2e1f66024d3 SHA512 d88d2d9cd484a5f9c0c146cab114349980587036e28693c5a825354c8b246dbb85aa1fd27303007ba7c425ae38db8a14f1ce5e7403f4b4710088d6aeefdbb26f
diff --git a/dev-util/cppcheck/cppcheck-2.16.0.ebuild b/dev-util/cppcheck/cppcheck-2.16.0.ebuild
new file mode 100644
index 000000000000..9181cb49aeca
--- /dev/null
+++ b/dev-util/cppcheck/cppcheck-2.16.0.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+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 htmlreport pcre test"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ charts? ( gui )
+"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+ dev-libs/tinyxml2:=
+ gui? (
+ dev-qt/qtbase:6[gui,widgets,network]
+ charts? ( dev-qt/qtcharts:6 )
+ )
+ pcre? ( dev-libs/libpcre )
+"
+DEPEND="${COMMON_DEPEND}
+ gui? ( dev-qt/qttools:6[assistant,linguist] )
+"
+RDEPEND="${COMMON_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? ( dev-qt/qttools:6[assistant,linguist] )
+ test? (
+ 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'|" test/tools/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 gui)
+ -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/metadata.xml b/dev-util/cppcheck/metadata.xml
index 4f3e5ddc6036..840088c7137c 100644
--- a/dev-util/cppcheck/metadata.xml
+++ b/dev-util/cppcheck/metadata.xml
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person" proxied="yes">
+ <email>davidroman96@gmail.com</email>
+ <name>David Roman</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<use>
<flag name="charts">Enable QtCharts usage in the GUI</flag>
<flag name="htmlreport">install cppcheck-htmlreport</flag>