Skip to content

Commit 60338f5

Browse files
committed
dev-util/kcov: new package, add 43, 9999
Signed-off-by: Mattéo Rossillol‑‑Laruelle <[email protected]>
1 parent 3e52d23 commit 60338f5

File tree

4 files changed

+209
-0
lines changed

4 files changed

+209
-0
lines changed

dev-util/kcov/Manifest

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DIST kcov-43.tar.gz 259022 BLAKE2B 7d6da38ec93f6e7904372b0917ce86e544cd9abcaff4d21354b7c5cc40c91be37c62bbedbc7fcc449ec24fa8815503c0ed355996eef9721aab0a65ed9a1c203e SHA512 11158c63a4eb5fdb34b4787c135e3c8db60e6d3292fc109fcfb43e6dab30c6c4310b09c6d94614556eb005792bab235c6cd839c585c3a98f5700c4ee4d317aca

dev-util/kcov/kcov-43.ebuild

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Copyright 1999-2024 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
PYTHON_COMPAT=( python3_{9..13} )
7+
8+
inherit cmake edo python-any-r1
9+
10+
DESCRIPTION="Kcov is a code coverage tester for compiled languages, Python and Bash"
11+
HOMEPAGE="https://github.com/SimonKagstrom/kcov/"
12+
13+
if [[ "${PV}" = 9999 ]]; then
14+
inherit git-r3
15+
EGIT_REPO_URI="https://github.com/SimonKagstrom/kcov.git"
16+
else
17+
SRC_URI="https://github.com/SimonKagstrom/kcov/archive/v${PV}.tar.gz -> ${P}.tar.gz"
18+
KEYWORDS="~amd64"
19+
fi
20+
21+
LICENSE="GPL-2 MIT"
22+
SLOT="0"
23+
IUSE="test"
24+
RESTRICT="!test? ( test )"
25+
26+
DEPEND="
27+
dev-libs/elfutils
28+
dev-libs/libunistring:=
29+
dev-libs/openssl:=
30+
net-dns/c-ares:=
31+
net-dns/libidn2:=
32+
net-libs/libpsl
33+
net-misc/curl
34+
net-libs/nghttp2:=
35+
sys-libs/binutils-libs:=
36+
sys-libs/zlib:=
37+
"
38+
39+
BDEPEND="test? ( ${PYTHON_DEPS} )"
40+
RDEPEND="${DEPEND}"
41+
42+
DOCS=(
43+
doc/
44+
CONTRIBUTING.md
45+
INSTALL.md
46+
README.md
47+
)
48+
49+
pkg_setup() {
50+
use test && python-any-r1_pkg_setup
51+
}
52+
53+
src_prepare() {
54+
cmake_src_prepare
55+
56+
if use test; then
57+
sed -Ei "/skip_python2/ s/= .+/= True/" tests/tools/test_python.py \
58+
|| die
59+
60+
echo "add_subdirectory (tests)" >> CMakeLists.txt || die
61+
fi
62+
}
63+
64+
src_configure() {
65+
local mycmakeargs=( -DKCOV_INSTALL_DOCDIR:PATH="share/doc/${PF}" )
66+
67+
cmake_src_configure
68+
}
69+
70+
src_test() {
71+
PYTHONPATH="${S}/tests/tools" edo python3 -m libkcov \
72+
-v \
73+
"${BUILD_DIR}/src/kcov" \
74+
"${T}" \
75+
"${BUILD_DIR}/tests" \
76+
"${S}"
77+
}
78+
79+
src_install() {
80+
cmake_src_install
81+
82+
rm "${ED}/usr/share/doc/${PF}/doc"/{CMakeLists.txt,kcov.1} || die
83+
rm "${ED}/usr/share/doc/${PF}"/COPYING* || die
84+
}

