summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-util/kcov/Manifest1
-rw-r--r--dev-util/kcov/kcov-43.ebuild84
-rw-r--r--dev-util/kcov/kcov-9999.ebuild79
-rw-r--r--dev-util/kcov/metadata.xml43
4 files changed, 186 insertions, 21 deletions
diff --git a/dev-util/kcov/Manifest b/dev-util/kcov/Manifest
index 25bab65fba44..47b81bac6c6c 100644
--- a/dev-util/kcov/Manifest
+++ b/dev-util/kcov/Manifest
@@ -1 +1,2 @@
DIST kcov-40.tar.gz 311012 BLAKE2B 19b3cf681fe3c722fde116f454e1760ddd1e54db6fcecc05eca3ec585524fa7d1f7af3ea237943c8a68a81384567205ea443d1542ec380621d35a6f3e3dc667e SHA512 5abe1dd94fbe93fe73d658840593781216b8562a87d010a94d4520e29dd4d537e167de64b7f535347f894c68d5d8b9974ee4b9fd2cebf9291bac4ddbb9ac7cff
+DIST kcov-43.tar.gz 259022 BLAKE2B 7d6da38ec93f6e7904372b0917ce86e544cd9abcaff4d21354b7c5cc40c91be37c62bbedbc7fcc449ec24fa8815503c0ed355996eef9721aab0a65ed9a1c203e SHA512 11158c63a4eb5fdb34b4787c135e3c8db60e6d3292fc109fcfb43e6dab30c6c4310b09c6d94614556eb005792bab235c6cd839c585c3a98f5700c4ee4d317aca
diff --git a/dev-util/kcov/kcov-43.ebuild b/dev-util/kcov/kcov-43.ebuild
new file mode 100644
index 000000000000..2c1f929f9a7a
--- /dev/null
+++ b/dev-util/kcov/kcov-43.ebuild
@@ -0,0 +1,84 @@
+# 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}"
+
+DOCS=(
+ doc/
+ CONTRIBUTING.md
+ INSTALL.md
+ README.md
+)
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ if use test; then
+ sed -Ei "/skip_python2/ s/= .+/= True/" tests/tools/test_python.py \
+ || die
+
+ echo "add_subdirectory (tests)" >> CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=( -DKCOV_INSTALL_DOCDIR:PATH="share/doc/${PF}" )
+
+ cmake_src_configure
+}
+
+src_test() {
+ PYTHONPATH="${S}/tests/tools" edo python3 -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 acf228ac0b9d..2c1f929f9a7a 100644
--- a/dev-util/kcov/kcov-9999.ebuild
+++ b/dev-util/kcov/kcov-9999.ebuild
@@ -4,40 +4,81 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake python-any-r1
+
+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}"
-BDEPEND="${PYTHON_DEPS}"
+"
-PATCHES=(
- "${FILESDIR}"/${P}-binutils-2.39.patch
- "${FILESDIR}"/${P}-gcc-13.patch
+BDEPEND="test? ( ${PYTHON_DEPS} )"
+RDEPEND="${DEPEND}"
+
+DOCS=(
+ doc/
+ CONTRIBUTING.md
+ INSTALL.md
+ README.md
)
-src_configure() {
- local mycmakeargs=(
- -DCMAKE_DISABLE_FIND_PACKAGE_Bfd=$(usex !binutils)
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ cmake_src_prepare
- -DKCOV_INSTALL_DOCDIR=share/doc/${PF}
- )
+ if use test; then
+ sed -Ei "/skip_python2/ s/= .+/= True/" tests/tools/test_python.py \
+ || die
+
+ echo "add_subdirectory (tests)" >> CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=( -DKCOV_INSTALL_DOCDIR:PATH="share/doc/${PF}" )
cmake_src_configure
}
+
+src_test() {
+ PYTHONPATH="${S}/tests/tools" edo python3 -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>