dev-util/cmake: fix compilation on Darwin, bug #652134
authorFabian Groffen <grobian@gentoo.org>
Wed, 25 Apr 2018 17:03:44 +0000 (19:03 +0200)
committerFabian Groffen <grobian@gentoo.org>
Wed, 25 Apr 2018 17:03:44 +0000 (19:03 +0200)
Closes: https://bugs.gentoo.org/652134
Package-Manager: Portage-2.3.24, Repoman-2.3.6

dev-util/cmake/cmake-3.11.0.ebuild
dev-util/cmake/cmake-3.11.1.ebuild

index 2ceccc1ef951bd4718579ed13ab0edceeeb6d608..6bab5d7c8c20f2e8e22b81d88e4f8d36d56f5579 100644 (file)
@@ -80,7 +80,8 @@ cmake_src_bootstrap() {
 
        # execinfo.h on Solaris isn't quite what it is on Darwin
        if [[ ${CHOST} == *-solaris* ]] ; then
-               sed -i -e 's/execinfo\.h/blablabla.h/' Source/kwsys/CMakeLists.txt || die
+               sed -i -e 's/execinfo\.h/blablabla.h/' \
+                       Source/kwsys/CMakeLists.txt || die
        fi
 
        tc-export CC CXX LD
@@ -123,6 +124,12 @@ cmake_src_test() {
 src_prepare() {
        cmake-utils_src_prepare
 
+       # disable Xcode hooks, bug #652134
+       if [[ ${CHOST} == *-darwin* ]] ; then
+               sed -i -e 's/__APPLE__/__DISABLED_APPLE__/' \
+                       Source/cmGlobalXCodeGenerator.cxx || die
+       fi
+
        # Add gcc libs to the default link paths
        sed -i \
                -e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
index 2ceccc1ef951bd4718579ed13ab0edceeeb6d608..6bab5d7c8c20f2e8e22b81d88e4f8d36d56f5579 100644 (file)
@@ -80,7 +80,8 @@ cmake_src_bootstrap() {
 
        # execinfo.h on Solaris isn't quite what it is on Darwin
        if [[ ${CHOST} == *-solaris* ]] ; then
-               sed -i -e 's/execinfo\.h/blablabla.h/' Source/kwsys/CMakeLists.txt || die
+               sed -i -e 's/execinfo\.h/blablabla.h/' \
+                       Source/kwsys/CMakeLists.txt || die
        fi
 
        tc-export CC CXX LD
@@ -123,6 +124,12 @@ cmake_src_test() {
 src_prepare() {
        cmake-utils_src_prepare
 
+       # disable Xcode hooks, bug #652134
+       if [[ ${CHOST} == *-darwin* ]] ; then
+               sed -i -e 's/__APPLE__/__DISABLED_APPLE__/' \
+                       Source/cmGlobalXCodeGenerator.cxx || die
+       fi
+
        # Add gcc libs to the default link paths
        sed -i \
                -e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \