Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/perf: perf-3.13.1.ebuild ChangeLog
Date: Fri, 07 Feb 2014 08:03:11
Message-Id: 20140207080307.737ED2004C@flycatcher.gentoo.org
1 vapier 14/02/07 08:03:07
2
3 Modified: ChangeLog
4 Added: perf-3.13.1.ebuild
5 Log:
6 Version bump.
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
9
10 Revision Changes Path
11 1.27 dev-util/perf/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/perf/ChangeLog?rev=1.27&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/perf/ChangeLog?rev=1.27&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/perf/ChangeLog?r1=1.26&r2=1.27
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-util/perf/ChangeLog,v
20 retrieving revision 1.26
21 retrieving revision 1.27
22 diff -u -r1.26 -r1.27
23 --- ChangeLog 11 Dec 2013 22:36:19 -0000 1.26
24 +++ ChangeLog 7 Feb 2014 08:03:07 -0000 1.27
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-util/perf
27 -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-util/perf/ChangeLog,v 1.26 2013/12/11 22:36:19 vapier Exp $
29 +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/dev-util/perf/ChangeLog,v 1.27 2014/02/07 08:03:07 vapier Exp $
31 +
32 +*perf-3.13.1 (07 Feb 2014)
33 +
34 + 07 Feb 2014; Mike Frysinger <vapier@g.o> +perf-3.13.1.ebuild:
35 + Version bump.
36
37 11 Dec 2013; Mike Frysinger <vapier@g.o> perf-3.12.ebuild:
38 Fix by Vincent Palatin to use tc-arch-kernel to get at the ARCH value.
39
40
41
42 1.1 dev-util/perf/perf-3.13.1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/perf/perf-3.13.1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/perf/perf-3.13.1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: perf-3.13.1.ebuild
48 ===================================================================
49 # Copyright 1999-2014 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-util/perf/perf-3.13.1.ebuild,v 1.1 2014/02/07 08:03:07 vapier Exp $
52
53 EAPI="5"
54
55 PYTHON_COMPAT=( python{2_5,2_6,2_7} )
56 inherit versionator eutils toolchain-funcs python-single-r1 linux-info
57
58 MY_PV="${PV/_/-}"
59 MY_PV="${MY_PV/-pre/-git}"
60
61 DESCRIPTION="Userland tools for Linux Performance Counters"
62 HOMEPAGE="http://perf.wiki.kernel.org/"
63
64 LINUX_V="${PV:0:1}.x"
65 if [[ ${PV} == *_rc* ]] ; then
66 LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1))
67 PATCH_VERSION=$(get_version_component_range 1-3)
68 LINUX_PATCH=patch-${PV//_/-}.xz
69 SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH}
70 mirror://kernel/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
71 else
72 VER_COUNT=$(get_version_component_count)
73 if [[ ${VER_COUNT} -gt 2 ]] ; then
74 # stable-release series
75 LINUX_VER=$(get_version_component_range 1-2)
76 LINUX_PATCH=patch-${PV}.xz
77 SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
78 else
79 LINUX_VER=${PV}
80 SRC_URI=""
81 fi
82 fi
83
84 LINUX_SOURCES="linux-${LINUX_VER}.tar.xz"
85 SRC_URI+=" mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
86
87 LICENSE="GPL-2"
88 SLOT="0"
89 KEYWORDS="~amd64 ~arm ~ppc ~x86"
90 IUSE="audit +demangle +doc perl python slang unwind"
91
92 RDEPEND="audit? ( sys-process/audit )
93 demangle? ( sys-devel/binutils )
94 perl? ( || ( >=dev-lang/perl-5.10 sys-devel/libperl ) )
95 slang? ( dev-libs/newt )
96 unwind? ( sys-libs/libunwind )
97 dev-libs/elfutils"
98 DEPEND="${RDEPEND}
99 ${LINUX_PATCH+dev-util/patchutils}
100 sys-devel/bison
101 sys-devel/flex
102 doc? (
103 app-text/asciidoc
104 app-text/sgml-common
105 app-text/xmlto
106 sys-process/time
107 )
108 python? ( ${PYTHON_DEPS} )"
109
110 S_K="${WORKDIR}/linux-${LINUX_VER}"
111 S="${S_K}/tools/perf"
112
113 CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS"
114
115 pkg_setup() {
116 linux-info_pkg_setup
117 python-single-r1_pkg_setup
118 }
119
120 src_unpack() {
121 local paths=( tools/perf tools/scripts tools/lib include lib "arch/*/include" "arch/*/lib" )
122
123 # We expect the tar implementation to support the -j option (both
124 # GNU tar and libarchive's tar support that).
125 echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}"
126 tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \
127 "${paths[@]/#/linux-${LINUX_VER}/}" || die
128
129 if [[ -n ${LINUX_PATCH} ]] ; then
130 eshopts_push -o noglob
131 ebegin "Filtering partial source patch"
132 filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} > ${P}.patch || die
133 eend $? || die "filterdiff failed"
134 eshopts_pop
135 fi
136
137 local a
138 for a in ${A}; do
139 [[ ${a} == ${LINUX_SOURCES} ]] && continue
140 [[ ${a} == ${LINUX_PATCH} ]] && continue
141 unpack ${a}
142 done
143 }
144
145 src_prepare() {
146 if [[ -n ${LINUX_PATCH} ]] ; then
147 cd "${S_K}"
148 epatch "${WORKDIR}"/${P}.patch
149 fi
150
151 # Drop some upstream too-developer-oriented flags and fix the
152 # Makefile in general
153 sed -i \
154 -e 's:-Werror::' \
155 -e 's:-ggdb3::' \
156 -e 's:-fstack-protector-all::' \
157 -e 's:^LDFLAGS =:EXTLIBS +=:' \
158 -e '/\(PERL\|PYTHON\)_EMBED_LDOPTS/s:ALL_LDFLAGS +=:EXTLIBS +=:' \
159 -e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \
160 -e '/^ALL_CFLAGS =/s:$: $(CFLAGS_OPTIMIZE):' \
161 -e '/^ALL_LDFLAGS =/s:$: $(LDFLAGS_OPTIMIZE):' \
162 -e 's:$(sysconfdir_SQ)/bash_completion.d:/usr/share/bash-completion:' \
163 "${S}"/Makefile || die
164 sed -i -e 's:-Werror::' "${S_K}"/tools/lib/lk/Makefile || die
165 sed -i \
166 -e '/.FORCE-PERF-VERSION-FILE/s,.FORCE-PERF-VERSION-FILE,,g' \
167 "${S}"/Makefile \
168 "${S}"/Documentation/Makefile || die
169
170 # Avoid the call to make kernelversion
171 echo "#define PERF_VERSION \"${MY_PV}\"" > PERF-VERSION-FILE
172
173 # The code likes to compile local assembly files which lack ELF markings.
174 find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} +
175 }
176
177 puse() { usex $1 "" no; }
178 perf_make() {
179 # The arch parsing is a bit funky. The perf tools package is integrated
180 # into the kernel, so it wants an ARCH that looks like the kernel arch,
181 # but it also wants to know about the split value -- i386/x86_64 vs just
182 # x86. We can get that by telling the func to use an older linux version.
183 # It's kind of a hack, but not that bad ...
184 local arch=$(KV=2.6.23 tc-arch-kernel)
185 emake V=1 \
186 CC="$(tc-getCC)" AR="$(tc-getAR)" \
187 prefix="/usr" bindir_relative="sbin" \
188 CFLAGS_OPTIMIZE="${CFLAGS}" \
189 LDFLAGS_OPTIMIZE="${LDFLAGS}" \
190 ARCH="${arch}" \
191 NO_DEMANGLE=$(puse demangle) \
192 NO_LIBAUDIT=$(puse audit) \
193 NO_LIBPERL=$(puse perl) \
194 NO_LIBPYTHON=$(puse python) \
195 NO_LIBUNWIND=$(puse unwind) \
196 NO_NEWT=$(puse slang) \
197 WERROR=0 \
198 "$@"
199 }
200
201 src_compile() {
202 perf_make -f Makefile.perf
203 use doc && perf_make -C Documentation
204 }
205
206 src_test() {
207 :
208 }
209
210 src_install() {
211 perf_make -f Makefile.perf install DESTDIR="${D}"
212
213 dodoc CREDITS
214
215 dodoc *txt Documentation/*.txt
216 if use doc ; then
217 dohtml Documentation/*.html
218 doman Documentation/*.1
219 fi
220 }
221
222 pkg_postinst() {
223 if ! use doc ; then
224 elog "Without the doc USE flag you won't get any documentation nor man pages."
225 elog "And without man pages, you won't get any --help output for perf and its"
226 elog "sub-tools."
227 fi
228 }