diff options
Diffstat (limited to 'dev-util/gprof2dot/gprof2dot-0_p20130517.ebuild')
-rw-r--r-- | dev-util/gprof2dot/gprof2dot-0_p20130517.ebuild | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/dev-util/gprof2dot/gprof2dot-0_p20130517.ebuild b/dev-util/gprof2dot/gprof2dot-0_p20130517.ebuild new file mode 100644 index 000000000000..ec4cff4d96dc --- /dev/null +++ b/dev-util/gprof2dot/gprof2dot-0_p20130517.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) +PYTHON_REQ_USE='xml' + +inherit eutils python-r1 + +DESCRIPTION="Converts profiling output to dot graphs" +HOMEPAGE="http://code.google.com/p/jrfonseca/wiki/Gprof2Dot" +SRC_URI="http://www.hartwork.org/public/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-py3-xrange.patch +} + +_make_call_script() { + cat <<-EOF >"${D}/$1" + #! /usr/bin/env python + from gprof2dot import Main + Main().main() + EOF + + fperms a+x "$1" || die +} + +src_install() { + abi_specific_install() { + insinto "$(python_get_sitedir)" + doins ${PN}.py || die + python_optimize || die + } + python_parallel_foreach_impl abi_specific_install + + dodir /usr/bin || die + _make_call_script /usr/bin/${PN} || die + python_replicate_script "${D}"/usr/bin/${PN} || die +} |