commit: 88ae28941466e41fff5dbb2c2a8a35e7625a681c Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Sat Nov 28 15:22:11 2020 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Sat Nov 28 15:22:24 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88ae2894
dev-util/cmake-3.19.1: fix compilation for Darwin GCC 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 | 7 +++++-- dev-util/cmake/files/cmake-3.19.1-darwin-gcc.patch | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dev-util/cmake/cmake-3.19.1.ebuild b/dev-util/cmake/cmake-3.19.1.ebuild index 5dc94575a14..09d448bde37 100644 --- a/dev-util/cmake/cmake-3.19.1.ebuild +++ b/dev-util/cmake/cmake-3.19.1.ebuild @@ -54,8 +54,7 @@ PATCHES=( # prefix "${FILESDIR}"/${PN}-3.16.0_rc4-darwin-bundle.patch "${FILESDIR}"/${PN}-3.14.0_rc3-prefix-dirs.patch - # Next patch requires new work from prefix people - #"${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch + "${FILESDIR}"/${PN}-3.19.1-darwin-gcc.patch # handle gentoo packaging in find modules "${FILESDIR}"/${PN}-3.17.0_rc1-FindBLAS.patch @@ -134,6 +133,10 @@ src_prepare() { if [[ ${CHOST} == *-darwin* ]] ; then 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-C{,XX}.cmake || die fi # Add gcc libs to the default link paths diff --git a/dev-util/cmake/files/cmake-3.19.1-darwin-gcc.patch b/dev-util/cmake/files/cmake-3.19.1-darwin-gcc.patch new file mode 100644 index 00000000000..0f0a6b681bc --- /dev/null +++ b/dev-util/cmake/files/cmake-3.19.1-darwin-gcc.patch @@ -0,0 +1,14 @@ +grob...@gentoo.org: fix compilation on macOS using GCC + +compiler says it all: include memory if you use unique_ptr + +--- a/Source/cmMachO.h.orig 2020-11-24 14:50:26.000000000 +0100 ++++ b/Source/cmMachO.h 2020-11-28 16:05:11.509620124 +0100 +@@ -6,6 +6,7 @@ + + #include <iosfwd> + #include <string> ++#include <memory> + + #if !defined(CMAKE_USE_MACH_PARSER) + # error "This file may be included only if CMAKE_USE_MACH_PARSER is enabled."