summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2017-01-25 18:56:23 +0100
committerFabian Groffen <grobian@gentoo.org>2017-01-25 18:56:36 +0100
commit1eefd32dcd153682ad38bfe258295d93a67deb04 (patch)
treef651ed193c0e5ceecca99d9511f964a59a4d39c5 /dev-db
parentmedia-libs/mesa: Drop sha1 dependencies. (diff)
downloadgentoo-1eefd32dcd153682ad38bfe258295d93a67deb04.tar.gz
gentoo-1eefd32dcd153682ad38bfe258295d93a67deb04.tar.bz2
gentoo-1eefd32dcd153682ad38bfe258295d93a67deb04.zip
dev-db/lmdb: add support for and keyword ~*-macos
Package-Manager: portage-2.3.3
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/lmdb/lmdb-0.9.19.ebuild15
1 files changed, 10 insertions, 5 deletions
diff --git a/dev-db/lmdb/lmdb-0.9.19.ebuild b/dev-db/lmdb/lmdb-0.9.19.ebuild
index 9340aa20bba7..6172bb10249b 100644
--- a/dev-db/lmdb/lmdb-0.9.19.ebuild
+++ b/dev-db/lmdb/lmdb-0.9.19.ebuild
@@ -3,7 +3,7 @@
# $Id$
EAPI=6
-inherit toolchain-funcs flag-o-matic
+inherit toolchain-funcs flag-o-matic multilib
DESCRIPTION="An ultra-fast, ultra-compact key-value embedded data store"
HOMEPAGE="http://symas.com/mdb/"
@@ -11,7 +11,7 @@ SRC_URI="https://github.com/LMDB/lmdb/archive/LMDB_${PV}.tar.gz"
LICENSE="OPENLDAP"
SLOT="0/${PV}"
-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"
IUSE="static-libs"
DEPEND=""
@@ -21,12 +21,16 @@ RDEPEND="!=net-nds/openldap-2.4.40"
S="${WORKDIR}/${PN}-LMDB_${PV}/libraries/liblmdb"
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)!" \
-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 -Wl,-soname,liblmdb.so.0!" \
+ -e "s!shared!shared ${soname}!" \
"${S}/Makefile" || die
eapply_user
}
@@ -45,8 +49,9 @@ src_compile() {
src_install() {
emake DESTDIR="${D}" install
- mv "${ED}"usr/$(get_libdir)/liblmdb.so{,.0} || die
- dosym liblmdb.so.0 /usr/$(get_libdir)/liblmdb.so
+ mv "${ED}"usr/$(get_libdir)/liblmdb$(get_libname) \
+ "${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
}