summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2011-11-01 07:33:12 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2011-11-01 07:33:12 +0000
commit8b877f4465ceb44a493385432833d7f20b52f893 (patch)
tree6525be767b340acd59815d90034ac5dfc0374054 /dev-util
parentVersion bump. (diff)
downloadhistorical-8b877f4465ceb44a493385432833d7f20b52f893.tar.gz
historical-8b877f4465ceb44a493385432833d7f20b52f893.tar.bz2
historical-8b877f4465ceb44a493385432833d7f20b52f893.zip
Version bump. Improve install phase. Fix automagic dependency on dev-libs/newt and python. Install python+perl tools. Ensure DWARF is built on amd64.
Package-Manager: portage-2.2.0_alpha70/cvs/Linux x86_64
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/perf/ChangeLog11
-rw-r--r--dev-util/perf/Manifest16
-rw-r--r--dev-util/perf/perf-3.1.ebuild165
3 files changed, 177 insertions, 15 deletions
diff --git a/dev-util/perf/ChangeLog b/dev-util/perf/ChangeLog
index 43a39144446f..89422a7fb368 100644
--- a/dev-util/perf/ChangeLog
+++ b/dev-util/perf/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-util/perf
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/perf/ChangeLog,v 1.17 2010/07/11 20:57:52 flameeyes Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/perf/ChangeLog,v 1.18 2011/11/01 07:33:12 robbat2 Exp $
+
+*perf-3.1 (01 Nov 2011)
+
+ 01 Nov 2011; Robin H. Johnson <robbat2@gentoo.org> +perf-3.1.ebuild:
+ Version bump. Improve install phase. Fix automagic dependency on
+ dev-libs/newt and python. Install python+perl tools. Ensure DWARF is built on
+ amd64.
*perf-2.6.35_rc4 (11 Jul 2010)
diff --git a/dev-util/perf/Manifest b/dev-util/perf/Manifest
index 8fac66ae3011..d90b02939f9e 100644
--- a/dev-util/perf/Manifest
+++ b/dev-util/perf/Manifest
@@ -1,17 +1,7 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
-
DIST linux-2.6.34.tar.bz2 67633622 RMD160 dafd721b00c13e3652405b517b379eed10020bf4 SHA1 4188857ba71f301991dc56285f593e9c311e5824 SHA256 fa395fec7de633df1cb85b6248b8f35af98380ed128a8bc465fb48bc4d252633
+DIST linux-3.1.tar.bz2 77190238 RMD160 f9a3ce57b9f20a1402ef340792d3c223140ce1d2 SHA1 ac792701561b1cd4279302b8bb8f474731762ad1 SHA256 2573d2378c754b0c602b57586e9311e5b38c5d1e6c137f02873833633a4b9359
DIST patch-2.6.35-rc4.bz2 7634452 RMD160 02b8f7d27d65d53ee11afc4f0b405fd846ffca4e SHA1 64cc3fab0a513b56478788f22018b6d1fd68cf18 SHA256 d462a7fb69926d91d8e9e00b0ccd79e952027dd3364b2e5d0d492f3651398d61
EBUILD perf-2.6.35_rc4.ebuild 4014 RMD160 f1f416487e8aeca4a178211700374a5db2192df0 SHA1 da392114f861b1b5f6a7ac81470a9fa83bea24c2 SHA256 f7a53b7667d75fb6c8a956452b8b4d339041df994d61b7d9943b8b7fa89ffa0f
-MISC ChangeLog 3463 RMD160 3aa00d40c912db45138f651daa1c93dd8686a2b6 SHA1 a89939cff97e6a27887a3c648217a0f308764474 SHA256 ca1075beaf1feff4cc7b85248f2564dbe49a4e1234551899424b924a027af1ca
+EBUILD perf-3.1.ebuild 4435 RMD160 51761386512386e6ff21df3242e42e062b74e971 SHA1 d0ccca4ead2fe13983a831124cc8310f4fe62bc3 SHA256 2bb585a483abb44306d88a40819eb0f464a7883877c8270defa15e0b7b34a571
+MISC ChangeLog 3714 RMD160 51821f9e255c0b1e5a20db1f1c48a65f87c27b85 SHA1 bbc31b4ecafc69801933fa9a5a0120305ecf10c3 SHA256 e1b872b95a35b0e3ef6f3c8ce7b97383807670b17435c5ffaaa5e5244237a6da
MISC metadata.xml 895 RMD160 a1c2cd38fe07482bdb795203979d465bb5c9e722 SHA1 f563e38a612975256fde1983654c062ab92aaf0d SHA256 1cab616efa038f35ab2d4cb7250aeb58cd325073dfd7e800b908662da8d3b4ce
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.18 (GNU/Linux)
-
-iJwEAQEIAAYFAk59m4cACgkQfXuS5UK5QB1oiAQApyVdWlyEzED5BUodeV1mtlD7
-dNoKhXfWqFhB3lA2FKGHHzG2V7/98vMAfDRFz62FcYVg0DL+18oYrC0xCzk9gvJ9
-BlMrkjlgw+PbJig4cx25DkuQiO8dYaXxFy2mU25GEuAi3CLVJUKTLE2y+ccW50SL
-77UYDKlwYhoFvZmidMA=
-=d90B
------END PGP SIGNATURE-----
diff --git a/dev-util/perf/perf-3.1.ebuild b/dev-util/perf/perf-3.1.ebuild
new file mode 100644
index 000000000000..f4c00ef6a54a
--- /dev/null
+++ b/dev-util/perf/perf-3.1.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/perf/perf-3.1.ebuild,v 1.1 2011/11/01 07:33:12 robbat2 Exp $
+
+EAPI=4
+
+PYTHON_DEPEND="python? 2"
+inherit versionator eutils toolchain-funcs python linux-info
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-pre/-git}"
+
+DESCRIPTION="Userland tools for Linux Performance Counters"
+HOMEPAGE="http://perf.wiki.kernel.org/"
+
+LINUX_V=$(get_version_component_range 1-2)
+
+if [ ${PV/_rc} != ${PV} ]; then
+ LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1))
+ PATCH_VERSION=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV//_/-}.bz2
+ 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 [ $(get_version_component_count) == 4 ]; then
+ # stable-release series
+ LINUX_VER=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV}.bz2
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
+else
+ LINUX_VER=${PV}
+fi
+
+LINUX_SOURCES=linux-${LINUX_VER}.tar.bz2
+SRC_URI="${SRC_URI} mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc"
+IUSE="+demangle +doc perl python ncurses"
+
+RDEPEND="demangle? ( sys-devel/binutils )
+ perl? ( || ( >=dev-lang/perl-5.10 sys-devel/libperl ) )
+ ncurses? ( dev-libs/newt )
+ dev-libs/elfutils"
+DEPEND="${RDEPEND}
+ ${LINUX_PATCH+dev-util/patchutils}
+ doc? ( app-text/asciidoc app-text/xmlto )"
+
+S_K="${WORKDIR}/linux-${LINUX_VER}"
+S="${S_K}/tools/perf"
+
+CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS"
+
+pkg_setup() {
+ use python && python_set_active_version 2
+}
+
+src_unpack() {
+ local _tarpattern=
+ local _filterdiff=
+ for _pattern in {tools/perf,include,lib,"arch/*/include"}; do
+ _tarpattern="${_tarpattern} linux-${LINUX_VER}/${_pattern}"
+ _filterdiff="${_filterdiff} -i ${_pattern}/*"
+ done
+
+ # We expect the tar implementation to support the -j option (both
+ # GNU tar and libarchive's tar support that).
+ ebegin "Unpacking partial source tarball"
+ tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} ${_tarpattern}
+ eend $? || die "tar failed"
+
+ if [[ -n ${LINUX_PATCH} ]]; then
+ ebegin "Filtering partial source patch"
+ filterdiff -p1 ${_filterdiff} -z "${DISTDIR}"/${LINUX_PATCH} > ${P}.patch || die
+ eend $? || die "filterdiff failed"
+ fi
+
+ MY_A=
+ for _AFILE in ${A}; do
+ [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue
+ [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue
+ MY_A="${MY_A} ${_AFILE}"
+ done
+ [[ -n ${MY_A} ]] && unpack ${MY_A}
+}
+
+src_prepare() {
+ if [[ -n ${LINUX_PATCH} ]]; then
+ cd "${S_K}"
+ epatch "${WORKDIR}"/${P}.patch
+ fi
+
+ # Drop some upstream too-developer-oriented flags and fix the
+ # Makefile in general
+ sed -i \
+ -e 's:-Werror::' \
+ -e 's:-ggdb3::' \
+ -e 's:-fstack-protector-all::' \
+ -e 's:^LDFLAGS =:EXTLIBS +=:' \
+ -e '/\(PERL\|PYTHON\)_EMBED_LDOPTS/s:ALL_LDFLAGS +=:EXTLIBS +=:' \
+ -e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \
+ -e '/^ALL_CFLAGS =/s:$: $(CFLAGS_OPTIMIZE):' \
+ -e '/^ALL_LDFLAGS =/s:$: $(LDFLAGS_OPTIMIZE):' \
+ -e '/.FORCE-PERF-VERSION-FILE/s,.FORCE-PERF-VERSION-FILE,,g' \
+ "${S}"/Makefile
+
+ # Avoid the call to make kernelversion
+ echo "PERF_VERSION = ${MY_PV}" >PERF-VERSION-FILE
+}
+
+perf_make() {
+ local makeargs= arch=
+
+ case $ARCH in
+ amd64) arch=x86 ;;
+ powerpc*|ppc*) arch=ppc ;;
+ *) arch=$ARCH ;;
+ esac
+ use demangle || makeargs="${makeargs} NO_DEMANGLE= "
+ use perl || makeargs="${makeargs} NO_LIBPERL= "
+ use python || makeargs="${makeargs} NO_LIBPYTHON= "
+ use ncurses || makeargs="${makeargs} NO_NEWT= "
+
+ emake ${makeargs} \
+ CC="$(tc-getCC)" AR="$(tc-getAR)" \
+ prefix="/usr" bindir_relative="sbin" \
+ CFLAGS_OPTIMIZE="${CFLAGS}" \
+ LDFLAGS_OPTIMIZE="${LDFLAGS}" \
+ ARCH="${arch}" \
+ "$@" || die
+}
+
+src_compile() {
+ perf_make || die
+
+ if use doc; then
+ pushd Documentation
+ emake ${makeargs} || die
+ popd
+ fi
+}
+
+src_test() {
+ :
+}
+
+src_install() {
+ perf_make install DESTDIR="${D}" || die
+
+ dodoc CREDITS || die
+
+ dodoc *txt Documentation/*.txt || die
+ if use doc; then
+ dohtml Documentation/*.html || die
+ doman Documentation/*.1 || die
+ 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
+}