]> git.draconx.ca Git - gentoo-fixes.git/blob - dev-util/lcov/lcov-1.15.ebuild
dev-util/lcov: Fix prefix installation.
[gentoo-fixes.git] / dev-util / lcov / lcov-1.15.ebuild
1 # Copyright © 2020 Nick Bowler
2 #
3 # License GPLv2+: GNU General Public License version 2 or any later version.
4 # This is free software: you are free to change and redistribute it.
5 # There is NO WARRANTY, to the extent permitted by law.
6 #
7 # This is a modified version of the original ebuild from Gentoo GNU/Linux,
8 # covered by the following copyright and permission notice:
9 #
10 #   Copyright 1999-2020 Gentoo Authors
11 #   Distributed under the terms of the GNU General Public License v2
12
13 EAPI=7
14
15 if [[ ${PV} == "9999" ]] ; then
16         EGIT_REPO_URI="https://github.com/linux-test-project/lcov.git"
17         inherit git-r3
18 else
19         SRC_URI="https://github.com/linux-test-project/lcov/releases/download/v${PV}/${P}.tar.gz"
20         KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-linux ~x64-macos"
21 fi
22
23 inherit optfeature prefix
24
25 DESCRIPTION="A graphical front-end for GCC's coverage testing tool gcov"
26 HOMEPAGE="http://ltp.sourceforge.net/coverage/lcov.php"
27
28 LICENSE="GPL-2+"
29 SLOT="0"
30
31 RDEPEND="
32         dev-lang/perl
33         dev-perl/JSON
34         dev-perl/PerlIO-gzip
35 "
36
37 src_prepare() {
38         default
39         if use prefix; then
40                 hprefixify bin/*.{pl,sh}
41         fi
42 }
43
44 src_compile() { :; }
45
46 src_install() {
47         emake -j1 PREFIX="${ED}/usr" CFG_DIR="${ED}/etc" \
48                 LCOV_PERL_PATH="${EPREFIX%/}/usr/bin/perl" install
49 }
50
51 pkg_postinst() {
52         elog "Optional features:"
53         optfeature "png output support" dev-perl/GD[png]
54 }