commit:     d16be1a53585cc6995a55adcb152e3d387673e31
Author:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
AuthorDate: Wed Jan 27 02:15:16 2021 +0000
Commit:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
CommitDate: Wed Jan 27 02:15:37 2021 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=d16be1a5

dev-util/makefile2graph: bump to eapi 7 + live ebuild

also add tests

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>

 .../makefile2graph/makefile2graph-1.5.0.ebuild     | 31 ++++++++++++++-----
 dev-util/makefile2graph/makefile2graph-9999.ebuild | 36 ++++++++++++++++++++++
 2 files changed, 59 insertions(+), 8 deletions(-)

diff --git a/dev-util/makefile2graph/makefile2graph-1.5.0.ebuild 
b/dev-util/makefile2graph/makefile2graph-1.5.0.ebuild
index a934ce2cb..3d5943c64 100644
--- a/dev-util/makefile2graph/makefile2graph-1.5.0.ebuild
+++ b/dev-util/makefile2graph/makefile2graph-1.5.0.ebuild
@@ -1,21 +1,36 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
+
+inherit toolchain-funcs
 
 DESCRIPTION="Create a graph of dependencies from GNU Make"
 HOMEPAGE="https://github.com/lindenb/makefile2graph";
-SRC_URI="https://github.com/lindenb/makefile2graph/archive/v1.5.0.tar.gz -> 
${P}.tar.gz"
+if [[ "${PV}" = 9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/lindenb/makefile2graph";
+else
+       
SRC_URI="https://github.com/lindenb/makefile2graph/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+       KEYWORDS="~amd64 ~x86"
+fi
 
 LICENSE="MIT"
 SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="test"
+RESTRICT="!test? ( test )"
 
-DEPEND=""
-RDEPEND="${DEPEND}"
+BDEPEND="test? ( media-gfx/graphviz )"
 
 src_prepare(){
-       sed -e 's#/usr/local#/usr#' -i Makefile || die
+       sed -e "s|/usr/local|${EPREFIX}/usr|" -i Makefile || die
        default
 }
+
+src_compile() {
+       CC="$(tc-getCC)" default
+}
+
+src_test() {
+       CC="$(tc-getCC)" emake test
+}

diff --git a/dev-util/makefile2graph/makefile2graph-9999.ebuild 
b/dev-util/makefile2graph/makefile2graph-9999.ebuild
new file mode 100644
index 000000000..3d5943c64
--- /dev/null
+++ b/dev-util/makefile2graph/makefile2graph-9999.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="Create a graph of dependencies from GNU Make"
+HOMEPAGE="https://github.com/lindenb/makefile2graph";
+if [[ "${PV}" = 9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/lindenb/makefile2graph";
+else
+       
SRC_URI="https://github.com/lindenb/makefile2graph/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+       KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="test? ( media-gfx/graphviz )"
+
+src_prepare(){
+       sed -e "s|/usr/local|${EPREFIX}/usr|" -i Makefile || die
+       default
+}
+
+src_compile() {
+       CC="$(tc-getCC)" default
+}
+
+src_test() {
+       CC="$(tc-getCC)" emake test
+}

Reply via email to