From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 575D215812D for ; Tue, 31 Dec 2024 09:08:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D9616E07C5; Tue, 31 Dec 2024 09:08:46 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BA0E0E07C5 for ; Tue, 31 Dec 2024 09:08:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D581933C84E for ; Tue, 31 Dec 2024 09:08:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1DBC61993 for ; Tue, 31 Dec 2024 09:08:43 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1735636065.22cdc1bb67ee55324a3c463ca35150b2c262b9d0.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/cppcheck/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/cppcheck/cppcheck-2.14.2-r1.ebuild X-VCS-Directories: dev-util/cppcheck/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 22cdc1bb67ee55324a3c463ca35150b2c262b9d0 X-VCS-Branch: master Date: Tue, 31 Dec 2024 09:08:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4a4a29b0-49b8-4598-8cee-03f00bc5d658 X-Archives-Hash: fbf9a228450f59b729c70b125c51c841 commit: 22cdc1bb67ee55324a3c463ca35150b2c262b9d0 Author: Andreas Sturmlechner gentoo org> AuthorDate: Mon Dec 30 21:54:21 2024 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Tue Dec 31 09:07:45 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22cdc1bb dev-util/cppcheck: Drop IUSE qt6 Signed-off-by: Andreas Sturmlechner gentoo.org> dev-util/cppcheck/cppcheck-2.14.2-r1.ebuild | 132 ++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) diff --git a/dev-util/cppcheck/cppcheck-2.14.2-r1.ebuild b/dev-util/cppcheck/cppcheck-2.14.2-r1.ebuild new file mode 100644 index 000000000000..efa3e8721f9d --- /dev/null +++ b/dev-util/cppcheck/cppcheck-2.14.2-r1.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2024 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 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'|" 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 +}