Skip to content

Commit

Permalink
dev-util/perf: version bump
Browse files Browse the repository at this point in the history
Gentoo-Bug: 596700

Package-Manager: Portage-2.3.3, Repoman-2.3.1
  • Loading branch information
dlan17 committed Feb 28, 2017
1 parent d8c1b8a commit 672fc0b
Show file tree
Hide file tree
Showing 2 changed files with 179 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dev-util/perf/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ DIST linux-3.13.tar.xz 77187032 SHA256 4d5e5eee5f276424c32e9591f1b6c971baedc7b49
DIST linux-3.15.tar.xz 79676484 SHA256 c3927e87be4040fa8aca1b58663dc0776aaf00485604ff88a623be2f3fb07794 SHA512 d5dc477cad4584e56e2e2ef9e0950c2b22e76e5cf5090a896ba099cb7c5e5db1853a4aeb96b199189653dc66d461557e95198e37516a619f7ddc01ba6b308e02 WHIRLPOOL 7f3dfde1a23aab75b7f40770ae2ca77c1b28f845e4abe6296b2aec9b56fe94f7afa76b00eb6cc7475305c31b726ebeb4643107dd48c12ac04c933cf1856b8e77
DIST linux-4.1.tar.xz 83017828 SHA256 caf51f085aac1e1cea4d00dbbf3093ead07b551fc07b31b2a989c05f8ea72d9f SHA512 168ef84a4e67619f9f53f3574e438542a5747f9b43443363cb83597fcdac9f40d201625c66e375a23226745eaada9176eb006ca023613cec089349e91751f3c0 WHIRLPOOL 85fcfdb67ea7f865272a85d3b4c3ec1f5a1267f4664bf073c562bb3875e9d96ad68486259d8866a9aced98c95de16840ec531d89745aec75b7315a64ebe650b8
DIST linux-4.4.tar.xz 87295988 SHA256 401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2 SHA512 13c8459933a8b80608e226a1398e3d1848352ace84bcfb7e6a4a33cb230bbe1ab719d4b58e067283df91ce5311be6d2d595fc8c19e2ae6ecc652499415614b3e WHIRLPOOL 02abc203d867404b9934aaa4c1e5b5dcbb0b0021e91a03f3a7e7fd224eed106821d8b4949f32a590536db150e5a88c16fcde88538777a26d0c17900f0257b1bc
DIST linux-4.9.tar.xz 93192404 SHA256 029098dcffab74875e086ae970e3828456838da6e0ba22ce3f64ef764f3d7f1a SHA512 bf67ff812cc3cb7e5059e82cc5db0d9a7c5637f7ed9a42e4730c715bf7047c81ed3a571225f92a33ef0b6d65f35595bc32d773356646df2627da55e9bc7f1f1a WHIRLPOOL 072505b29972ad120eb25a074217847c9c2813416c4903e605a0433574f5f87616dbea0b1454e4b19acc48107f11274b682958b1d773373156e99f8163e6606a
DIST patch-3.13.1.xz 2884 SHA256 74a093b2cacddac0a105e0989b7bf0e9829b9923e2d71ca10382e90324a17e74 SHA512 164235a15e6a984e9aeaf9fe475a8b2975d5e4c4b28dd4ecf99064b0f0c72eea766d925340f1a7232cabcbd23d26773527c300b6d995bf5cde18a276208fdccc WHIRLPOOL 0ea0118960970b7d6465445252e7a21a6aeb494c0afefec5f52a68c0b7e0d63fd2ed59a3877fbe9ebd282ac03812235b021534866efa8f46d549b6f70228e4b6
DIST patch-3.15.5.xz 122232 SHA256 9b0d000e0bdec7a25ee6303afdab8d2af77439995876eadd6ce248e5c954037d SHA512 6831200503334e839c3cccdad29058aecc0205171cc5b75205d0a2aada8636633889ebff35d9677d4567bbaeea249efc83571e016104cd67554fe72b3b405755 WHIRLPOOL 56e1e817c08b4557e18b34d148d8ffd0f73bf8dec92f2339ca9413ca2143b65ec35f6d48c87e37f140226e57d7df33f06d6c53a48dafa7ddf090a839fdabe024
DIST patch-4.1.5.xz 170056 SHA256 b495cf8a7b978986dd2b757b687751c62f635d15cc2228edb80934bc0d449dcc SHA512 1325cdb35ea1f277d513932af37804f788b96ae63b94cedeb3c9b916ee8963bbd6aca5d0e13279e36a81f1de06005c5f3666ecfc845609932686f261fa4250c5 WHIRLPOOL 291ddfcde395c3d201a8172f7281ac560167a8bce78d3196b47e4c7be759545282cc1104fc7b2edc95d90250a834cc23103199275bc8c6974bd4229dd530d1a3
DIST patch-4.4.4.xz 200972 SHA256 9061d8f57cc25d760387c4e6b7d5cceacaa808e8784a3e478012e7c2949853c8 SHA512 c206af7803cb0915fbe2bd27ed33282452db3fbd3070c73e4c7147443efd3c7588fb3be12d0abc08742381fbe892190602b29147684630aa9e6ff5e9efa49dbc WHIRLPOOL e6a004e32eecca1507354f97d3de85a07c1b9512fe3d4d87173e6d39c02ef1c2411abd0c26b6a077cd5eaefde11dd201445f72b9a0cf185e76635bdcc36df8dd
DIST patch-4.9.13.xz 295932 SHA256 87a0f07dd393e2d08850f0536417d091684535ff0c8ab8f8d9aeab1db38589bf SHA512 d7956cc8a4ab11514789af4f1f7023268e4b003216766c153f0f09aac659aabda5de634b363d53f8daeddfcf5820619c5bca31ff5f9aeb187c1df016c05f68d5 WHIRLPOOL 154747030245f5c1e9f6d9717c32584e3901372fdfe7945497b294c7454f2da4ae4959cf9f1bdd091dca70d346125023a0b5d0c75cc3745342eb8bb56c68e023
177 changes: 177 additions & 0 deletions dev-util/perf/perf-4.9.13.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI="5"

