| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/dev-util/google-perftools/google-perftools-1.10.ebuild,v 1.1 2012/07/06 00:57:34 flameeyes Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
|
| 7 |
inherit toolchain-funcs eutils flag-o-matic
|
| 8 |
|
| 9 |
DESCRIPTION="Fast, multi-threaded malloc() and nifty performance analysis tools"
|
| 10 |
HOMEPAGE="http://code.google.com/p/gperftools/"
|
| 11 |
SRC_URI="http://gperftools.googlecode.com/files/${P}.tar.gz"
|
| 12 |
|
| 13 |
LICENSE="MIT"
|
| 14 |
SLOT="0"
|
| 15 |
KEYWORDS="~amd64 ~x86 ~x86-fbsd"
|
| 16 |
IUSE="largepages +debug minimal test"
|
| 17 |
|
| 18 |
DEPEND="sys-libs/libunwind"
|
| 19 |
RDEPEND="${DEPEND}"
|
| 20 |
|
| 21 |
pkg_setup() {
|
| 22 |
# set up the make options in here so that we can actually make use
|
| 23 |
# of them on both compile and install.
|
| 24 |
|
| 25 |
# Avoid building the unit testing if we're not going to execute
|
| 26 |
# tests; this trick here allows us to ignore the tests without
|
| 27 |
# touching the build system (and thus without rebuilding
|
| 28 |
# autotools). Keep commented as long as it's restricted.
|
| 29 |
use test || \
|
| 30 |
makeopts="${makeopts} noinst_PROGRAMS= "
|
| 31 |
|
| 32 |
# don't install _anything_ from the documentation, since it would
|
| 33 |
# install it in non-standard locations, and would just waste time.
|
| 34 |
makeopts="${makeopts} dist_doc_DATA= "
|
| 35 |
}
|
| 36 |
|
| 37 |
src_configure() {
|
| 38 |
use largepages && append-cppflags -DTCMALLOC_LARGE_PAGES
|
| 39 |
|
| 40 |
append-flags -fno-strict-aliasing
|
| 41 |
|
| 42 |
econf \
|
| 43 |
--disable-static \
|
| 44 |
--disable-dependency-tracking \
|
| 45 |
--enable-fast-install \
|
| 46 |
$(use_enable debug debugalloc) \
|
| 47 |
$(use_enable minimal)
|
| 48 |
}
|
| 49 |
|
| 50 |
src_compile() {
|
| 51 |
emake ${makeopts}
|
| 52 |
}
|
| 53 |
|
| 54 |
src_test() {
|
| 55 |
case "${LD_PRELOAD}" in
|
| 56 |
*libsandbox*)
|
| 57 |
ewarn "Unable to run tests when sanbox is enabled."
|
| 58 |
ewarn "See http://bugs.gentoo.org/290249"
|
| 59 |
return 0
|
| 60 |
;;
|
| 61 |
esac
|
| 62 |
|
| 63 |
emake check
|
| 64 |
}
|
| 65 |
|
| 66 |
src_install() {
|
| 67 |
emake DESTDIR="${D}" install ${makeopts}
|
| 68 |
|
| 69 |
# Remove libtool files since we dropped the static libraries
|
| 70 |
find "${D}" -name '*.la' -delete
|
| 71 |
|
| 72 |
dodoc README AUTHORS ChangeLog TODO NEWS
|
| 73 |
pushd doc
|
| 74 |
dohtml -r *
|
| 75 |
popd
|
| 76 |
}
|