DIST LMDB_0.9.15.tar.gz 130113 SHA256 a72b13db91e7c445e47194178915556b4ebcd6f9f64d48f60b1f830b0cfbd75a SHA512 c6c73661aea42679c83738afbecf9542a04ceed229f72c008b4ef406e7d9284defc652c5b070897155917c5bb2c96a4c35bde3e6423ab0f1802fb711ef1cf16a WHIRLPOOL c00fbb166467a2e7157b4ffbf10525ea8fd2987d172083b07ba52990ab7c39005be3436fe948a29f2c722bf8e4cf76009be55ff5148b0d139126c9a4703c0b28
+DIST LMDB_0.9.16.tar.gz 130343 SHA256 49d7b40949f2ced9bc8b23ea6a89e75471a1c9126537a8b268c318a00b84322b SHA512 ef879df615b5ca1a5c28194ff2cad49559d336c470b3ae904428d219452a0d721cae7d64defe44119d19f7c731fe4e0e293ff09118eb057fe322feb3a5aebcc9 WHIRLPOOL 9bf349df3909874b7554175eb66f904132a39b9fc343e019793d68f8227a45a706f725adb87dd2a951acb22c4acd375ce56acc293762157b8a878d6a3f241f1a
DIST lmdb-0.9.14.tar.gz 128170 SHA256 3b14dfe2134521cfebd98168b925f7327b9bd07c715640b79f3526e54f0ccb1f SHA512 d5bde616fb22631fe1689e2c77babfbf5098833cf313bce59a5daab1e450d2998a65f087929879e73e0a897b934ff40b8e340c79ec7b2b1c1fe7e1eea7da6267 WHIRLPOOL 0ebda52fd50d9d73bc079e6a613b2e2cdaa1032665d91e499dea9dcf1698095bfe84b03a931118baae8048c616e9bae7153972446502d368e7dc9ee33105e777
--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="An ultra-fast, ultra-compact key-value embedded data store"
+HOMEPAGE="http://symas.com/mdb/"
+SRC_URI="https://github.com/LMDB/lmdb/archive/LMDB_${PV}.tar.gz"
+
+LICENSE="OPENLDAP"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="static-libs"
+
+DEPEND=""
+# =net-nds/openldap-2.4.40 installs lmdb files.
+RDEPEND="!=net-nds/openldap-2.4.40"
+
+S="${WORKDIR}/${PN}-LMDB_${PV}/libraries/liblmdb"
+
+src_prepare() {
+ sed -i -e "s/^CC.*/CC = $(tc-getCC)/" \
+ -e "s/^CFLAGS.*/CFLAGS = ${CFLAGS}/" \
+ -e "s/ar rs/$(tc-getAR) rs/" \
+ -e "s:^prefix.*:prefix = /usr:" \
+ -e "s:/man/:/share/man/:" \
+ -e "/for f/s:lib:$(get_libdir):" \
+ -e "s:shared:shared -Wl,-soname,liblmdb.so.0:" \
+ "${S}/Makefile" || die
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ emake LDLIBS+=" -pthread"
+}
+
+src_install() {
+ mkdir -p "${D}"/usr/{bin,$(get_libdir),include,share/man/man1}
+ default
+
+ mv "${D}"/usr/$(get_libdir)/liblmdb.so{,.0} || die
+ dosym liblmdb.so.0 /usr/$(get_libdir)/liblmdb.so
+
+ use static-libs || rm -f "${D}"/usr/$(get_libdir)/liblmdb.a
+}