chore(dev-util/perf/): import from portage

Change-Id: Ic3fa428daadea0456ddf9a9125676d1e7d2b387b
This commit is contained in:
Brandon Philips 2013-02-15 16:35:04 -08:00
parent 8bdbc8e531
commit 8909a5c5f1
5 changed files with 480 additions and 0 deletions

View File

@ -0,0 +1,127 @@
# ChangeLog for dev-util/perf
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/perf/ChangeLog,v 1.20 2012/06/28 08:23:07 naota Exp $
*perf-3.4 (28 Jun 2012)
28 Jun 2012; Naohiro Aota <naota@gentoo.org> +perf-3.4.ebuild, metadata.xml:
Version bump; Assign myself as a maintainer.
*perf-3.2 (28 Feb 2012)
28 Feb 2012; Mike Frysinger <vapier@gentoo.org> -perf-2.6.35_rc4.ebuild,
-perf-3.1.ebuild, +perf-3.2.ebuild:
Fix automagic depends #390191 and clean up the ebuild.
*perf-3.1 (01 Nov 2011)
01 Nov 2011; Robin H. Johnson <robbat2@gentoo.org> +perf-3.1.ebuild:
Version bump. Improve install phase. Fix automagic dependency on
dev-libs/newt and python. Install python+perl tools. Ensure DWARF is built on
amd64.
*perf-2.6.35_rc4 (11 Jul 2010)
11 Jul 2010; Diego E. Pettenò <flameeyes@gentoo.org>
-perf-2.6.33.1.ebuild, -perf-2.6.34.ebuild, -perf-2.6.35_rc3.ebuild,
+perf-2.6.35_rc4.ebuild:
Version bump to latest rc.
*perf-2.6.35_rc3 (12 Jun 2010)
12 Jun 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+perf-2.6.35_rc3.ebuild:
Bump to latest rc.
*perf-2.6.34 (18 May 2010)
18 May 2010; Diego E. Pettenò <flameeyes@gentoo.org> -perf-2.6.32.ebuild,
+perf-2.6.34.ebuild:
Version bump.
*perf-2.6.33.1 (16 Mar 2010)
16 Mar 2010; Diego E. Pettenò <flameeyes@gentoo.org>
-perf-2.6.33_rc6.ebuild, -perf-2.6.33_rc7.ebuild, +perf-2.6.33.1.ebuild:
Version bump and remove older RCs.
*perf-2.6.33_rc7 (09 Feb 2010)
09 Feb 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+perf-2.6.33_rc7.ebuild:
Version bump.
*perf-2.6.33_rc6 (31 Jan 2010)
31 Jan 2010; Diego E. Pettenò <flameeyes@gentoo.org>
-perf-2.6.33_rc2.ebuild, -perf-2.6.33_rc5.ebuild, +perf-2.6.33_rc6.ebuild,
metadata.xml:
Bump to rc6 (instead of revbumping) so that the RC patch is actually
applied. Huge thanks to Zeev Tarantov in bug #302387 for reporting and
providing the fix. Also introduce perl USE flag for the Perl scripting in
perf, and fix building with USE=perl and --as-needed (patch to be sent
upstream).
23 Jan 2010; Diego E. Pettenò <flameeyes@gentoo.org>
perf-2.6.33_rc2.ebuild, perf-2.6.33_rc5.ebuild:
Fix (again) bug #291801.
*perf-2.6.33_rc5 (22 Jan 2010)
22 Jan 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+perf-2.6.33_rc5.ebuild:
Bump to latest rc.
*perf-2.6.33_rc2 (28 Dec 2009)
28 Dec 2009; Diego E. Pettenò <flameeyes@gentoo.org>
-perf-2.6.33_rc1.ebuild, +perf-2.6.33_rc2.ebuild:
Version bump and cleanup previous rc.
*perf-2.6.33_rc1 (19 Dec 2009)
19 Dec 2009; Diego E. Pettenò <flameeyes@gentoo.org>
+perf-2.6.33_rc1.ebuild:
Version bump.
*perf-2.6.32 (04 Dec 2009)
04 Dec 2009; Diego E. Pettenò <flameeyes@gentoo.org>
-perf-2.6.32_rc7.ebuild, +perf-2.6.32.ebuild:
Bump to final .32 version.
*perf-2.6.32_rc7 (16 Nov 2009)
16 Nov 2009; Diego E. Pettenò <flameeyes@gentoo.org>
-perf-2.6.32_rc6.ebuild, +perf-2.6.32_rc7.ebuild:
Version bump to latest rc; make the linux-info checks non-fatal since the
package builds anyway.
04 Nov 2009; Diego E. Pettenò <flameeyes@gentoo.org>
perf-2.6.32_rc6.ebuild:
Fix typo, closes bug #291801 by Zeev Tarantov.
*perf-2.6.32_rc6 (03 Nov 2009)
03 Nov 2009; Diego E. Pettenò <flameeyes@gentoo.org> -perf-2.6.31.ebuild,
-perf-2.6.32_rc5.ebuild, +perf-2.6.32_rc6.ebuild:
Version bump to latest rc, make sure the ebuild is fixed to fetch properly
(was broken before), remove previous stuff.
31 Oct 2009; Diego E. Pettenò <flameeyes@gentoo.org>
perf-2.6.32_rc5.ebuild, metadata.xml:
Add doc USE flag to build documentation and man pages.
*perf-2.6.32_rc5 (30 Oct 2009)
30 Oct 2009; Diego E. Pettenò <flameeyes@gentoo.org>
+perf-2.6.32_rc5.ebuild:
Bump to version 2.6.32_rc5 already, add support for patching in an RC
version.
*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.

