Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/
Date: Thu, 31 Dec 2020 17:51:00
Message-Id: 1609435454.5d2345021f8f49961a32aafd42bee5cc18cddfb8.grobian@gentoo
1 commit: 5d2345021f8f49961a32aafd42bee5cc18cddfb8
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 31 17:24:14 2020 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 31 17:24:14 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=5d234502
7
8 scripts/bootstrap-prefix: adjust bootstrap_cmake for post stage1 usage
9
10 Like the ebuild, drop -isysroot usage, unfortunately we need to do this
11 post install, for cmake doesn't compile itself without it, yet libcxx
12 and friends don't compile with it.
13
14 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
15
16 scripts/bootstrap-prefix.sh | 19 ++++++++++++++++++-
17 1 file changed, 18 insertions(+), 1 deletion(-)
18
19 diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
20 index 5a73a87f8d..4394e131aa 100755
21 --- a/scripts/bootstrap-prefix.sh
22 +++ b/scripts/bootstrap-prefix.sh
23 @@ -1213,13 +1213,30 @@ bootstrap_cmake() {
24 S="${S}"/cmake-${PV}
25 cd "${S}"
26
27 - einfo "Compiling ${A%-*}"
28 + # don't set a POSIX standard, system headers don't like that, #757426
29 + sed -i -e 's/^#if !defined(_WIN32) && !defined(__sun)/& \&\& !defined(__APPLE__)/' \
30 + Source/cmLoadCommandCommand.cxx \
31 + Source/cmStandardLexer.h \
32 + Source/cmSystemTools.cxx \
33 + Source/cmTimestamp.cxx
34 +
35 + einfo "Bootstrapping ${A%-*}"
36 ./bootstrap --prefix="${ROOT}"/tmp/usr || return 1
37 +
38 + einfo "Compiling ${A%-*}"
39 $MAKE ${MAKEOPTS} || return 1
40
41 einfo "Installing ${A%-*}"
42 $MAKE ${MAKEOPTS} install || return 1
43
44 + # we need sysroot crap to build cmake itself, but it makes trouble
45 + # lateron, so kill it in the installed version
46 + sed -i -e '/cmake_gnu_set_sysroot_flag/d' \
47 + "${EROOT}"/tmp/usr/share/cmake/Modules/Platform/Apple-GNU-*.cmake || die
48 + # disable isysroot usage with clang as well
49 + sed -i -e '/_SYSROOT_FLAG/d' \
50 + "${EROOT}"/tmp/usr/share/cmake/Modules/Platform/Apple-Clang.cmake || die
51 +
52 einfo "${A%-*} bootstrapped"
53 }