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.13.1-r1.ebuild ChangeLog
Date: Sat, 22 Mar 2014 08:05:39
Message-Id: 20140322080534.B73D42004F@flycatcher.gentoo.org
1 naota 14/03/22 08:05:34
2
3 Modified: ChangeLog
4 Added: perf-3.13.1-r1.ebuild
5 Log:
6 Move perf from /usr/sbin to /usr/bin #503790
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key F8551514)
9
10 Revision Changes Path
11 1.29 dev-util/perf/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/perf/ChangeLog?rev=1.29&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/perf/ChangeLog?rev=1.29&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/perf/ChangeLog?r1=1.28&r2=1.29
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-util/perf/ChangeLog,v
20 retrieving revision 1.28
21 retrieving revision 1.29
22 diff -u -r1.28 -r1.29
23 --- ChangeLog 26 Feb 2014 18:03:50 -0000 1.28
24 +++ ChangeLog 22 Mar 2014 08:05:34 -0000 1.29
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-util/perf
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-util/perf/ChangeLog,v 1.28 2014/02/26 18:03:50 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-util/perf/ChangeLog,v 1.29 2014/03/22 08:05:34 naota Exp $
30 +
31 +*perf-3.13.1-r1 (22 Mar 2014)
32 +
33 + 22 Mar 2014; Naohiro Aota <naota@g.o> +perf-3.13.1-r1.ebuild:
34 + Move perf from /usr/sbin to /usr/bin #503790
35
36 26 Feb 2014; Mike Frysinger <vapier@g.o> perf-3.13.1.ebuild:
37 Add USE=gtk to control gtk+ dep; fix by Sonny Rao.
38
39
40
41 1.1 dev-util/perf/perf-3.13.1-r1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/perf/perf-3.13.1-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/perf/perf-3.13.1-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: perf-3.13.1-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-util/perf/perf-3.13.1-r1.ebuild,v 1.1 2014/03/22 08:05:34 naota Exp $
51
52 EAPI="5"
53
54 PYTHON_COMPAT=( python{2_5,2_6,2_7} )
55 inherit versionator eutils toolchain-funcs python-single-r1 linux-info
56
57 MY_PV="${PV/_/-}"
58 MY_PV="${MY_PV/-pre/-git}"
59
60 DESCRIPTION="Userland tools for Linux Performance Counters"
61 HOMEPAGE="http://perf.wiki.kernel.org/"
62
63 LINUX_V="${PV:0:1}.x"
64 if [[ ${PV} == *_rc* ]] ; then
65 LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1))
66 PATCH_VERSION=$(get_version_component_range 1-3)
67 LINUX_PATCH=patch-${PV//_/-}.xz
68 SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH}
69 mirror://kernel/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
70 else
71 VER_COUNT=$(get_version_component_count)
72 if [[ ${VER_COUNT} -gt 2 ]] ; then
73 # stable-release series
74 LINUX_VER=$(get_version_component_range 1-2)
75 LINUX_PATCH=patch-${PV}.xz
76 SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
77 else
78 LINUX_VER=${PV}
79 SRC_URI=""
80 fi
81 fi
82
83 LINUX_SOURCES="linux-${LINUX_VER}.tar.xz"
84 SRC_URI+=" mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
85
86 LICENSE="GPL-2"
87 SLOT="0"
88 KEYWORDS="~amd64 ~arm ~ppc ~x86"
89 IUSE="audit +demangle +doc gtk perl python slang unwind"
90
91 RDEPEND="audit? ( sys-process/audit )
92 demangle? ( sys-devel/binutils )
93 gtk? ( x11-libs/gtk+:2 )
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="bin" \
188 CFLAGS_OPTIMIZE="${CFLAGS}" \
189 LDFLAGS_OPTIMIZE="${LDFLAGS}" \
190 ARCH="${arch}" \
191 NO_DEMANGLE=$(puse demangle) \
192 NO_GTK2=$(puse gtk) \
193 NO_LIBAUDIT=$(puse audit) \
194 NO_LIBPERL=$(puse perl) \
195 NO_LIBPYTHON=$(puse python) \
196 NO_LIBUNWIND=$(puse unwind) \
197 NO_NEWT=$(puse slang) \
198 WERROR=0 \
199 "$@"
200 }
201
202 src_compile() {
203 perf_make -f Makefile.perf
204 use doc && perf_make -C Documentation
205 }
206
207 src_test() {
208 :
209 }
210
211 src_install() {
212 perf_make -f Makefile.perf install DESTDIR="${D}"
213
214 dodoc CREDITS
215
216 dodoc *txt Documentation/*.txt
217 if use doc ; then
218 dohtml Documentation/*.html
219 doman Documentation/*.1
220 fi
221 }
222
223 pkg_postinst() {
224 if ! use doc ; then
225 elog "Without the doc USE flag you won't get any documentation nor man pages."
226 elog "And without man pages, you won't get any --help output for perf and its"
227 elog "sub-tools."
228 fi
229 }