summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2020-11-28 16:22:11 +0100
committerFabian Groffen <grobian@gentoo.org>2020-11-28 16:22:24 +0100
commit88ae28941466e41fff5dbb2c2a8a35e7625a681c (patch)
tree0311c1fc4166f47d8c1cf287731b51cadb330acd /dev-util/cmake
parentnet-misc/teamviewer: Drop old (diff)
downloadgentoo-88ae28941466e41fff5dbb2c2a8a35e7625a681c.tar.gz
gentoo-88ae28941466e41fff5dbb2c2a8a35e7625a681c.tar.bz2
gentoo-88ae28941466e41fff5dbb2c2a8a35e7625a681c.zip
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@gentoo.org>
Diffstat (limited to 'dev-util/cmake')
-rw-r--r--dev-util/cmake/cmake-3.19.1.ebuild7
-rw-r--r--dev-util/cmake/files/cmake-3.19.1-darwin-gcc.patch14
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 5dc94575a14f..09d448bde370 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 000000000000..0f0a6b681bc7
--- /dev/null
+++ b/dev-util/cmake/files/cmake-3.19.1-darwin-gcc.patch
@@ -0,0 +1,14 @@
+grobian@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."