diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-10-22 11:09:47 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-10-22 11:09:47 +0100 |
commit | 64e107b9b6058580ff0432107eb37cefb0b2a7d8 (patch) | |
tree | 9a44e603e2ae365e2b1fe35ac37f73e830cdee1d /dev-util/perf | |
parent | 957235cf19a691360c720f7913672adda4258ed0 (diff) |
gentoo resync : 22.10.2018
Diffstat (limited to 'dev-util/perf')
-rw-r--r-- | dev-util/perf/Manifest | 1 | ||||
-rw-r--r-- | dev-util/perf/perf-4.14.33-r1.ebuild | 185 |
2 files changed, 186 insertions, 0 deletions
diff --git a/dev-util/perf/Manifest b/dev-util/perf/Manifest index 5375956f9d50..9c08e326051f 100644 --- a/dev-util/perf/Manifest +++ b/dev-util/perf/Manifest @@ -16,6 +16,7 @@ EBUILD perf-3.12.ebuild 5006 BLAKE2B 7eb7939628a49ca9dadf7c4a223184b5e4da478fef6 EBUILD perf-3.13.1-r1.ebuild 5128 BLAKE2B e34cc28ba57866db83fcf9ab639e95306582c66fd7ce427543b19528d72fa78757721efc0ac1b23c6435973766fa4619e5f6448bfb21a6c50cc01cca2a2c3859 SHA512 f7ce04b5f4a4db657dfeb6b59d70c15cfb012ce661a62620773607ee93d5becfea56912dd9fae88db47a9f42ade6ce0ed0d0ba67a3fc37b086eda0e9e87118ab EBUILD perf-3.15.5.ebuild 5143 BLAKE2B 694b1eaa11dde8aa29ab0ac812479869e9e45e47f02cf9201e78a5d6bcb4c18d645ae4bc8e584237ab738a1739f971a2ae62faf950d8bbe9845f02ad878aab84 SHA512 9a56717e87b9bf6bfa27f3d953e41af18c55e92020fbcc14fd01f43835e542bf1c7adb195387400c955706f5ca8a69090e41d6edfb728717910cd19b801d6dfc EBUILD perf-4.1.5-r1.ebuild 5269 BLAKE2B 859aff4b3f86bb85187c7a0a7a85cd423ec8ceed0a2c9bba55c711b466216017ed796b976a1b16a03c8aae7292f31b8329e37ee55810c868caa246aa39c38d17 SHA512 1aa7d9fad71cbaf1a28976cfe7dbf74d7e04b4a00f81e5d7e0b96cced0a051bcf9846122caa66bb1466790ef5b7dcea71a1b291b2300056b1846ce4e5531b165 +EBUILD perf-4.14.33-r1.ebuild 5004 BLAKE2B e6083a996ea2d925b498a229d6e1da8ebd781cd032ae13abaf88692f7dd5672412887a658c5324580f0c7eca55c2045bb67aa639c31f04e4663521704c5764b5 SHA512 61cc606b45c4f2a839dfda8e02881885a45c659cdab0ceb3a30b433dfee4180b94b267ce1ba9218559cea862a9890067956dc84e00269b9bca3ed617e6490a8c EBUILD perf-4.14.33.ebuild 4957 BLAKE2B 178c3e4dee18e132719f42cf83a209ac866dde793d69a3df3fd1a20585974dbc5a538d3d4dc5638fb20ff19ffae7eaf5a84d44b0b7f9b90ddf50a6794a57e71f SHA512 1c2346b9fd9c507185556e984b4976c55727290717d982b0fd2258e5d2d8dee015a62773de672afc9b7283afcec3820a20244911f44b5496c4bf53f78f34f695 EBUILD perf-4.4.4.ebuild 5040 BLAKE2B fd6ff983115568989077d1d626b29121b452a11552d982b85a992cb6016b41e7beb7750008c8b87833f6dded0f6f2281275bffe7ad9c61dc773ec69a6f7fa33f SHA512 f39e5397d269f879dbaa62b4cfacebba27dd2f26feb17d70b5b4f60fcf256438c2920df340c27abb45f24404b21ace1c5bab982c7e4a93c2befa382762e76967 EBUILD perf-4.9.13.ebuild 4925 BLAKE2B 919acbb8b5bc86a8cc0de41f963e87a85f16d7ba3fee026adab0c29ac5a46c8846fd102592576f0efdebb379080bf1580babfb0bc23729ea386ae3cc7ba3d634 SHA512 750501145fd525bf5e973edb7f4645cf0cd94c3449ae859ffcc33896e8963db8e573248893441de971248af2842fa18df9222704b5b92880a356e8656776a597 diff --git a/dev-util/perf/perf-4.14.33-r1.ebuild b/dev-util/perf/perf-4.14.33-r1.ebuild new file mode 100644 index 000000000000..6eb3fa30238f --- /dev/null +++ b/dev-util/perf/perf-4.14.33-r1.ebuild @@ -0,0 +1,185 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 ) +inherit bash-completion-r1 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=$(ver_cut 1-2).$(($(ver_cut 3)-1)) + PATCH_VERSION=$(ver_cut 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}" +elif [[ ${PV} == *.*.* ]] ; then + # stable-release series + LINUX_VER=$(ver_cut 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 + +LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" +SRC_URI+=" mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="audit debug +demangle +doc gtk numa perl python slang unwind" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="audit? ( sys-process/audit ) + demangle? ( sys-libs/binutils-libs:= ) + gtk? ( x11-libs/gtk+:2 ) + numa? ( sys-process/numactl ) + perl? ( dev-lang/perl ) + python? ( ${PYTHON_DEPS} ) + slang? ( dev-libs/newt ) + unwind? ( sys-libs/libunwind ) + dev-libs/elfutils" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-4.9 + ${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() { + 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() { + default + if [[ -n ${LINUX_PATCH} ]] ; then + cd "${S_K}" + eapply "${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 + # A few places still use -Werror w/out $(WERROR) protection. + sed -i -e 's:-Werror::' \ + "${S}"/Makefile.perf "${S_K}"/tools/lib/bpf/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 ... + + # LIBDIR sets a search path of perf-gtk.so. Bug 515954 + + local arch=$(tc-arch-kernel) + emake V=1 \ + CC="$(tc-getCC)" AR="$(tc-getAR)" LD="$(tc-getLD)" \ + prefix="${EPREFIX}/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 \ + LIBDIR="/usr/libexec/perf-core" \ + "$@" +} + +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}" + + if use gtk; then + mv "${D}"/usr/$(get_libdir)/libperf-gtk.so \ + "${D}"/usr/libexec/perf-core || die + fi + + dodoc CREDITS + + dodoc *txt Documentation/*.txt + if use doc ; then + HTML_DOCS="Documentation/*.html" einstalldocs + 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 +} |