1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils multilib toolchain-funcs
9 DESCRIPTION="a fast key-value storage library written at Google"
10 HOMEPAGE="https://github.com/google/leveldb"
11 SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
15 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
16 IUSE="+snappy static-libs +tcmalloc"
18 DEPEND="tcmalloc? ( dev-util/google-perftools )
21 static-libs? ( app-arch/snappy[static-libs] )
26 epatch "${FILESDIR}"/${PN}-1.9.0-forwardcompat.patch
30 # These vars all get picked up by build_detect_platform
31 # which the Makefile runs for us automatically.
33 export OPT="-DNDEBUG ${CPPFLAGS}"
34 # Probably needs more filling out
37 *) TARGET_OS="Linux";;
39 export USE_SNAPPY=$(usex snappy)
40 export USE_TCMALLOC=no
44 emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
53 doins -r include/* helpers/memenv/memenv.h
54 dolib.so libleveldb*$(get_libname)*
55 use static-libs && dolib.a libleveldb.a