dev-util/pkgconfig: fix compilation of included glib on Solaris
authorFabian Groffen <grobian@gentoo.org>
Wed, 4 Jan 2017 12:59:56 +0000 (13:59 +0100)
committerFabian Groffen <grobian@gentoo.org>
Wed, 4 Jan 2017 13:00:06 +0000 (14:00 +0100)
Package-Manager: portage-2.3.0

dev-util/pkgconfig/pkgconfig-0.29.1.ebuild

index 73f18e584aa136f6c33035047ac19655997b0530..2db724952dee84a6576cab496aed8687b4529b85 100644 (file)
@@ -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$
 
@@ -49,6 +49,14 @@ src_prepare() {
        else
                elibtoolize # Required for FreeMiNT wrt #333429
        fi
+
+       if [[ ${CHOST} == *-solaris* ]] ; then
+               # fix standards conflicts
+               sed -i -e 's/\(_XOPEN_SOURCE\(_EXTENDED\)\?\|__EXTENSIONS__\)/  \1_DISABLED/' \
+                       glib/configure || die
+               sed -i -e '/#define\s\+_POSIX_SOURCE/d' \
+                       glib/glib/giounix.c || die
+       fi
 }
 
 multilib_src_configure() {