View File

@ -0,0 +1,6 @@
DIST linux-3.2.tar.bz2 78147838 SHA256 c881fc2b53cf0da7ca4538aa44623a7de043a41f76fd5d0f51a31f6ed699d463 SHA512 1f57b98e8da34b10f37ce94e0f13a994c111d483b104c27a8f58a4a55013a73a9f1ffcebb597be63ce0dfadb92201e93b0e072ba49bac0033026aceb0840c812 WHIRLPOOL 3dc893bde09f064e4614183964a4b9feaab938ca7a739f46f825818a577884eae815f195b52a4c55c571345de59d7ba09631fb68dac481a0837b24868ce60e3d
DIST linux-3.4.tar.bz2 80173484 SHA256 a797a15d0b6228381507c14ecf4eec4a6cc5c77cfd521ba3b3e1325e85b5b16d SHA512 597002fa82b70b5052f9e05c1d8547bc5f89d8e1aecfd1765f4033f6d2c5c02d51b6372dbeef12c2eb070ae318a04c39925050cb37a39399961c8b263479fca1 WHIRLPOOL 57e6dd7094db2bc41175d7bb551e8237ea96eacf3710a734e8413915c54304e84ca11455e41c7752882ce81048459555d44d1798bf0775b79c3d74b13aa3a9f2
EBUILD perf-3.2.ebuild 4228 SHA256 6763a106b3c42da98659903996942a73073bcdbea725c1b0c0d2eb6ce873662e SHA512 2e3ce7a1dae8933b360a58adcb8ff7f5e657729c0ffbe6345e296163e9c63738715851786a8469eb8ee14f8bc7d29d8ecd7b679e730a541942b23d503cdb3872 WHIRLPOOL 263b89d4fba11dffb50227be605a58c4d7d97912050949247a9bc85c6ae2b24250acad27ace23ee8ace8495ed49c423f9aa5811471b3bdc061250b3158198724
EBUILD perf-3.4.ebuild 4306 SHA256 24e6468c5e72612bf5348a1226ef49f751369b80ffe4203d36ce9118a900aebf SHA512 4f87cf6a0627983c946c76c4e3f9c099fbb1618fa96905cfdd4b4cf7b01f06815c52d70016d98ce58e375320e6921f429638eaf2a76b32b85fc1a848525341f6 WHIRLPOOL 190a9abe22b1b3065785522c24b0183fdbf7be46b58eb8d12b6a35233a88853be4adf38be064856d508de75b22c3e63909e747dd12ded0a93414f62f9446bb8f
MISC ChangeLog 4060 SHA256 7d9e1ea96b6fbda5c2da9a76a7d73faa248ac6d6e23f0e79ac61da8658e61e9f SHA512 57a65534b2f4de155672fc904e2228fffec6127bf2c8e32a3e536724b7f421985eb8c2a357a112ddcee1dc7c46b6742609ee12d4c5f1822b1461094a62db2213 WHIRLPOOL f23946f81193482f339a04edd77c6352a53bdd9ea269070896b9c63a447c40f4deeddadd4680f0501304617239936343518b3ca844516373d4d62f2ccf887ebb
MISC metadata.xml 891 SHA256 69d162e1557448101186ac1de9fc2b6c9aebbe1571cf859016fe9513cd943d07 SHA512 a883c8ab5a15b618bdc91541662f025e16420ff8668e17f45d23edefd5dc00ba2880a28ac8c8328073bcadd5e4a86c04133e4be2f55afcd7520f78af70bedf5c WHIRLPOOL fd0b88fc3d76d80ab1ca15966d536cccdf6cd218b310a07fc83fbd5fdfe53ca8d7be90adfd9be30f9ae8409605d4d876faf2c58357a998c80a9ccb0aab80ad57

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer>
<email>naota@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>
<flag name="doc">
Build documentation and man pages. With this USE flag disabled,
the --help parameter for perf and its sub-tools will not be
available. This is optional because it depends on a few
documentation handling tools that are not always welcome on user
systems.
</flag>
<flag name="perl">
Add support for Perl as a scripting language for perf tools.
</flag>
</use>
</pkgmetadata>

