# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 inherit eutils DESCRIPTION="a C client library to the memcached server" HOMEPAGE="http://tangent.org/552/libmemcached.html" SRC_URI="http://download.tangent.org/${P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~sparc-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" IUSE="debug gtest hsieh +libevent tcmalloc" DEPEND="net-misc/memcached virtual/perl-PodParser gtest? ( dev-util/gtest ) libevent? ( dev-libs/libevent ) tcmalloc? ( dev-util/google-perftools )" RDEPEND="${DEPEND}" src_configure() { econf \ --disable-dtrace \ $(use_enable debug assert) \ $(use_with debug debug) \ $(use_enable gtest libgtest) \ $(use_enable hsieh hsieh_hash) \ $(use_enable libevent libevent) \ $(use_enable tcmalloc tcmalloc) } src_install() { emake DESTDIR="${D}" install || die "Install failed" dodoc AUTHORS ChangeLog README THANKS TODO # remove manpage to avoid collision, see bug #299330 rm -f "${D}"/usr/share/man/man1/memdump.* || die "Install failed" newman docs/memdump.1 memcached_memdump.1 } src_test() { emake -j1 test-docs test-mem test-hash test-plus || die "Tests failed" }