commit:     96ed1a37d7fc76b5e970158d31ce5692dbf58a12
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  2 18:58:46 2020 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Dec  2 18:58:54 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96ed1a37

dev-util/cmake-3.19.1: fix compilation on Darwin

Closes: https://bugs.gentoo.org/757426
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 dev-util/cmake/cmake-3.19.1.ebuild | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dev-util/cmake/cmake-3.19.1.ebuild 
b/dev-util/cmake/cmake-3.19.1.ebuild
index 9c290413b18..54a6d646dda 100644
--- a/dev-util/cmake/cmake-3.19.1.ebuild
+++ b/dev-util/cmake/cmake-3.19.1.ebuild
@@ -129,14 +129,20 @@ cmake_src_test() {
 src_prepare() {
        cmake_src_prepare
 
-       # disable Xcode hooks, bug #652134
        if [[ ${CHOST} == *-darwin* ]] ; then
+               # disable Xcode hooks, bug #652134
                sed -i -e 's/__APPLE__/__DISABLED_APPLE__/' \
                        Source/cmGlobalXCodeGenerator.cxx || die
                # disable isysroot usage with GCC, we've properly instructed
                # where things are via GCC configuration and ldwrapper
                sed -i -e '/cmake_gnu_set_sysroot_flag/d' \
                        Modules/Platform/Apple-GNU-*.cmake || die
+               # don't set a POSIX standard, system headers don't like that, 
#757426
+               sed -i -e 's/^#if !defined(_WIN32) && !defined(__sun)/& \&\& 
!defined(__APPLE__)/' \
+                       Source/cmLoadCommandCommand.cxx \
+                       Source/cmStandardLexer.h \
+                       Source/cmSystemTools.cxx \
+                       Source/cmTimestamp.cxx
        fi
 
        # Add gcc libs to the default link paths

Reply via email to