dev-util/kcov/kcov-9999.ebuild

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Copyright 1999-2024 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
PYTHON_COMPAT=( python3_{9..13} )
7+
8+
inherit cmake edo python-any-r1
9+
10+
DESCRIPTION="Kcov is a code coverage tester for compiled languages, Python and Bash"
11+
HOMEPAGE="https://github.com/SimonKagstrom/kcov/"
12+
13+
if [[ "${PV}" = 9999 ]]; then
14+
inherit git-r3
15+
EGIT_REPO_URI="https://github.com/SimonKagstrom/kcov.git"
16+
else
17+
SRC_URI="https://github.com/SimonKagstrom/kcov/archive/v${PV}.tar.gz -> ${P}.tar.gz"
18+
KEYWORDS="~amd64"
19+
fi
20+
21+
LICENSE="GPL-2 MIT"
22+
SLOT="0"
23+
IUSE="test"
24+
RESTRICT="!test? ( test )"
25+
26+
DEPEND="
27+
dev-libs/elfutils
28+
dev-libs/libunistring:=
29+
dev-libs/openssl:=
30+
net-dns/c-ares:=
31+
net-dns/libidn2:=
32+
net-libs/libpsl
33+
net-misc/curl
34+
net-libs/nghttp2:=
35+
sys-libs/binutils-libs:=
36+
sys-libs/zlib:=
37+
"
38+
39+
BDEPEND="test? ( ${PYTHON_DEPS} )"
40+
RDEPEND="${DEPEND}"
41+
42+
DOCS=(
43+
doc/
44+
CONTRIBUTING.md
45+
INSTALL.md
46+
README.md
47+
)
48+
49+
pkg_setup() {
50+
use test && python-any-r1_pkg_setup
51+
}
52+
53+
src_prepare() {
54+
cmake_src_prepare
55+
56+
if use test; then
57+
sed -Ei "/skip_python2/ s/= .+/= True/" tests/tools/test_python.py \
58+
|| die
59+
60+
echo "add_subdirectory (tests)" >> CMakeLists.txt || die
61+
fi
62+
}
63+
64+
src_configure() {
65+
local mycmakeargs=( -DKCOV_INSTALL_DOCDIR:PATH="share/doc/${PF}" )
66+
67+
cmake_src_configure
68+
}
69+
70+
src_test() {
71+
PYTHONPATH="${S}/tests/tools" edo python3 -m libkcov \
72+
-v \
73+
"${BUILD_DIR}/src/kcov" \
74+
"${T}" \
75+
"${BUILD_DIR}/tests" \
76+
"${S}"
77+
}
78+
79+
src_install() {
80+
cmake_src_install
81+
82+
rm "${ED}/usr/share/doc/${PF}/doc"/{CMakeLists.txt,kcov.1} || die
83+
rm "${ED}/usr/share/doc/${PF}"/COPYING* || die
84+
}

dev-util/kcov/metadata.xml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
3+
<pkgmetadata>
4+
<maintainer type="person" proxied="yes">
5+
<email>[email protected]</email>
6+
<name>Mattéo Rossillol‑‑Laruelle</name>
7+
</maintainer>
8+
<longdescription>
9+
<pkg>dev-util/kcov</pkg> is a FreeBSD/Linux/Mac OS code coverage
10+
tester for compiled languages, Python and Bash.
11+
<pkg>dev-util/kcov</pkg> was originally a fork of Bcov, but has
12+
since evolved to support a large feature set in addition to that
13+
of Bcov.
14+
15+
<pkg>dev-util/kcov</pkg>, like Bcov, uses DWARF debugging
16+
information for compiled programs to make it possible to collect
17+
coverage information without special compiler switches.
18+
</longdescription>
19+
<longdescription lang="fr">
20+
<pkg>dev-util/kcov</pkg> est un testeur de couverture de code
21+
FreeBSD/Linux/Mac OS pour des langages compilés, Python et Bash.
22+
<pkg>dev-util/kcov</pkg> est, à l'origine, un fork de Bcov, mais
23+
a depuis évolué de manière à supporter un vaste nombre de
24+
fonctionnalités en addition de celle Bcov.
25+
26+
<pkg>dev-util/kcov</pkg>, comme Bcov, utilise les informations
27+
de débogage DWARF pour les langages compilés afin de permettre
28+
la collecte d'information de couverture sans variations d'un
29+
compilateur à l'autre.
30+
</longdescription>
31+
<upstream>
32+
<maintainer status="active">
33+
<name>Simon Kågström</name>
34+
<email>[email protected]</email>
35+
</maintainer>
36+
<changelog>https://raw.githubusercontent.com/SimonKagstrom/kcov/master/ChangeLog</changelog>
37+
<bugs-to>https://github.com/SimonKagstrom/kcov/issues/</bugs-to>
38+
<remote-id type="github">SimonKagstrom/kcov</remote-id>
39+
</upstream>
40+
</pkgmetadata>

0 commit comments

Comments
 (0)