commit:     7e6c14e7436d5ab2a1c5ebdab28739200347b36c
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  8 10:52:39 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Jan  8 13:45:09 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e6c14e7

dev-db/lmdb: fix build on <=darwin9, remove upstreamed Solaris fix

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 dev-db/lmdb/lmdb-0.9.22.ebuild | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/dev-db/lmdb/lmdb-0.9.22.ebuild b/dev-db/lmdb/lmdb-0.9.22.ebuild
index 3219ba9b0b5..9e4e027f837 100644
--- a/dev-db/lmdb/lmdb-0.9.22.ebuild
+++ b/dev-db/lmdb/lmdb-0.9.22.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -21,6 +21,11 @@ S="${WORKDIR}/${PN}-LMDB_${PV}/libraries/liblmdb"
 
 src_prepare() {
        eapply_user
+       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
 }
 
@@ -38,8 +43,6 @@ multilib_src_configure() {
                "Makefile" || die
 
        if [[ ${CHOST} == *-solaris* ]] ; then
-               # ensure sigwait has a second sig argument
-               append-cppflags -D_POSIX_PTHREAD_SEMANTICS
                # fdatasync lives in -lrt on Solaris 10
                [[ ${CHOST#*-solaris2.} -le 10 ]] && append-ldflags -lrt
        fi

Reply via email to