aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAisha Tammy <gentoo@aisha.cc>2021-01-27 02:15:16 +0000
committerAisha Tammy <gentoo@aisha.cc>2021-01-27 02:15:37 +0000
commitd16be1a53585cc6995a55adcb152e3d387673e31 (patch)
tree6388453df276190e48b86edf63a2d5d68334bfd0 /dev-util
parentdev-libs/half: bump to EAPI 7 (diff)
downloadsci-d16be1a53585cc6995a55adcb152e3d387673e31.tar.gz
sci-d16be1a53585cc6995a55adcb152e3d387673e31.tar.bz2
sci-d16be1a53585cc6995a55adcb152e3d387673e31.zip
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@aisha.cc>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/makefile2graph/makefile2graph-1.5.0.ebuild31
-rw-r--r--dev-util/makefile2graph/makefile2graph-9999.ebuild36
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
+}