diff options
Diffstat (limited to 'dev-util/kcov')
-rw-r--r-- | dev-util/kcov/Manifest | 9 | ||||
-rw-r--r-- | dev-util/kcov/files/kcov-remove-failing-test-conflicting-with-sandbox.patch | 51 | ||||
-rw-r--r-- | dev-util/kcov/kcov-40.ebuild | 4 | ||||
-rw-r--r-- | dev-util/kcov/kcov-43.ebuild | 90 | ||||
-rw-r--r-- | dev-util/kcov/kcov-9999.ebuild | 86 | ||||
-rw-r--r-- | dev-util/kcov/metadata.xml | 43 |
6 files changed, 260 insertions, 23 deletions
diff --git a/dev-util/kcov/Manifest b/dev-util/kcov/Manifest index ff4121550aef..9467e93567ed 100644 --- a/dev-util/kcov/Manifest +++ b/dev-util/kcov/Manifest @@ -1,6 +1,9 @@ AUX kcov-40-binutils-2.39.patch 3139 BLAKE2B 4a296c2b964913df11d4b01a1a0bb732c7d83e83f12fe91837574f4b11df0d28463329430bac2ebc47a47637d068a7711dfaeeb38222e9bdaae954da6004e8c6 SHA512 219c1ec491c3718ebd81601b0680b1adaa86929e331f5827491dee6ed9cedd2f171f59812d97860d0aff53d6b6509382ca9192009f0cba3daac0beacea3185f3 AUX kcov-40-gcc-13.patch 1219 BLAKE2B 2f0f84e4b468a6ca639f217aa0199bba1e4c516cf02c87839c94436f960f0c14dc11f1396193f0ee3658c8984103f4c249dc99272429f8bf6a1b82f643a55a74 SHA512 ccbd84da7fcda5c373a520c1bc1e7fa68c2db688733d928c01b62c83c24c52c91b333658137783d66db6282d799a7dbd283222931fd0819653fa34e657a879b5 +AUX kcov-remove-failing-test-conflicting-with-sandbox.patch 1810 BLAKE2B 08732ac5145a3426e8748ca0a4f80553ea9968869d8f26dfa86f9937eda2c78abd7291dfc9cd70af39bc29f4cfa0bd46566fc17e6e3fa16598c252e3a1dcdd62 SHA512 f066186f9e74bbfc05b9e30dcc95ecce1d4864498cc3bfe481dfd304dc8db8888d436a598115182d7b7c0e133f5dfd7a6bf5026136deae02d0faafff38181bb1 DIST kcov-40.tar.gz 311012 BLAKE2B 19b3cf681fe3c722fde116f454e1760ddd1e54db6fcecc05eca3ec585524fa7d1f7af3ea237943c8a68a81384567205ea443d1542ec380621d35a6f3e3dc667e SHA512 5abe1dd94fbe93fe73d658840593781216b8562a87d010a94d4520e29dd4d537e167de64b7f535347f894c68d5d8b9974ee4b9fd2cebf9291bac4ddbb9ac7cff -EBUILD kcov-40.ebuild 968 BLAKE2B fc49f85486a76099d130e3e652d8a0c9891c2d2c4aaa9b5a4e825a449a988e9871879f78858e9ec54ef756b4c804745df92278b4fbb6fd7db3ebb60a096abe60 SHA512 456bda718e6d4f61a7e1078816cd472fa63bdffab94414a792f5c41cc0fa65949dd504a322b1c4e233840cebce3b4518e943772e7d7ee6ebab132f61597147da -EBUILD kcov-9999.ebuild 810 BLAKE2B 909304207d86faefa228d004256f4ad2cd377a997bb9f8fe2c5efd7a8ea4fb9d67cfee54daa1caa860fb5d612edd6feb1ed8763f6b5e38f93afc4827e6510f39 SHA512 a8a00d4cbec51b1365f19b0acc2b7827bbcca9055899072962cabb4a3711f60e322c12cbcef2245299cc918a70d52a59c5553d20124d32a5e41bc9d2904dca60 -MISC metadata.xml 356 BLAKE2B 515935715197c175b5b3a465d58b4eaf433ae23f4d884f3d6e2796662d1f9e0eb507955ff591844b18df76f3422f01ebc73163d17f67d500f8d8560ec862b8fd SHA512 7bcd02ba7e6b3da5207d72f3985fb0ac1fdfe4a8dfc93c74d970137e603dc2626398fc2e145c8c250e28eaa0678ff671cb4f3b3ee4b74807935c19d76d0b5d9d +DIST kcov-43.tar.gz 259022 BLAKE2B 7d6da38ec93f6e7904372b0917ce86e544cd9abcaff4d21354b7c5cc40c91be37c62bbedbc7fcc449ec24fa8815503c0ed355996eef9721aab0a65ed9a1c203e SHA512 11158c63a4eb5fdb34b4787c135e3c8db60e6d3292fc109fcfb43e6dab30c6c4310b09c6d94614556eb005792bab235c6cd839c585c3a98f5700c4ee4d317aca +EBUILD kcov-40.ebuild 970 BLAKE2B 2da5d519acac1726935da68c36603e243c7cc999240831b6bd3a443685aed1edc7fad011b9f9ac2b73ca1c1b2e59182332fc16a16c9f09811f81225b1bade9c0 SHA512 ad031e9551a992ab4d9e84eb74a4cf443a8bea9a01ab9759113f5ded00da3f90384a802f15a90415bc56dab90a9c01ea5753020d19a2380f038771a542087036 +EBUILD kcov-43.ebuild 1792 BLAKE2B a01b4e537cbcd0dd07e5379a05dae8c1bb4ad695274e5646954731109fd8f453b4d17c93723ebaec15d1b12b13689c923912d967f149a1b2cad9c20955a76c35 SHA512 1460ab86b7be335b1aa3e7c5a1b77fca772b50a8c4a74cec0c97f1781a26f59b4a4fc2050b7573d566fce29dada6edf25593ca89f776e55d429dae72b0599430 +EBUILD kcov-9999.ebuild 1792 BLAKE2B a01b4e537cbcd0dd07e5379a05dae8c1bb4ad695274e5646954731109fd8f453b4d17c93723ebaec15d1b12b13689c923912d967f149a1b2cad9c20955a76c35 SHA512 1460ab86b7be335b1aa3e7c5a1b77fca772b50a8c4a74cec0c97f1781a26f59b4a4fc2050b7573d566fce29dada6edf25593ca89f776e55d429dae72b0599430 +MISC metadata.xml 2090 BLAKE2B c25cc30ffb3d25dea54a03b831e547548d9767fd28c20a5b06c3bbf8bf68504d97c426c6fc3ad644622a73682987951e85486aabb25e09d34c4bfe3a1db04ec7 SHA512 2fc8bce2a29321a12e59ecf91f2d5c2c024016e306fabbe1cb6e75d7301832e7627ef814d1fe0dd04a9bc7a533c96bd2078f309e1276b038425016360e829f68 diff --git a/dev-util/kcov/files/kcov-remove-failing-test-conflicting-with-sandbox.patch b/dev-util/kcov/files/kcov-remove-failing-test-conflicting-with-sandbox.patch new file mode 100644 index 000000000000..8229d30be52e --- /dev/null +++ b/dev-util/kcov/files/kcov-remove-failing-test-conflicting-with-sandbox.patch @@ -0,0 +1,51 @@ +From c3c89cfca876b9c56586afc374ea92a7b25998c3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Matt=C3=A9o=20Rossillol=E2=80=91=E2=80=91Laruelle?= + <beatussum@protonmail.com> +Date: Sun, 18 Aug 2024 15:18:19 +0200 +Subject: [PATCH] remove failing test conflicting with sandbox +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +sys-apps/sandbox is based on `LD_PRELOAD`; however, +`--bash-handle-sh-invocation` uses it too. This option seems to conflict with +the sandbox environment and the associated test fails fails. + +Indeed, according to the Kcov man page, this option handles "invocations of +/bin/sh scripts via using a LD_PRELOADed library that replaces execve (i.e., +/bin/sh is executed as /bin/bash)". + +Signed-off-by: Mattéo Rossillol‑‑Laruelle <beatussum@protonmail.com> +--- + tests/tools/test_bash_linux_only.py | 15 --------------- + 1 file changed, 15 deletions(-) + +diff --git a/tests/tools/test_bash_linux_only.py b/tests/tools/test_bash_linux_only.py +index d0a46bb..87022e0 100644 +--- a/tests/tools/test_bash_linux_only.py ++++ b/tests/tools/test_bash_linux_only.py +@@ -2,21 +2,6 @@ import libkcov + from libkcov import cobertura + + +-class bash_sh_shebang(libkcov.TestCase): +- def runTest(self): +- rv, o = self.do( +- self.kcov +- + " --bash-handle-sh-invocation " +- + self.outbase +- + "/kcov " +- + self.sources +- + "/tests/bash/shell-main" +- ) +- +- dom = cobertura.parseFile(self.outbase + "/kcov/shell-main/cobertura.xml") +- assert cobertura.hitsPerLine(dom, "sh-shebang.sh", 4) == 1 +- +- + class bash_exit_before_child(libkcov.TestCase): + def runTest(self): + # kcovKcov shouldn't wait for the background process, so call it with kcovKcov = False +-- +2.44.2 + diff --git a/dev-util/kcov/kcov-40.ebuild b/dev-util/kcov/kcov-40.ebuild index ea93aa899477..acf228ac0b9d 100644 --- a/dev-util/kcov/kcov-40.ebuild +++ b/dev-util/kcov/kcov-40.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{9,10} ) +PYTHON_COMPAT=( python3_{10..12} ) inherit cmake python-any-r1 DESCRIPTION="Kcov is a code coverage tester for compiled languages, Python and Bash" diff --git a/dev-util/kcov/kcov-43.ebuild b/dev-util/kcov/kcov-43.ebuild new file mode 100644 index 000000000000..32f6b0358b92 --- /dev/null +++ b/dev-util/kcov/kcov-43.ebuild @@ -0,0 +1,90 @@ +# 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 edo python-any-r1 + +DESCRIPTION="Kcov is a code coverage tester for compiled languages, Python and Bash" +HOMEPAGE="https://github.com/SimonKagstrom/kcov/" + +if [[ "${PV}" = 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/SimonKagstrom/kcov.git" +else + SRC_URI="https://github.com/SimonKagstrom/kcov/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2 MIT" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND=" + dev-libs/elfutils + dev-libs/libunistring:= + dev-libs/openssl:= + net-dns/c-ares:= + net-dns/libidn2:= + net-libs/libpsl + net-misc/curl + net-libs/nghttp2:= + sys-libs/binutils-libs:= + sys-libs/zlib +" + +BDEPEND="test? ( ${PYTHON_DEPS} )" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-remove-failing-test-conflicting-with-sandbox.patch" +) + +DOCS=( + doc/ + CONTRIBUTING.md + INSTALL.md + README.md +) + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_prepare() { + if use test; then + sed -Ei "/skip_python2/ s/= .+/= True/" tests/tools/test_python.py \ + || die "Cannot disable Python 2 tests" + + cat <<- EOF >> CMakeLists.txt || die "Cannot enable test building" + add_compile_options (-g) + add_subdirectory (tests) + EOF + fi + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( -DKCOV_INSTALL_DOCDIR:PATH="share/doc/${PF}" ) + cmake_src_configure +} + +src_test() { + PYTHONPATH="${S}/tests/tools" edo "${PYTHON}" -m libkcov \ + -v \ + "${BUILD_DIR}/src/kcov" \ + "${T}" \ + "${BUILD_DIR}/tests" \ + "${S}" +} + +src_install() { + cmake_src_install + + rm "${ED}/usr/share/doc/${PF}/doc"/{CMakeLists.txt,kcov.1} || die + rm "${ED}/usr/share/doc/${PF}"/COPYING* || die +} diff --git a/dev-util/kcov/kcov-9999.ebuild b/dev-util/kcov/kcov-9999.ebuild index 201ab239e41c..32f6b0358b92 100644 --- a/dev-util/kcov/kcov-9999.ebuild +++ b/dev-util/kcov/kcov-9999.ebuild @@ -1,36 +1,90 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit cmake +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake edo python-any-r1 DESCRIPTION="Kcov is a code coverage tester for compiled languages, Python and Bash" -HOMEPAGE="https://github.com/SimonKagstrom/kcov" -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://github.com/SimonKagstrom/${PN}.git" +HOMEPAGE="https://github.com/SimonKagstrom/kcov/" + +if [[ "${PV}" = 9999 ]]; then inherit git-r3 + EGIT_REPO_URI="https://github.com/SimonKagstrom/kcov.git" else - SRC_URI="https://github.com/SimonKagstrom/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + SRC_URI="https://github.com/SimonKagstrom/kcov/archive/v${PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="~amd64 ~x86" fi -LICENSE="GPL-2" +LICENSE="GPL-2 MIT" SLOT="0" -IUSE="+binutils" +IUSE="test" +RESTRICT="!test? ( test )" -RDEPEND="dev-libs/elfutils +DEPEND=" + dev-libs/elfutils + dev-libs/libunistring:= + dev-libs/openssl:= + net-dns/c-ares:= + net-dns/libidn2:= + net-libs/libpsl net-misc/curl + net-libs/nghttp2:= + sys-libs/binutils-libs:= sys-libs/zlib - binutils? ( sys-libs/binutils-libs:= )" -DEPEND="${RDEPEND}" +" -src_configure() { - local mycmakeargs=( - -DCMAKE_DISABLE_FIND_PACKAGE_Bfd=$(usex !binutils) +BDEPEND="test? ( ${PYTHON_DEPS} )" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-remove-failing-test-conflicting-with-sandbox.patch" +) + +DOCS=( + doc/ + CONTRIBUTING.md + INSTALL.md + README.md +) + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_prepare() { + if use test; then + sed -Ei "/skip_python2/ s/= .+/= True/" tests/tools/test_python.py \ + || die "Cannot disable Python 2 tests" - -DKCOV_INSTALL_DOCDIR=share/doc/${PF} - ) + cat <<- EOF >> CMakeLists.txt || die "Cannot enable test building" + add_compile_options (-g) + add_subdirectory (tests) + EOF + fi + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( -DKCOV_INSTALL_DOCDIR:PATH="share/doc/${PF}" ) cmake_src_configure } + +src_test() { + PYTHONPATH="${S}/tests/tools" edo "${PYTHON}" -m libkcov \ + -v \ + "${BUILD_DIR}/src/kcov" \ + "${T}" \ + "${BUILD_DIR}/tests" \ + "${S}" +} + +src_install() { + cmake_src_install + + rm "${ED}/usr/share/doc/${PF}/doc"/{CMakeLists.txt,kcov.1} || die + rm "${ED}/usr/share/doc/${PF}"/COPYING* || die +} diff --git a/dev-util/kcov/metadata.xml b/dev-util/kcov/metadata.xml index 5a02da613ff9..57ed59414176 100644 --- a/dev-util/kcov/metadata.xml +++ b/dev-util/kcov/metadata.xml @@ -1,11 +1,50 @@ <?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>beatussum@protonmail.com</email> + <name>Mattéo Rossillol‑‑Laruelle</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription> + <pkg>dev-util/kcov</pkg> is a FreeBSD/Linux/Mac OS code coverage + tester for compiled languages, Python and Bash. + <pkg>dev-util/kcov</pkg> was originally a fork of Bcov, but has + since evolved to support a large feature set in addition to that + of Bcov. + + <pkg>dev-util/kcov</pkg>, like Bcov, uses DWARF debugging + information for compiled programs to make it possible to collect + coverage information without special compiler switches. + </longdescription> + <longdescription lang="fr"> + <pkg>dev-util/kcov</pkg> est un testeur de couverture de code + FreeBSD/Linux/Mac OS pour des langages compilés, Python et Bash. + <pkg>dev-util/kcov</pkg> est, à l'origine, un fork de Bcov, mais + a depuis évolué de manière à supporter un vaste nombre de + fonctionnalités en addition de celle Bcov. + + <pkg>dev-util/kcov</pkg>, comme Bcov, utilise les informations + de débogage DWARF pour les langages compilés afin de permettre + la collecte d'information de couverture sans variations d'un + compilateur à l'autre. + </longdescription> <use> - <flag name="binutils">Use <pkg>sys-libs/binutils-libs</pkg> for --verify support</flag> + <flag name="binutils">Use <pkg>sys-libs/binutils-libs</pkg> for `--verify` support</flag> + </use> + <use lang="fr"> + <flag name="binutils">Utiliser <pkg>sys-libs/binutils-libs</pkg> pour le support de `--verify`</flag> </use> <upstream> + <maintainer status="active"> + <name>Simon Kågström</name> + <email>simon.kagstrom@gmail.com</email> + </maintainer> + <changelog>https://raw.githubusercontent.com/SimonKagstrom/kcov/master/ChangeLog</changelog> + <bugs-to>https://github.com/SimonKagstrom/kcov/issues/</bugs-to> <remote-id type="github">SimonKagstrom/kcov</remote-id> </upstream> </pkgmetadata> |