View File

@ -0,0 +1,158 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/perf/perf-3.2.ebuild,v 1.1 2012/02/28 22:21:05 vapier Exp $
EAPI="4"
PYTHON_DEPEND="python? 2"
inherit versionator eutils toolchain-funcs python linux-info
MY_PV="${PV/_/-}"
MY_PV="${MY_PV/-pre/-git}"
DESCRIPTION="Userland tools for Linux Performance Counters"
HOMEPAGE="http://perf.wiki.kernel.org/"
LINUX_V=$(get_version_component_range 1-2)
if [[ ${PV/_rc} != ${PV} ]] ; then
LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1))
PATCH_VERSION=$(get_version_component_range 1-3)
LINUX_PATCH=patch-${PV//_/-}.bz2
SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH}
mirror://kernel/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
elif [[ $(get_version_component_count) == 4 ]] ; then
# stable-release series
LINUX_VER=$(get_version_component_range 1-3)
LINUX_PATCH=patch-${PV}.bz2
SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
else
LINUX_VER=${PV}
SRC_URI=""
fi
LINUX_SOURCES="linux-${LINUX_VER}.tar.bz2"
SRC_URI+=" mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="+demangle +doc perl python slang"
RDEPEND="demangle? ( sys-devel/binutils )
perl? ( || ( >=dev-lang/perl-5.10 sys-devel/libperl ) )
slang? ( dev-libs/newt )
dev-libs/elfutils"
DEPEND="${RDEPEND}
${LINUX_PATCH+dev-util/patchutils}
doc? ( app-text/asciidoc app-text/xmlto )"
S_K="${WORKDIR}/linux-${LINUX_VER}"
S="${S_K}/tools/perf"
CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS"
pkg_setup() {
use python && python_set_active_version 2
}
src_unpack() {
local paths=( tools/perf include lib "arch/*/include" "arch/*/lib" )
# We expect the tar implementation to support the -j option (both
# GNU tar and libarchive's tar support that).
echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}"
tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \
"${paths[@]/#/linux-${LINUX_VER}/}" || die
if [[ -n ${LINUX_PATCH} ]] ; then
eshopts_push -o noglob
ebegin "Filtering partial source patch"
filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} > ${P}.patch || die
eend $? || die "filterdiff failed"
eshopts_pop
fi
local a
for a in ${A}; do
[[ ${a} == ${LINUX_SOURCES} ]] && continue
[[ ${a} == ${LINUX_PATCH} ]] && continue
unpack ${a}
done
}
src_prepare() {
if [[ -n ${LINUX_PATCH} ]] ; then
cd "${S_K}"
epatch "${WORKDIR}"/${P}.patch
fi
# 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 '/\(PERL\|PYTHON\)_EMBED_LDOPTS/s:ALL_LDFLAGS +=:EXTLIBS +=:' \
-e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \
-e '/^ALL_CFLAGS =/s:$: $(CFLAGS_OPTIMIZE):' \
-e '/^ALL_LDFLAGS =/s:$: $(LDFLAGS_OPTIMIZE):' \
-e '/.FORCE-PERF-VERSION-FILE/s,.FORCE-PERF-VERSION-FILE,,g' \
"${S}"/Makefile
# Avoid the call to make kernelversion
echo "PERF_VERSION = ${MY_PV}" > PERF-VERSION-FILE
# The code likes to compile local assembly files which lack ELF markings.
find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} +
}
puse() { usex $1 "" no; }
perf_make() {
emake V=1 \
CC="$(tc-getCC)" AR="$(tc-getAR)" \
prefix="/usr" bindir_relative="sbin" \
CFLAGS_OPTIMIZE="${CFLAGS}" \
LDFLAGS_OPTIMIZE="${LDFLAGS}" \
ARCH="$(tc-arch-kernel)" \
NO_DEMANGLE=$(puse demangle) \
NO_LIBPERL=$(puse perl) \
NO_LIBPYTHON=$(puse python) \
NO_NEWT=$(puse slang) \
"$@"
}
src_compile() {
perf_make
if use doc ; then
pushd Documentation
emake ${makeargs}
popd
fi
}
src_test() {
:
}
src_install() {
perf_make install DESTDIR="${D}"
dodoc CREDITS
dodoc *txt Documentation/*.txt
if use doc ; then
dohtml Documentation/*.html
doman Documentation/*.1
fi
}
pkg_postinst() {
if ! use doc ; then
elog "Without the doc USE flag you won't get any documentation nor man pages."
elog "And without man pages, you won't get any --help output for perf and its"
elog "sub-tools."
fi
}

View File

@ -0,0 +1,164 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/perf/perf-3.4.ebuild,v 1.1 2012/06/28 08:23:07 naota Exp $
EAPI="4"
PYTHON_DEPEND="python? 2"
inherit versionator eutils toolchain-funcs python linux-info
MY_PV="${PV/_/-}"
MY_PV="${MY_PV/-pre/-git}"
DESCRIPTION="Userland tools for Linux Performance Counters"
HOMEPAGE="http://perf.wiki.kernel.org/"
LINUX_V=$(get_version_component_range 1-2)
if [[ ${PV/_rc} != ${PV} ]] ; then
LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1))
PATCH_VERSION=$(get_version_component_range 1-3)
LINUX_PATCH=patch-${PV//_/-}.bz2
SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH}
mirror://kernel/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
elif [[ $(get_version_component_count) == 4 ]] ; then
# stable-release series
LINUX_VER=$(get_version_component_range 1-3)
LINUX_PATCH=patch-${PV}.bz2
SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
else
LINUX_VER=${PV}
SRC_URI=""
fi
LINUX_SOURCES="linux-${LINUX_VER}.tar.bz2"
SRC_URI+=" mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="+demangle +doc perl python slang"
RDEPEND="demangle? ( sys-devel/binutils )
perl? ( || ( >=dev-lang/perl-5.10 sys-devel/libperl ) )
slang? ( dev-libs/newt )
dev-libs/elfutils"
DEPEND="${RDEPEND}
${LINUX_PATCH+dev-util/patchutils}
sys-devel/bison
sys-devel/flex
doc? (
app-text/asciidoc
app-text/sgml-common
app-text/xmlto
sys-process/time )"
S_K="${WORKDIR}/linux-${LINUX_VER}"
S="${S_K}/tools/perf"
CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS"
pkg_setup() {
use python && python_set_active_version 2
}
src_unpack() {
local paths=( tools/perf include lib "arch/*/include" "arch/*/lib" )
# We expect the tar implementation to support the -j option (both
# GNU tar and libarchive's tar support that).
echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}"
tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \
"${paths[@]/#/linux-${LINUX_VER}/}" || die
if [[ -n ${LINUX_PATCH} ]] ; then
eshopts_push -o noglob
ebegin "Filtering partial source patch"
filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} > ${P}.patch || die
eend $? || die "filterdiff failed"
eshopts_pop
fi
local a
for a in ${A}; do
[[ ${a} == ${LINUX_SOURCES} ]] && continue
[[ ${a} == ${LINUX_PATCH} ]] && continue
unpack ${a}
done
}
src_prepare() {
if [[ -n ${LINUX_PATCH} ]] ; then
cd "${S_K}"
epatch "${WORKDIR}"/${P}.patch
fi
# 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 '/\(PERL\|PYTHON\)_EMBED_LDOPTS/s:ALL_LDFLAGS +=:EXTLIBS +=:' \
-e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \
-e '/^ALL_CFLAGS =/s:$: $(CFLAGS_OPTIMIZE):' \
-e '/^ALL_LDFLAGS =/s:$: $(LDFLAGS_OPTIMIZE):' \
-e '/.FORCE-PERF-VERSION-FILE/s,.FORCE-PERF-VERSION-FILE,,g' \
"${S}"/Makefile
# Avoid the call to make kernelversion
echo "PERF_VERSION = ${MY_PV}" > PERF-VERSION-FILE
# The code likes to compile local assembly files which lack ELF markings.
find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} +
}
puse() { usex $1 "" no; }
perf_make() {
emake V=1 \
CC="$(tc-getCC)" AR="$(tc-getAR)" \
prefix="/usr" bindir_relative="sbin" \
CFLAGS_OPTIMIZE="${CFLAGS}" \
LDFLAGS_OPTIMIZE="${LDFLAGS}" \
ARCH="$(tc-arch-kernel)" \
NO_DEMANGLE=$(puse demangle) \
NO_LIBPERL=$(puse perl) \
NO_LIBPYTHON=$(puse python) \
NO_NEWT=$(puse slang) \
"$@"
}
src_compile() {
perf_make
if use doc ; then
pushd Documentation
emake ${makeargs}
popd
fi
}
src_test() {
:
}
src_install() {
perf_make install DESTDIR="${D}"
dodoc CREDITS
dodoc *txt Documentation/*.txt
if use doc ; then
dohtml Documentation/*.html
doman Documentation/*.1
fi
}
pkg_postinst() {
if ! use doc ; then
elog "Without the doc USE flag you won't get any documentation nor man pages."
elog "And without man pages, you won't get any --help output for perf and its"
elog "sub-tools."
fi
}