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