commit:     e0cb5603dcd642128351cf1f2a63a6f65064a4da
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 15 14:58:27 2017 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Nov 15 15:01:47 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0cb5603

app-crypt/p11-kit: marked *-solaris, bug #383453

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 app-crypt/p11-kit/p11-kit-0.23.9.ebuild | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/app-crypt/p11-kit/p11-kit-0.23.9.ebuild 
b/app-crypt/p11-kit/p11-kit-0.23.9.ebuild
index 2844a988909..4bcaa5230ad 100644
--- a/app-crypt/p11-kit/p11-kit-0.23.9.ebuild
+++ b/app-crypt/p11-kit/p11-kit-0.23.9.ebuild
@@ -11,7 +11,7 @@ 
SRC_URI="https://github.com/p11-glue/${PN}/releases/download/${PV}/${P}.tar.gz";
 
 LICENSE="MIT"
 SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux ~ppc-macos 
~x64-macos ~x86-macos"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux ~ppc-macos 
~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 IUSE="+asn1 debug +libffi +trust"
 REQUIRED_USE="trust? ( asn1 )"
 
@@ -26,6 +26,20 @@ pkg_setup() {
        export FAKED_MODE=1
 }
 
+src_prepare() {
+       if [[ ${CHOST} == *-solaris2.* && ${CHOST##*-solaris2.} -lt 11 ]] ; then
+               # Solaris 10 and before doesn't know about XPG7 
(XOPEN_SOURCE=700)
+               # drop to XPG6 to make feature_tests.h happy
+               sed -i -e '/define _XOPEN_SOURCE/s/700/600/' common/compat.c || 
die
+               # paths.h isn't available, oddly enough also not used albeit 
included
+               sed -i -e '/#include <paths.h>/d' trust/test-trust.c || die
+               # we don't have SUN_LEN here
+               sed -i -e 's/SUN_LEN \(([^)]\+)\)/strlen (\1->sun_path)/' \
+                       p11-kit/server.c || die
+       fi
+       default
+}
+
 multilib_src_configure() {
        ECONF_SOURCE="${S}" econf \
                $(use_enable trust trust-module) \

Reply via email to