PYTHON_COMPAT=( python2_7 )
inherit bash-completion-r1 versionator eutils toolchain-funcs python-single-r1 linux-info

MY_PV="${PV/_/-}"
MY_PV="${MY_PV/-pre/-git}"

DESCRIPTION="Userland tools for Linux Performance Counters"
HOMEPAGE="https://perf.wiki.kernel.org/"

LINUX_V="${PV:0:1}.x"
if [[ ${PV} == *_rc* ]] ; 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//_/-}.xz
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}"
else
VER_COUNT=$(get_version_component_count)
if [[ ${VER_COUNT} -gt 2 ]] ; then
# stable-release series
LINUX_VER=$(get_version_component_range 1-2)
LINUX_PATCH=patch-${PV}.xz
SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
else
LINUX_VER=${PV}
SRC_URI=""
fi
fi

LINUX_SOURCES="linux-${LINUX_VER}.tar.xz"
SRC_URI+=" mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~ppc ~x86"
IUSE="audit debug +demangle +doc gtk numa perl python slang unwind"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"

RDEPEND="audit? ( sys-process/audit )
demangle? ( sys-devel/binutils:= )
gtk? ( x11-libs/gtk+:2 )
numa? ( sys-process/numactl )
perl? ( dev-lang/perl )
slang? ( dev-libs/newt )
unwind? ( sys-libs/libunwind )
dev-libs/elfutils"
DEPEND="${RDEPEND}
>=sys-kernel/linux-headers-4.4
${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
)
python? ( ${PYTHON_DEPS} )"

S_K="${WORKDIR}/linux-${LINUX_VER}"
S="${S_K}/tools/perf"

CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS"

pkg_setup() {
linux-info_pkg_setup
use python && python-single-r1_pkg_setup
}

src_unpack() {
local paths=(
tools/arch tools/build tools/include tools/lib tools/perf tools/scripts
include lib "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:\$(sysconfdir_SQ)/bash_completion.d:$(get_bashcompdir):" \
"${S}"/Makefile.perf || die
sed -i -e 's:-Werror::' "${S_K}"/tools/lib/api/Makefile || die

# Avoid the call to make kernelversion
echo "#define 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() {
# The arch parsing is a bit funky. The perf tools package is integrated
# into the kernel, so it wants an ARCH that looks like the kernel arch,
# but it also wants to know about the split value -- i386/x86_64 vs just
# x86. We can get that by telling the func to use an older linux version.
# It's kind of a hack, but not that bad ...
local arch=$(tc-arch-kernel)
emake V=1 \
CC="$(tc-getCC)" AR="$(tc-getAR)" LD="$(tc-getLD)" \
prefix="/usr" bindir_relative="bin" \
EXTRA_CFLAGS="${CFLAGS}" \
ARCH="${arch}" \
NO_DEMANGLE=$(puse demangle) \
NO_GTK2=$(puse gtk) \
NO_LIBAUDIT=$(puse audit) \
NO_LIBPERL=$(puse perl) \
NO_LIBPYTHON=$(puse python) \
NO_LIBUNWIND=$(puse unwind) \
NO_NEWT=$(puse slang) \
NO_LIBNUMA=$(puse numa) \
WERROR=0 \
"$@"
}

src_compile() {
perf_make -f Makefile.perf
use doc && perf_make -C Documentation
}

src_test() {
:
}

src_install() {
perf_make -f Makefile.perf 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
}

0 comments on commit 672fc0b

Please sign in to comment.