diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-02-28 22:21:06 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-02-28 22:21:06 +0000 |
commit | 90bf98134aa651a32f17d01a290c786f371327fc (patch) | |
tree | b30cce00309b3927105f7280edfc0e8003fca159 /dev-util | |
parent | Marking xine-lib-1.2.1 ppc for bug 405659 (diff) | |
download | gentoo-2-90bf98134aa651a32f17d01a290c786f371327fc.tar.gz gentoo-2-90bf98134aa651a32f17d01a290c786f371327fc.tar.bz2 gentoo-2-90bf98134aa651a32f17d01a290c786f371327fc.zip |
Fix automagic depends #390191 and clean up the ebuild.
(Portage version: 2.2.0_alpha86/cvs/Linux x86_64)
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/perf/ChangeLog | 10 | ||||
-rw-r--r-- | dev-util/perf/perf-2.6.35_rc4.ebuild | 144 | ||||
-rw-r--r-- | dev-util/perf/perf-3.2.ebuild (renamed from dev-util/perf/perf-3.1.ebuild) | 101 |
3 files changed, 55 insertions, 200 deletions
diff --git a/dev-util/perf/ChangeLog b/dev-util/perf/ChangeLog index 89422a7fb368..c22d322ed531 100644 --- a/dev-util/perf/ChangeLog +++ b/dev-util/perf/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-util/perf -# 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 $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/perf/ChangeLog,v 1.19 2012/02/28 22:21:05 vapier Exp $ + +*perf-3.2 (28 Feb 2012) + + 28 Feb 2012; Mike Frysinger <vapier@gentoo.org> -perf-2.6.35_rc4.ebuild, + -perf-3.1.ebuild, +perf-3.2.ebuild: + Fix automagic depends #390191 and clean up the ebuild. *perf-3.1 (01 Nov 2011) diff --git a/dev-util/perf/perf-2.6.35_rc4.ebuild b/dev-util/perf/perf-2.6.35_rc4.ebuild deleted file mode 100644 index a2aeb45ff17f..000000000000 --- a/dev-util/perf/perf-2.6.35_rc4.ebuild +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/perf/perf-2.6.35_rc4.ebuild,v 1.1 2010/07/11 20:57:52 flameeyes Exp $ - -EAPI=2 - -inherit versionator eutils toolchain-funcs 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" -IUSE="+demangle +doc perl python" - -RDEPEND="demangle? ( sys-devel/binutils ) - perl? ( || ( >=dev-lang/perl-5.10 sys-devel/libperl ) ) - python? ( dev-lang/python ) - dev-libs/elfutils" -DEPEND="${RDEPEND} - ${LINUX_PATCH+dev-util/patchutils} - doc? ( app-text/asciidoc app-text/xmlto )" - -S="${WORKDIR}/linux-${LINUX_VER}/tools/perf" - -CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" - -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 "${WORKDIR}"/linux-"${LINUX_VER}" - 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):' \ - "${S}"/Makefile -} - -src_compile() { - local makeargs= - - use demangle || makeargs="${makeargs} NO_DEMANGLE= " - use perl || makeargs="${makeargs} NO_LIBPERL= " - use perl || makeargs="${makeargs} NO_LIBPERL= " - - emake ${makeargs} \ - CC="$(tc-getCC)" AR="$(tc-getAR)" \ - prefix="/usr" bindir_relative="sbin" \ - CFLAGS_OPTIMIZE="${CFLAGS}" \ - LDFLAGS_OPTIMIZE="${LDFLAGS}" || die - - if use doc; then - pushd Documentation - emake ${makeargs} || die - popd - fi -} - -src_test() { - : -} - -src_install() { - # Don't use make install or it'll be re-building the stuff :( - dobin perf || die - - dodoc CREDITS || die - - if use doc; then - dodoc Documentation/*.txt || die - 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 -} diff --git a/dev-util/perf/perf-3.1.ebuild b/dev-util/perf/perf-3.2.ebuild index f4c00ef6a54a..6fe2149df6ee 100644 --- a/dev-util/perf/perf-3.1.ebuild +++ b/dev-util/perf/perf-3.2.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 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 $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/perf/perf-3.2.ebuild,v 1.1 2012/02/28 22:21:05 vapier Exp $ -EAPI=4 +EAPI="4" PYTHON_DEPEND="python? 2" inherit versionator eutils toolchain-funcs python linux-info @@ -15,32 +15,33 @@ HOMEPAGE="http://perf.wiki.kernel.org/" LINUX_V=$(get_version_component_range 1-2) -if [ ${PV/_rc} != ${PV} ]; then +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 +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} + SRC_URI="" fi -LINUX_SOURCES=linux-${LINUX_VER}.tar.bz2 -SRC_URI="${SRC_URI} mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" +LINUX_SOURCES="linux-${LINUX_VER}.tar.bz2" +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" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="+demangle +doc perl python slang" RDEPEND="demangle? ( sys-devel/binutils ) perl? ( || ( >=dev-lang/perl-5.10 sys-devel/libperl ) ) - ncurses? ( dev-libs/newt ) + slang? ( dev-libs/newt ) dev-libs/elfutils" DEPEND="${RDEPEND} ${LINUX_PATCH+dev-util/patchutils} @@ -56,36 +57,32 @@ pkg_setup() { } 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 + local paths=( tools/perf include lib "arch/*/include" "arch/*/lib" ) # 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" + echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" + tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ + "${paths[@]/#/linux-${LINUX_VER}/}" || die - if [[ -n ${LINUX_PATCH} ]]; then + if [[ -n ${LINUX_PATCH} ]] ; then + eshopts_push -o noglob ebegin "Filtering partial source patch" - filterdiff -p1 ${_filterdiff} -z "${DISTDIR}"/${LINUX_PATCH} > ${P}.patch || die + filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} > ${P}.patch || die eend $? || die "filterdiff failed" + eshopts_pop fi - MY_A= - for _AFILE in ${A}; do - [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue - [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue - MY_A="${MY_A} ${_AFILE}" + local a + for a in ${A}; do + [[ ${a} == ${LINUX_SOURCES} ]] && continue + [[ ${a} == ${LINUX_PATCH} ]] && continue + unpack ${a} done - [[ -n ${MY_A} ]] && unpack ${MY_A} } src_prepare() { - if [[ -n ${LINUX_PATCH} ]]; then + if [[ -n ${LINUX_PATCH} ]] ; then cd "${S_K}" epatch "${WORKDIR}"/${P}.patch fi @@ -105,37 +102,33 @@ src_prepare() { "${S}"/Makefile # Avoid the call to make kernelversion - echo "PERF_VERSION = ${MY_PV}" >PERF-VERSION-FILE + echo "PERF_VERSION = ${MY_PV}" > PERF-VERSION-FILE + + # The code likes to compile local assembly files which lack ELF markings. + find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + } +puse() { usex $1 "" no; } 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} \ + emake V=1 \ CC="$(tc-getCC)" AR="$(tc-getAR)" \ prefix="/usr" bindir_relative="sbin" \ CFLAGS_OPTIMIZE="${CFLAGS}" \ LDFLAGS_OPTIMIZE="${LDFLAGS}" \ - ARCH="${arch}" \ - "$@" || die + ARCH="$(tc-arch-kernel)" \ + NO_DEMANGLE=$(puse demangle) \ + NO_LIBPERL=$(puse perl) \ + NO_LIBPYTHON=$(puse python) \ + NO_NEWT=$(puse slang) \ + "$@" } src_compile() { - perf_make || die + perf_make - if use doc; then + if use doc ; then pushd Documentation - emake ${makeargs} || die + emake ${makeargs} popd fi } @@ -145,19 +138,19 @@ src_test() { } src_install() { - perf_make install DESTDIR="${D}" || die + perf_make install DESTDIR="${D}" - dodoc CREDITS || die + dodoc CREDITS - dodoc *txt Documentation/*.txt || die - if use doc; then - dohtml Documentation/*.html || die - doman Documentation/*.1 || die + dodoc *txt Documentation/*.txt + if use doc ; then + dohtml Documentation/*.html + doman Documentation/*.1 fi } pkg_postinst() { - if ! use doc; then + 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." |