summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2009-10-30 19:30:24 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2009-10-30 19:30:24 +0000
commit8fef91b47f1c3bc16b82b151caad5ed65ab668f4 (patch)
tree257f3b0055b99da06b5c2b1663b5ec23987b937b /dev-util/perf
parentamd64/x86 stable, bug #290733 (diff)
downloadgentoo-2-8fef91b47f1c3bc16b82b151caad5ed65ab668f4.tar.gz
gentoo-2-8fef91b47f1c3bc16b82b151caad5ed65ab668f4.tar.bz2
gentoo-2-8fef91b47f1c3bc16b82b151caad5ed65ab668f4.zip
Initial import of the performance counter userland utility.
(Portage version: 2.2_rc46/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/perf')
-rw-r--r--dev-util/perf/ChangeLog10
-rw-r--r--dev-util/perf/metadata.xml16
-rw-r--r--dev-util/perf/perf-2.6.31.ebuild79
3 files changed, 105 insertions, 0 deletions
diff --git a/dev-util/perf/ChangeLog b/dev-util/perf/ChangeLog
new file mode 100644
index 000000000000..b28df263c5fa
--- /dev/null
+++ b/dev-util/perf/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for dev-util/perf
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/perf/ChangeLog,v 1.1 2009/10/30 19:30:24 flameeyes Exp $
+
+*perf-2.6.31 (30 Oct 2009)
+
+ 30 Oct 2009; Diego E. Pettenò <flameeyes@gentoo.org> +perf-2.6.31.ebuild,
+ +metadata.xml:
+ Initial import of the performance counter userland utility.
+
diff --git a/dev-util/perf/metadata.xml b/dev-util/perf/metadata.xml
new file mode 100644
index 000000000000..a946a6d4dd47
--- /dev/null
+++ b/dev-util/perf/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="demangle">
+ Enable C++ symbol name demangling, using libbfd from
+ <pkg>sys-devel/binutils</pkg>. When this flag is enabled, the
+ package will have to be rebuilt after every version bump of
+ binutils.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-util/perf/perf-2.6.31.ebuild b/dev-util/perf/perf-2.6.31.ebuild
new file mode 100644
index 000000000000..c43b94d35291
--- /dev/null
+++ b/dev-util/perf/perf-2.6.31.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/perf/perf-2.6.31.ebuild,v 1.1 2009/10/30 19:30:24 flameeyes Exp $
+
+EAPI=2
+
+inherit versionator eutils toolchain-funcs linux-info
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-pre/-git}"
+
+LINUX_SOURCES=linux-${MY_PV}.tar.bz2
+
+DESCRIPTION="Userland tools for Linux Performance Counters"
+HOMEPAGE="http://perf.wiki.kernel.org/"
+SRC_URI="mirror://kernel/linux/kernel/v$(get_version_component_range 1-2)/${LINUX_SOURCES}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+demangle"
+
+DEPEND="demangle? ( sys-devel/binutils )
+ dev-libs/elfutils"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/linux-${MY_PV}/tools/perf"
+
+CONFIG_CHECK="PERF_EVENTS KALLSYMS"
+
+src_unpack() {
+ # We expect the tar implementation to support the -j option (both
+ # GNU tar and libarchive's tar support that).
+ tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} linux-${MY_PV}/{tools/perf,include,lib,"arch/*/include"}
+
+ [[ -n ${A/${LINUX_SOURCES}/} ]] && unpack ${A/${LINUX_SOURCES}/}
+}
+
+src_prepare() {
+ # Drop some upstream too-developer-oriented flags and fix the
+ # Makefile in general
+ sed -i \
+ -e 's:-Werror::' \
+ -e 's:-ggdb3::' \
+ -e 's:-fstack-protector-all::' \
+ -e 's:^LDFLAGS =:EXTLIBS +=:' \
+ -e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \
+ -e '/^ALL_CFLAGS =/s:$: $(CFLAGS_OPTIMIZE):' \
+ -e '/^ALL_LDFLAGS =/s:$: $(LDFLAGS_OPTIMIZE):' \
+ "${S}"/Makefile
+}
+
+src_compile() {
+ local makeargs=
+
+ use demangle || makeargs="${makeargs} NO_DEMANGLE= "
+
+ emake ${makeargs} \
+ CC="$(tc-getCC)" AR="$(tc-getAR)" \
+ prefix="/usr" bindir_relative="sbin" \
+ CFLAGS_OPTIMIZE="${CFLAGS}" \
+ LDFLAGS_OPTIMIZE="${LDFLAGS}" || die
+}
+
+src_test() {
+ :
+}
+
+src_install() {
+ # Don't use make install or it'll be re-building the stuff :(
+ dosbin perf || die
+
+ dodoc CREDITS || die
+}
+
+pkg_postinst() {
+ elog "We currently provide no documentation with perf; we're sorry"
+ elog "but there will be no man page nor --help output."
+}