Gentoo Archives: gentoo-commits

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