Gentoo Archives: gentoo-commits

From: Aisha Tammy <gentoo@×××××.cc>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: dev-util/makefile2graph/
Date: Wed, 27 Jan 2021 02:15:46
Message-Id: 1611713737.d16be1a53585cc6995a55adcb152e3d387673e31.epsilon-0@gentoo
1 commit: d16be1a53585cc6995a55adcb152e3d387673e31
2 Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
3 AuthorDate: Wed Jan 27 02:15:16 2021 +0000
4 Commit: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
5 CommitDate: Wed Jan 27 02:15:37 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=d16be1a5
7
8 dev-util/makefile2graph: bump to eapi 7 + live ebuild
9
10 also add tests
11
12 Package-Manager: Portage-3.0.13, Repoman-3.0.2
13 Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>
14
15 .../makefile2graph/makefile2graph-1.5.0.ebuild | 31 ++++++++++++++-----
16 dev-util/makefile2graph/makefile2graph-9999.ebuild | 36 ++++++++++++++++++++++
17 2 files changed, 59 insertions(+), 8 deletions(-)
18
19 diff --git a/dev-util/makefile2graph/makefile2graph-1.5.0.ebuild b/dev-util/makefile2graph/makefile2graph-1.5.0.ebuild
20 index a934ce2cb..3d5943c64 100644
21 --- a/dev-util/makefile2graph/makefile2graph-1.5.0.ebuild
22 +++ b/dev-util/makefile2graph/makefile2graph-1.5.0.ebuild
23 @@ -1,21 +1,36 @@
24 -# Copyright 1999-2018 Gentoo Foundation
25 +# Copyright 1999-2021 Gentoo Authors
26 # Distributed under the terms of the GNU General Public License v2
27
28 -EAPI=6
29 +EAPI=7
30 +
31 +inherit toolchain-funcs
32
33 DESCRIPTION="Create a graph of dependencies from GNU Make"
34 HOMEPAGE="https://github.com/lindenb/makefile2graph"
35 -SRC_URI="https://github.com/lindenb/makefile2graph/archive/v1.5.0.tar.gz -> ${P}.tar.gz"
36 +if [[ "${PV}" = 9999 ]]; then
37 + inherit git-r3
38 + EGIT_REPO_URI="https://github.com/lindenb/makefile2graph"
39 +else
40 + SRC_URI="https://github.com/lindenb/makefile2graph/archive/v${PV}.tar.gz -> ${P}.tar.gz"
41 + KEYWORDS="~amd64 ~x86"
42 +fi
43
44 LICENSE="MIT"
45 SLOT="0"
46 -KEYWORDS="~amd64 ~x86"
47 -IUSE=""
48 +IUSE="test"
49 +RESTRICT="!test? ( test )"
50
51 -DEPEND=""
52 -RDEPEND="${DEPEND}"
53 +BDEPEND="test? ( media-gfx/graphviz )"
54
55 src_prepare(){
56 - sed -e 's#/usr/local#/usr#' -i Makefile || die
57 + sed -e "s|/usr/local|${EPREFIX}/usr|" -i Makefile || die
58 default
59 }
60 +
61 +src_compile() {
62 + CC="$(tc-getCC)" default
63 +}
64 +
65 +src_test() {
66 + CC="$(tc-getCC)" emake test
67 +}
68
69 diff --git a/dev-util/makefile2graph/makefile2graph-9999.ebuild b/dev-util/makefile2graph/makefile2graph-9999.ebuild
70 new file mode 100644
71 index 000000000..3d5943c64
72 --- /dev/null
73 +++ b/dev-util/makefile2graph/makefile2graph-9999.ebuild
74 @@ -0,0 +1,36 @@
75 +# Copyright 1999-2021 Gentoo Authors
76 +# Distributed under the terms of the GNU General Public License v2
77 +
78 +EAPI=7
79 +
80 +inherit toolchain-funcs
81 +
82 +DESCRIPTION="Create a graph of dependencies from GNU Make"
83 +HOMEPAGE="https://github.com/lindenb/makefile2graph"
84 +if [[ "${PV}" = 9999 ]]; then
85 + inherit git-r3
86 + EGIT_REPO_URI="https://github.com/lindenb/makefile2graph"
87 +else
88 + SRC_URI="https://github.com/lindenb/makefile2graph/archive/v${PV}.tar.gz -> ${P}.tar.gz"
89 + KEYWORDS="~amd64 ~x86"
90 +fi
91 +
92 +LICENSE="MIT"
93 +SLOT="0"
94 +IUSE="test"
95 +RESTRICT="!test? ( test )"
96 +
97 +BDEPEND="test? ( media-gfx/graphviz )"
98 +
99 +src_prepare(){
100 + sed -e "s|/usr/local|${EPREFIX}/usr|" -i Makefile || die
101 + default
102 +}
103 +
104 +src_compile() {
105 + CC="$(tc-getCC)" default
106 +}
107 +
108 +src_test() {
109 + CC="$(tc-getCC)" emake test
110 +}