diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2013-01-20 23:48:29 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2013-01-20 23:48:29 +0000 |
commit | 249f57e68dcce4cc706e41b150cce78adaf75ff4 (patch) | |
tree | 8be7ce1e0af543c09c73aa26043f8e4ea885b659 /dev-util/google-perftools | |
parent | Enable EAPI=5. (diff) | |
download | gentoo-2-249f57e68dcce4cc706e41b150cce78adaf75ff4.tar.gz gentoo-2-249f57e68dcce4cc706e41b150cce78adaf75ff4.tar.bz2 gentoo-2-249f57e68dcce4cc706e41b150cce78adaf75ff4.zip |
Compilefix for bug #446770, done w/ revbump due to change of internal lock for SuggestedDelayNS function.
(Portage version: 2.2.0_alpha144/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'dev-util/google-perftools')
-rw-r--r-- | dev-util/google-perftools/ChangeLog | 9 | ||||
-rw-r--r-- | dev-util/google-perftools/files/gperftools-2.0-32bit-barrier.patch | 17 | ||||
-rw-r--r-- | dev-util/google-perftools/google-perftools-2.0-r1.ebuild | 90 |
3 files changed, 115 insertions, 1 deletions
diff --git a/dev-util/google-perftools/ChangeLog b/dev-util/google-perftools/ChangeLog index b4dd173aa60f..de776297da44 100644 --- a/dev-util/google-perftools/ChangeLog +++ b/dev-util/google-perftools/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-util/google-perftools # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/google-perftools/ChangeLog,v 1.22 2013/01/20 23:32:36 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/google-perftools/ChangeLog,v 1.23 2013/01/20 23:48:29 robbat2 Exp $ + +*google-perftools-2.0-r1 (20 Jan 2013) + + 20 Jan 2013; Robin H. Johnson <robbat2@gentoo.org> + +files/gperftools-2.0-32bit-barrier.patch, +google-perftools-2.0-r1.ebuild: + Compilefix for bug #446770, done w/ revbump due to change of internal lock for + SuggestedDelayNS function. 20 Jan 2013; Robin H. Johnson <robbat2@gentoo.org> google-perftools-2.0.ebuild: diff --git a/dev-util/google-perftools/files/gperftools-2.0-32bit-barrier.patch b/dev-util/google-perftools/files/gperftools-2.0-32bit-barrier.patch new file mode 100644 index 000000000000..df89a92ed010 --- /dev/null +++ b/dev-util/google-perftools/files/gperftools-2.0-32bit-barrier.patch @@ -0,0 +1,17 @@ +Atomic64 not available on all architectures. +Use AtomicWord instead. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +diff -Nuar gperftools-2.0.orig/src/base/spinlock_internal.cc gperftools-2.0/src/base/spinlock_internal.cc +--- gperftools-2.0.orig/src/base/spinlock_internal.cc 2012-02-02 21:36:23.000000000 +0000 ++++ gperftools-2.0/src/base/spinlock_internal.cc 2013-01-20 23:44:01.629077919 +0000 +@@ -80,7 +80,7 @@ + static int SuggestedDelayNS(int loop) { + // Weak pseudo-random number generator to get some spread between threads + // when many are spinning. +- static base::subtle::Atomic64 rand; ++ static AtomicWord rand; + uint64 r = base::subtle::NoBarrier_Load(&rand); + r = 0x5deece66dLL * r + 0xb; // numbers from nrand48() + base::subtle::NoBarrier_Store(&rand, r); diff --git a/dev-util/google-perftools/google-perftools-2.0-r1.ebuild b/dev-util/google-perftools/google-perftools-2.0-r1.ebuild new file mode 100644 index 000000000000..d7b3dbb88b31 --- /dev/null +++ b/dev-util/google-perftools/google-perftools-2.0-r1.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/google-perftools/google-perftools-2.0-r1.ebuild,v 1.1 2013/01/20 23:48:29 robbat2 Exp $ + +EAPI=4 + +MY_P="gperftools-${PV}" + +inherit toolchain-funcs eutils flag-o-matic + +DESCRIPTION="Fast, multi-threaded malloc() and nifty performance analysis tools" +HOMEPAGE="http://code.google.com/p/gperftools/" +SRC_URI="http://gperftools.googlecode.com/files/${MY_P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +# contains ASM code, with support for +# freebsd x86/amd64 +# linux x86/amd64/ppc/ppc64/arm +# OSX ppc/amd64 +# AIX ppc/ppc64 +KEYWORDS="-* ~arm ~amd64 ~ppc64 ~x86 ~x86-fbsd" +IUSE="largepages +debug minimal test" + +DEPEND="sys-libs/libunwind" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + # set up the make options in here so that we can actually make use + # of them on both compile and install. + + # Avoid building the unit testing if we're not going to execute + # tests; this trick here allows us to ignore the tests without + # touching the build system (and thus without rebuilding + # autotools). Keep commented as long as it's restricted. + use test || \ + makeopts="${makeopts} noinst_PROGRAMS= " + + # don't install _anything_ from the documentation, since it would + # install it in non-standard locations, and would just waste time. + makeopts="${makeopts} dist_doc_DATA= " +} + +src_prepare() { + epatch "${FILESDIR}/${MY_P}+glibc-2.16.patch" + epatch "${FILESDIR}/${MY_P}-32bit-barrier.patch" +} + +src_configure() { + use largepages && append-cppflags -DTCMALLOC_LARGE_PAGES + + append-flags -fno-strict-aliasing -fno-omit-frame-pointer + + econf \ + --disable-static \ + --disable-dependency-tracking \ + --enable-fast-install \ + $(use_enable debug debugalloc) \ + $(use_enable minimal) +} + +src_compile() { + emake ${makeopts} +} + +src_test() { + case "${LD_PRELOAD}" in + *libsandbox*) + ewarn "Unable to run tests when sanbox is enabled." + ewarn "See http://bugs.gentoo.org/290249" + return 0 + ;; + esac + + emake check +} + +src_install() { + emake DESTDIR="${D}" install ${makeopts} + + # Remove libtool files since we dropped the static libraries + find "${D}" -name '*.la' -delete + + dodoc README AUTHORS ChangeLog TODO NEWS + pushd doc + dohtml -r * + popd +} |