[dev-db/lmdb] sync with tree

This commit is contained in:
Robert Förster 2017-01-25 19:09:23 +01:00
parent 44192ba881
commit a6e76997a4

View File

@ -3,7 +3,7 @@
# $Id$ # $Id$
EAPI=6 EAPI=6
inherit toolchain-funcs flag-o-matic inherit toolchain-funcs flag-o-matic multilib
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"
@ -11,7 +11,7 @@ if [[ ${PV} = "9999" ]] ; then
KEYWORDS="" KEYWORDS=""
else else
SRC_URI="https://github.com/LMDB/lmdb/archive/LMDB_${PV}.tar.gz" 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 ~x64-solaris ~x86-solaris" 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 ~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"
@ -28,12 +28,16 @@ RDEPEND="!=net-nds/openldap-2.4.40"
S="${WORKDIR}/${P}/libraries/liblmdb" S="${WORKDIR}/${P}/libraries/liblmdb"
src_prepare() { src_prepare() {
local soname="-Wl,-soname,liblmdb$(get_libname 0)"
[[ ${CHOST} == *-darwin* ]] && \
soname="-dynamiclib -install_name ${EPREFIX}/usr/$(get_libdir)/liblmdb$(get_libname 0)"
sed -i -e "s!^CC.*!CC = $(tc-getCC)!" \ sed -i -e "s!^CC.*!CC = $(tc-getCC)!" \
-e "s!^CFLAGS.*!CFLAGS = ${CFLAGS}!" \ -e "s!^CFLAGS.*!CFLAGS = ${CFLAGS}!" \
-e "s!^AR.*!AR = $(tc-getAR)!" \ -e "s!^AR.*!AR = $(tc-getAR)!" \
-e "s!^SOEXT.*!SOEXT = $(get_libname)!" \
-e "/^prefix/s!/usr/local!${EPREFIX}/usr!" \ -e "/^prefix/s!/usr/local!${EPREFIX}/usr!" \
-e "/^libdir/s!lib\$!$(get_libdir)!" \ -e "/^libdir/s!lib\$!$(get_libdir)!" \
-e "s!shared!shared -Wl,-soname,liblmdb.so.0!" \ -e "s!shared!shared ${soname}!" \
"${S}/Makefile" || die "${S}/Makefile" || die
eapply_user eapply_user
} }
@ -52,8 +56,9 @@ src_compile() {
src_install() { src_install() {
emake DESTDIR="${D}" install emake DESTDIR="${D}" install
mv "${ED}"usr/$(get_libdir)/liblmdb.so{,.0} || die mv "${ED}"usr/$(get_libdir)/liblmdb$(get_libname) \
dosym liblmdb.so.0 /usr/$(get_libdir)/liblmdb.so "${ED}"usr/$(get_libdir)/liblmdb$(get_libname 0) || die
dosym liblmdb$(get_libname 0) /usr/$(get_libdir)/liblmdb$(get_libname)
use static-libs || rm "${ED}"usr/$(get_libdir)/liblmdb.a || die use static-libs || rm "${ED}"usr/$(get_libdir)/liblmdb.a || die
} }