diff options
author | Mattéo Rossillol‑‑Laruelle <beatussum@protonmail.com> | 2024-08-04 09:24:37 +0200 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2024-08-04 12:17:32 +0300 |
commit | 613c1d743a955b0e9cf39be7322a2991e200bb0d (patch) | |
tree | 46d38025d2cf49911f5ac75bfdefea9d72e1c7da /dev-util/kcov/kcov-43.ebuild | |
parent | app-crypt/yubikey-manager: Stabilize 5.5.1 x86, #937270 (diff) | |
download | gentoo-613c1d743a955b0e9cf39be7322a2991e200bb0d.tar.gz gentoo-613c1d743a955b0e9cf39be7322a2991e200bb0d.tar.bz2 gentoo-613c1d743a955b0e9cf39be7322a2991e200bb0d.zip |
dev-util/kcov: add 43 and adoption
Signed-off-by: Mattéo Rossillol‑‑Laruelle <beatussum@protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/37766
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-util/kcov/kcov-43.ebuild')
-rw-r--r-- | dev-util/kcov/kcov-43.ebuild | 84 |
1 files changed, 84 insertions, 0 deletions
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 +} |