summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2017-01-03 10:26:22 +0100
committerFabian Groffen <grobian@gentoo.org>2017-01-03 10:26:56 +0100
commitb8217042f569525d43da8c6dbd9e106056159c0d (patch)
tree61a6f9d0c962b3b4a57eab490fe3d74695c79838 /app-crypt
parentapp-emulation/free42: Drops old version (diff)
downloadgentoo-b8217042f569525d43da8c6dbd9e106056159c0d.tar.gz
gentoo-b8217042f569525d43da8c6dbd9e106056159c0d.tar.bz2
gentoo-b8217042f569525d43da8c6dbd9e106056159c0d.zip
app-crypt/gpgme: fix compilation on Darwin (C++11)
Package-Manager: portage-2.2.28-prefix
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/gpgme/gpgme-1.8.0-r2.ebuild16
1 files changed, 14 insertions, 2 deletions
diff --git a/app-crypt/gpgme/gpgme-1.8.0-r2.ebuild b/app-crypt/gpgme/gpgme-1.8.0-r2.ebuild
index 80b3f80fc356..715c4936e07c 100644
--- a/app-crypt/gpgme/gpgme-1.8.0-r2.ebuild
+++ b/app-crypt/gpgme/gpgme-1.8.0-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -7,7 +7,7 @@ EAPI="6"
PYTHON_COMPAT=( python2_7 python3_{4,5} )
DISTUTILS_OPTIONAL=1
-inherit distutils-r1 eutils qmake-utils
+inherit distutils-r1 eutils flag-o-matic qmake-utils
DESCRIPTION="GnuPG Made Easy is a library for making GnuPG easier to use"
HOMEPAGE="http://www.gnupg.org/related_software/gpgme"
@@ -64,6 +64,18 @@ src_configure() {
export MOC="$(qt5_get_bindir)/moc"
fi
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # FIXME: I don't know how to select on C++11 (libc++) here, but
+ # I do know all Darwin users are using C++11. This should also
+ # apply to GCC 4.7+ with libc++, and basically anyone targetting
+ # it.
+
+ # The C-standard doesn't define strdup, and C++11 drops it
+ # resulting in an implicit declaration of strdup error. Since
+ # it is in POSIX raise the feature set to that.
+ append-cxxflags -D_POSIX_C_SOURCE=200112L
+ fi
+
econf \
--enable-languages="${languages[*]}" \
$(use_enable static-libs static)