You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1023 B
53 lines
1023 B
# Copyright 1999-2016 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Id$
|
|
|
|
EAPI="5"
|
|
|
|
PYTHON_COMPAT=( python{2_7,3_4} )
|
|
PYTHON_REQ_USE='xml'
|
|
|
|
inherit eutils python-r1
|
|
|
|
DESCRIPTION="Converts profiling output to dot graphs"
|
|
HOMEPAGE="https://github.com/jrfonseca/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 >"${ED}/$1"
|
|
#! /usr/bin/env python
|
|
from gprof2dot import Main
|
|
Main().main()
|
|
EOF
|
|
|
|
fperms a+x "$1" || die
|
|
}
|
|
|
|
src_install() {
|
|
abi_specific_install() {
|
|
local sitedir="$(python_get_sitedir)"
|
|
insinto ${sitedir#"${EPREFIX}"}
|
|
doins ${PN}.py || die
|
|
python_optimize || die
|
|
}
|
|
python_foreach_impl abi_specific_install
|
|
|
|
dodir /usr/bin || die
|
|
_make_call_script /usr/bin/${PN} || die
|
|
python_replicate_script "${ED}"/usr/bin/${PN} || die
|
|
}
|