[dev-db/lmdb] sync with tree
This commit is contained in:
parent
bb15454db3
commit
89ba3798d0
@ -1,32 +1,42 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
# Copyright 1999-2019 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=6
|
EAPI=7
|
||||||
inherit toolchain-funcs flag-o-matic multilib
|
|
||||||
|
inherit flag-o-matic multilib-minimal toolchain-funcs
|
||||||
|
|
||||||
if [[ ${PV} = "9999" ]] ; then
|
if [[ ${PV} = "9999" ]] ; then
|
||||||
EGIT_REPO_URI="https://github.com/LMDB/lmdb.git"
|
EGIT_REPO_URI="https://github.com/LMDB/lmdb.git"
|
||||||
inherit git-r3
|
inherit git-r3
|
||||||
KEYWORDS=""
|
KEYWORDS=""
|
||||||
else
|
else
|
||||||
SRC_URI="https://github.com/LMDB/lmdb/archive/LMDB_${PV}.tar.gz"
|
SRC_URI="https://github.com/LMDB/lmdb/archive/${MY_P}.tar.gz"
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DESCRIPTION="An ultra-fast, ultra-compact key-value embedded data store"
|
DESCRIPTION="An ultra-fast, ultra-compact key-value embedded data store"
|
||||||
HOMEPAGE="http://symas.com/mdb/"
|
HOMEPAGE="https://symas.com/lmdb/technical/"
|
||||||
|
|
||||||
LICENSE="OPENLDAP"
|
LICENSE="OPENLDAP"
|
||||||
SLOT="0/0.9.21"
|
SLOT="0/0.9.24"
|
||||||
IUSE="static-libs"
|
IUSE="static-libs"
|
||||||
|
|
||||||
DEPEND=""
|
DEPEND=""
|
||||||
# =net-nds/openldap-2.4.40 installs lmdb files.
|
RDEPEND=""
|
||||||
RDEPEND="!=net-nds/openldap-2.4.40"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${P}/libraries/liblmdb"
|
S="${WORKDIR}/${P}/libraries/liblmdb"
|
||||||
|
|
||||||
src_prepare() {
|
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() {
|
||||||
local soname="-Wl,-soname,liblmdb$(get_libname 0)"
|
local soname="-Wl,-soname,liblmdb$(get_libname 0)"
|
||||||
[[ ${CHOST} == *-darwin* ]] && \
|
[[ ${CHOST} == *-darwin* ]] && \
|
||||||
soname="-dynamiclib -install_name ${EPREFIX}/usr/$(get_libdir)/liblmdb$(get_libname 0)"
|
soname="-dynamiclib -install_name ${EPREFIX}/usr/$(get_libdir)/liblmdb$(get_libname 0)"
|
||||||
@ -38,26 +48,32 @@ src_prepare() {
|
|||||||
-e "/^libdir/s!lib\$!$(get_libdir)!" \
|
-e "/^libdir/s!lib\$!$(get_libdir)!" \
|
||||||
-e "s!shared!shared ${soname}!" \
|
-e "s!shared!shared ${soname}!" \
|
||||||
"${S}/Makefile" || die
|
"${S}/Makefile" || die
|
||||||
eapply_user
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
if [[ ${CHOST} == *-solaris* ]] ; then
|
if [[ ${CHOST} == *-solaris* ]] ; then
|
||||||
# fdatasync lives in -lrt on Solaris 10
|
# fdatasync lives in -lrt on Solaris 10
|
||||||
[[ ${CHOST#*-solaris2.} -le 10 ]] && append-ldflags -lrt
|
[[ ${CHOST#*-solaris2.} -le 10 ]] && append-ldflags -lrt
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
src_compile() {
|
multilib_src_compile() {
|
||||||
emake LDLIBS+=" -pthread"
|
emake LDLIBS+=" -pthread"
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
multilib_src_install() {
|
||||||
emake DESTDIR="${D}" install
|
emake DESTDIR="${D}" install
|
||||||
|
|
||||||
mv "${ED}"usr/$(get_libdir)/liblmdb$(get_libname) \
|
mv "${ED}"/usr/$(get_libdir)/liblmdb$(get_libname) \
|
||||||
"${ED}"usr/$(get_libdir)/liblmdb$(get_libname 0) || die
|
"${ED}"/usr/$(get_libdir)/liblmdb$(get_libname 0) || die
|
||||||
dosym liblmdb$(get_libname 0) /usr/$(get_libdir)/liblmdb$(get_libname)
|
dosym liblmdb$(get_libname 0) /usr/$(get_libdir)/liblmdb$(get_libname)
|
||||||
|
|
||||||
use static-libs || rm "${ED}"usr/$(get_libdir)/liblmdb.a || die
|
insinto /usr/$(get_libdir)/pkgconfig
|
||||||
|
doins "${FILESDIR}/lmdb.pc"
|
||||||
|
sed -i -e "s!@PACKAGE_VERSION@!${PV}!" \
|
||||||
|
-e "s!@prefix@!${EPREFIX}/usr!g" \
|
||||||
|
-e "s!@libdir@!$(get_libdir)!" \
|
||||||
|
"${ED}"/usr/$(get_libdir)/pkgconfig/lmdb.pc || die
|
||||||
|
|
||||||
|
if ! use static-libs; then
|
||||||
|
rm "${ED}"/usr/$(get_libdir)/liblmdb.a || die
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user