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: Wed, 02 Nov 2022 08:03:51
Message-Id: 1667376156.c43a5bf0d00d3cb2a0452c35b5c42bf4fc4cfc9f.grobian@gentoo
1 commit: c43a5bf0d00d3cb2a0452c35b5c42bf4fc4cfc9f
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 2 08:02:36 2022 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 2 08:02:36 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=c43a5bf0
7
8 scripts/bootstrap-prefix: Darwin fixes
9
10 - die when xcode-select needs to be run
11 - create proper profiles for Big Sur and later
12
13 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
14
15 scripts/bootstrap-prefix.sh | 31 ++++++++++---------------------
16 1 file changed, 10 insertions(+), 21 deletions(-)
17
18 diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
19 index 4795d87ee5..ff23367616 100755
20 --- a/scripts/bootstrap-prefix.sh
21 +++ b/scripts/bootstrap-prefix.sh
22 @@ -395,30 +395,17 @@ bootstrap_setup() {
23 rev=${CHOST##*darwin}
24 profile="prefix/darwin/macos/10.$((rev - 4))/x64"
25 ;;
26 - x86_64-apple-darwin20)
27 + *64-apple-darwin2[0123456789])
28 # Big Sur is 11.0
29 - rev=${CHOST##*darwin}
30 - profile="prefix/darwin/macos/11.$((rev - 20))/x64"
31 - ;;
32 - x86_64-apple-darwin2[123456789])
33 - # Monterey is 12.0
34 - rev=${CHOST##*darwin}
35 - profile="prefix/darwin/macos/12.$((rev - 21))/x64"
36 - ;;
37 - arm64-apple-darwin20)
38 - rev=${CHOST##*darwin}
39 - profile="prefix/darwin/macos/11.$((rev - 20))/arm64"
40 - ;;
41 - # TODO: Come up with something better for macOS 11+
42 - x86_64-apple-darwin2[123456789])
43 # Monterey is 12.0
44 + # Ventura is 13.0
45 rev=${CHOST##*darwin}
46 - profile="prefix/darwin/macos/12.$((rev - 21))/x64"
47 - ;;
48 - arm64-apple-darwin2[123456789])
49 - # Monterey is 12.0
50 - rev=${CHOST##*darwin}
51 - profile="prefix/darwin/macos/12.$((rev - 21))/arm64"
52 + case ${CHOST%%-*} in
53 + x86_64) arch=x64 ;;
54 + arm64) arch=arm64 ;;
55 + *) arch=error ;;
56 + esac
57 + profile="prefix/darwin/macos/$((rev - 9)).0/${arch}"
58 ;;
59 i*86-pc-linux-gnu)
60 profile=${profile_linux/ARCH/x86}
61 @@ -2631,6 +2618,7 @@ continue. Please execute:
62 xcode-select -s /Library/Developer/CommandLineTools
63 and try running me again.
64 EOF
65 + exit 1
66 fi
67 else
68 # let's see if we have an xcode install
69 @@ -2642,6 +2630,7 @@ valid install. Try resetting it using:
70 sudo xcode-select -r
71 and try running me again.
72 EOF
73 + exit 1
74 fi
75 fi
76 fi