diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-12-23 19:46:42 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-12-23 19:46:42 +0000 |
commit | 60360664173979c416f4acb44f2fb2368922742d (patch) | |
tree | 8776499f297aaa074d48bbb33c8c0c977aeb3b62 /dev-util/cppcheck | |
parent | ed8299fef4175104e66b734cfc0482770614f398 (diff) |
gentoo auto-resync : 23:12:2023 - 19:46:41
Diffstat (limited to 'dev-util/cppcheck')
-rw-r--r-- | dev-util/cppcheck/Manifest | 4 | ||||
-rw-r--r-- | dev-util/cppcheck/cppcheck-2.13.0.ebuild | 153 | ||||
-rw-r--r-- | dev-util/cppcheck/metadata.xml | 1 |
3 files changed, 157 insertions, 1 deletions
diff --git a/dev-util/cppcheck/Manifest b/dev-util/cppcheck/Manifest index 41944a7c5019..b8559ac0b9b8 100644 --- a/dev-util/cppcheck/Manifest +++ b/dev-util/cppcheck/Manifest @@ -1,3 +1,5 @@ +DIST cppcheck-2.13.0.tar.gz 3643744 BLAKE2B 942391bdc2ad009e1bf9f691835c268b33ae0a7c84ff68a1ea7985abbc65fc7ea6e319111ed6a968f4f93f3b682ce46447ba1e3b1fccd96535497f3fd190b913 SHA512 35f266cd247860aa0a0d84862faf4561f4efea096e641a01ebc3b1e4cea14c91c75773344da5bd3d48101c11ee7841b46f24419a9583e65bd242d0219a1ca418 DIST cppcheck-2.9.tar.gz 3916529 BLAKE2B 5d75328e1fcd389376630502ad7427d3473392a9467e8731e6cd7c2c6349efccc05eddd7eca4cb361930661d2383a8d316e33bd3609b9333a710153d199e326d SHA512 69204a7ceac087470201482894e6422b99d0849f08641e80b2e341c9d164a1d2095e3a08a1fba2e9fa681783d07fe7277b30ea0cc0bf582431b5d13ab2f58c1f +EBUILD cppcheck-2.13.0.ebuild 3119 BLAKE2B ad03c294e91bf4aff0d089401beb11cdaf8e90aa669bce868d20a5917f2454ab4d4740e48add9873dacf709b00e9944f37f5c9659e1c138df22406d052a14f55 SHA512 b76f6e93d312833f5f6d6cae27ba550c30f7e457dd67231d49ede366465701f3b2dcd7e01f3c4f7916ccd816600b569834d0cd9d31b5be0a2ad387f8a38f455b EBUILD cppcheck-2.9.ebuild 2381 BLAKE2B 9c9bb8285c57d9ba95ecc474795f707608b56b68944666a2995fd73093905fb9ca3775c3d4bd230bd89d0b95fa9138fa402178a306897caeeca1d2c255e6a0ef SHA512 18d8f5a03658cf6a9bb8d7feef333b0bd4fb86059780cc6c0e7838bf73a0f2826719a3bd223f291b819bfe496b1d3b1927531c3d069f094dba51edc01a631aa4 -MISC metadata.xml 457 BLAKE2B ab65f0ea3c57af8c6aa7fd0b127f55d8e67b1661506544a2417ce4cda0d9d523e7cb7b938f9c128ae84941f4b361763edd3424af81285588dc78d662d8d6e10b SHA512 23d4e6bb07e4c37094aa86e5dceeb2dceda0e7e4540745a87eb4af90c4aee9f5026876f8956101a505c55652abbf822e06b63815cf9b3d4e72afc771861b2f06 +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 new file mode 100644 index 000000000000..2499d53d7a92 --- /dev/null +++ b/dev-util/cppcheck/cppcheck-2.13.0.ebuild @@ -0,0 +1,153 @@ +# Copyright 1999-2023 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 threads" +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 dockbook 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 + + -DUSE_THREADS=$(usex threads) + -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 ea77ce88576d..4e56958744c0 100644 --- a/dev-util/cppcheck/metadata.xml +++ b/dev-util/cppcheck/metadata.xml @@ -6,6 +6,7 @@ <name>Matthias Maier</name> </maintainer> <use> + <flag name="charts">Enable QtCharts usage in the GUI</flag> <flag name="htmlreport">install cppcheck-htmlreport</flag> </use> <upstream> |