summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-01-02 03:05:44 +0000
committerSam James <sam@gentoo.org>2022-01-02 03:05:44 +0000
commit2c867b567af37699c47e9d2adc4eb4a05888ff6e (patch)
tree8f4615ecc3c904b398e8fa595419ddd1f2e96f57 /dev-util/cppcheck
parentsys-cluster/openmpi: add upstream patch for build failure (diff)
downloadgentoo-2c867b567af37699c47e9d2adc4eb4a05888ff6e.tar.gz
gentoo-2c867b567af37699c47e9d2adc4eb4a05888ff6e.tar.bz2
gentoo-2c867b567af37699c47e9d2adc4eb4a05888ff6e.zip
dev-util/cppcheck: add 2.6.3
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/cppcheck')
-rw-r--r--dev-util/cppcheck/Manifest1
-rw-r--r--dev-util/cppcheck/cppcheck-2.6.3.ebuild107
2 files changed, 108 insertions, 0 deletions
diff --git a/dev-util/cppcheck/Manifest b/dev-util/cppcheck/Manifest
index 5c54697dc489..c3816799c806 100644
--- a/dev-util/cppcheck/Manifest
+++ b/dev-util/cppcheck/Manifest
@@ -1,2 +1,3 @@
DIST cppcheck-2.4.1.tar.gz 3761646 BLAKE2B 4c791088621f989e2529c92de38a73676fc3394e8cac72822596f7a75594283d0983693d693aa903a3ffb80bc0e1e20e71b55db5682d4d01c135ed77b2fc2e3c SHA512 8fb1ed5faa0071fc69405b7eb5b41e9f94b77d097158ea0d4f5e4da8a5087b9d1ab7bf37f8dc73d00096d3d2494aeb431af8029f0d4f1e2085f5b9b72bdc2d09
DIST cppcheck-2.6.2.tar.gz 3880239 BLAKE2B 63abba752ed0e4bef1bf7be4eb3f1a0dfcd1bab286db41e7fd787969674f59354f1c2a0b4477bb1d0cc7ca71306bc6a3375cebade1c60416a21010f7b313d20c SHA512 f1b1b0d6d46712147984bf907519eaaef04b41f02979d371d836aa8668fbdaa0f18b503a76d809abcedf9a0e7b7666be910714ca411d289aa921d0204585f47f
+DIST cppcheck-2.6.3.tar.gz 3880340 BLAKE2B ef83538a0aa867dd0c0bd6165b41921335256ed0372a4990ad85151ab5e87a79bde7958be43887f07a4bbf372b9992339b75ddeae7ed8ea767b83c028dfc56db SHA512 e59b4b4659c2b4fa2c16dcb548f7ee3027555dddc289ef8b54fe186af0396b6f7caa23d91bf1142ece62908b56fe9f5ba013191817322815681994093310fb37
diff --git a/dev-util/cppcheck/cppcheck-2.6.3.ebuild b/dev-util/cppcheck/cppcheck-2.6.3.ebuild
new file mode 100644
index 000000000000..41433724c99b
--- /dev/null
+++ b/dev-util/cppcheck/cppcheck-2.6.3.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+DISTUTILS_USE_SETUPTOOLS=manual
+inherit distutils-r1 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 test +z3"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/tinyxml2:=
+ htmlreport? (
+ dev-python/pygments[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )
+ pcre? ( dev-libs/libpcre )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qthelp
+ dev-qt/qtprintsupport:5
+ )
+ z3? ( sci-mathematics/z3 )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ virtual/pkgconfig
+ qt5? ( dev-qt/linguist-tools:5 )
+ test? (
+ htmlreport? ( dev-python/unittest-or-fail[${PYTHON_USEDEP}] )
+ )
+"
+
+src_prepare() {
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DHAVE_RULES="$(usex pcre)"
+ -DBUILD_GUI="$(usex qt5)"
+ -DUSE_Z3="$(usex z3)"
+ -DFILESDIR="${EPREFIX}/usr/share/${PN}/"
+ -DENABLE_OSS_FUZZ=OFF
+ -DUSE_BUNDLED_TINYXML2=OFF
+ -DBUILD_TESTS="$(usex test)"
+ )
+
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+
+ if use htmlreport ; then
+ pushd htmlreport || die
+ distutils-r1_src_compile
+ popd || die
+ fi
+}
+
+src_test() {
+ cmake_src_test
+
+ # TODO: Needs some hackery to find the right binary
+ #if use htmlreport ; then
+ # distutils-r1_src_test
+ #fi
+}
+
+python_test() {
+ pushd htmlreport || die
+ eunittest
+ popd || die
+}
+
+src_install() {
+ cmake_src_install
+
+ 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
+ fi
+
+ dodoc -r tools/triage
+}