Install this version:
emerge -a =dev-db/lmdb-1.0.1-r2
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =dev-db/lmdb-1.0.1-r2
Or alternatively:
emerge --autounmask-write -a =dev-db/lmdb-1.0.1-r2
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 1.0.1-r2 | 8 | ~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris | 0/1.0.1-r2 |
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic toolchain-funcs multilib multilib-minimal
MY_P="${PN^^}_${PV}"
DESCRIPTION="An ultra-fast, ultra-compact key-value embedded data store"
HOMEPAGE="https://symas.com/lmdb.php"
SRC_URI="https://git.openldap.org/openldap/openldap/-/archive/${MY_P}/openldap-${MY_P}.tar.gz"
S="${WORKDIR}/openldap-${MY_P}/libraries/liblmdb"
LICENSE="OPENLDAP"
SLOT="0/${PV}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
IUSE="static-libs"
src_prepare() {
default
if [[ ${CHOST} == *-darwin* && ${CHOST#*-darwin} -lt 10 ]] ; then
# posix_memalign isn't available before 10.6, but on OSX
# malloc is always aligned for any addressable type
sed -i -e '/(__APPLE__)/a#define HAVE_MEMALIGN 1\n#define memalign(X,Y) malloc(X)' mdb.c || die
fi
multilib_copy_sources
}
multilib_src_configure() {
if [[ ${CHOST} == *-darwin* ]] ; then
soname="-dynamiclib -install_name ${EPREFIX}/usr/$(get_libdir)/liblmdb$(get_libname 1)"
replace-flags -O[123456789] -O1
fi
sed -i -e "s!^CC.*!CC = $(tc-getCC)!" \
-e "s!^CFLAGS.*!CFLAGS = ${CFLAGS}!" \
-e "s!^AR.*!AR = $(tc-getAR)!" \
-e "s!^SOEXT.*!SOEXT = $(get_libname)!" \
-e "/^prefix/s!/usr/local!${EPREFIX}/usr!" \
-e "/^libdir/s!lib\$!$(get_libdir)!" \
-e "s!shared!shared ${soname}!" \
"Makefile" || die
}
multilib_src_install() {
emake DESTDIR="${D}" install
dodoc *.doc
insinto /usr/$(get_libdir)/pkgconfig
doins lmdb.pc
if ! use static-libs; then
rm "${ED}"/usr/$(get_libdir)/liblmdb.a || die
fi
}
Manage flags for this package:
euse -i <flag> -p dev-db/lmdb |
euse -E <flag> -p dev-db/lmdb |
euse -D <flag> -p dev-db/lmdb