diff options
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/cppcheck/Manifest | 2 | ||||
-rw-r--r-- | dev-util/cppcheck/cppcheck-2.3.ebuild | 81 |
2 files changed, 83 insertions, 0 deletions
diff --git a/dev-util/cppcheck/Manifest b/dev-util/cppcheck/Manifest new file mode 100644 index 0000000..aef9c38 --- /dev/null +++ b/dev-util/cppcheck/Manifest @@ -0,0 +1,2 @@ +DIST cppcheck-2.3.tar.gz 3594620 BLAKE2B 6e8d67ea877a9e5ec89338c590bde9e0d1df5d93b0efd75a170e02a98c2c7e93ddbc6373d6aff4baaabc54091a689d695bcecbf89925782d25aba11d506dac3c SHA512 1da7985e1b0636a4cd2c85c07fcb0ca938445ae1d0a7543d059a1851125cb263053d4fe41f38a469d5a3c5c9eb0092b527b1d07ac6aa71e3b83ab1482a2a1007 +EBUILD cppcheck-2.3.ebuild 1694 BLAKE2B c7b9dd90f726c5a3c32117dca45a622a16b62f309f89ac6279197af147041f1e764eb4ed5faa0797740578f30f3b929a384d98804c036d913719c2abfc696d27 SHA512 c270a625d2bff5055d3d9a4e5f9b01372abf1728abb4c09ad13cece3bd352b89b0bc187249c1468836930e6dfeaf7f79ad35b39957e4ba681f8dc721b45390a4 diff --git a/dev-util/cppcheck/cppcheck-2.3.ebuild b/dev-util/cppcheck/cppcheck-2.3.ebuild new file mode 100644 index 0000000..73ad7d5 --- /dev/null +++ b/dev-util/cppcheck/cppcheck-2.3.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{3_6,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/${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:5 + dev-qt/qtprintsupport:5 + ) +" +DEPEND="${RDEPEND} + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + virtual/pkgconfig + z3? ( sci-mathematics/z3 ) +" + +src_prepare() { + cmake_src_prepare +} + +src_configure() { + + local mycmakeargs=( + -DHAVE_RULES="$(usex pcre)" + -DBUILD_GUI="$(usex qt5)" + -DUSE_Z3="$(usex z3)" + -DFILESDIR="/usr/share/${PN}/" + -ENABLE_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="/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 +} |