2015-12-04 23:26:21 +01:00
|
|
|
# Copyright 1999-2015 Gentoo Foundation
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
EAPI=5
|
|
|
|
inherit toolchain-funcs
|
|
|
|
|
2015-12-31 10:47:31 +01:00
|
|
|
if [[ ${PV} = "9999" ]] ; then
|
|
|
|
EGIT_REPO_URI="https://github.com/LMDB/lmdb.git"
|
|
|
|
inherit git-r3
|
|
|
|
KEYWORDS=""
|
|
|
|
else
|
|
|
|
SRC_URI="https://github.com/LMDB/lmdb/archive/LMDB_${PV}.tar.gz"
|
|
|
|
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"
|
|
|
|
fi
|
|
|
|
|
2015-12-04 23:26:21 +01:00
|
|
|
DESCRIPTION="An ultra-fast, ultra-compact key-value embedded data store"
|
|
|
|
HOMEPAGE="http://symas.com/mdb/"
|
|
|
|
|
|
|
|
LICENSE="OPENLDAP"
|
|
|
|
SLOT="0"
|
|
|
|
IUSE="static-libs"
|
|
|
|
|
|
|
|
DEPEND=""
|
|
|
|
# =net-nds/openldap-2.4.40 installs lmdb files.
|
|
|
|
RDEPEND="!=net-nds/openldap-2.4.40"
|
|
|
|
|
2015-12-31 10:47:31 +01:00
|
|
|
S="${WORKDIR}/${P}/libraries/liblmdb"
|
2015-12-04 23:26:21 +01:00
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
sed -i -e "s/^CC.*/CC = $(tc-getCC)/" \
|
|
|
|
-e "s/^CFLAGS.*/CFLAGS = ${CFLAGS}/" \
|
|
|
|
-e "s/^AR.*/AR = $(tc-getAR)/" \
|
|
|
|
-e "s:shared:shared -Wl,-soname,liblmdb.so.0:" \
|
|
|
|
"${S}/Makefile" || die
|
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
:
|
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
2015-12-31 10:47:31 +01:00
|
|
|
emake LDLIBS+=" -pthread" || die
|
2015-12-04 23:26:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2015-12-31 10:47:31 +01:00
|
|
|
emake DESTDIR="${ED}" prefix="${EROOT}usr" libdir="${EROOT}usr/$(get_libdir)" install || die
|
2015-12-04 23:26:21 +01:00
|
|
|
|
|
|
|
mv "${ED}"usr/$(get_libdir)/liblmdb.so{,.0} || die
|
|
|
|
dosym liblmdb.so.0 "${EROOT}"usr/$(get_libdir)/liblmdb.so
|
|
|
|
|
2015-12-31 10:47:31 +01:00
|
|
|
use static-libs || rm "${ED}"usr/$(get_libdir)/liblmdb.a || die
|
2015-12-04 23:26:21 +01:00
|
|
|
}
|