diff options
author | Fabian Groffen <grobian@gentoo.org> | 2024-07-23 08:30:55 +0200 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2024-07-23 08:30:55 +0200 |
commit | 0378ad858efe139d123cf92d769bfe95ce6b34fc (patch) | |
tree | 8122fcd72674bb12bbfbf1b3b6ba592919d1a4fe | |
parent | scripts/bootstrap-prefix: be selective on where to use GCC-5 in stage1 (diff) | |
download | prefix-0378ad858efe139d123cf92d769bfe95ce6b34fc.tar.gz prefix-0378ad858efe139d123cf92d769bfe95ce6b34fc.tar.bz2 prefix-0378ad858efe139d123cf92d769bfe95ce6b34fc.zip |
scripts/bootstrap-prefix: emulate readlink -f behaviour for older macOS
Avoid some ugly warning and fallback to (likely) wrong SDK with failures
as result due to not expanding the MacOSX.sdk symlink properly.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rwxr-xr-x | scripts/bootstrap-prefix.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 07ce71168c..9dfa1cda47 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -548,7 +548,7 @@ bootstrap_tree() { # retain this comment and the line below to # keep this snapshot around in the snapshots # MKSNAPSHOT-ANCHOR -- directory of rsync slaves - local PV="20240718" + local PV="20240721" # RAP uses the latest gentoo main repo snapshot to bootstrap. is-rap && LATEST_TREE_YES=1 @@ -1503,7 +1503,14 @@ bootstrap_stage1() { local fsdk local osvers # try and find a matching OS SDK - fsdk="$(readlink -f "${SDKPATH}")" + fsdk="$(readlink "${SDKPATH}")" + # note readlink -f is not supported on older versions of + # macOS so need to emulate it + if [[ ${fsdk} != /* ]] ; then + # this is not proper, but Apple does not use ../ + # constructs here, as far as we know + fsdk="${SDKPATH%/*}/${fsdk}" + fi osvers="$(sw_vers -productVersion)" if [[ ${osvers%%.*} -le 10 ]] ; then osvers=$(echo "${osvers}" | cut -d'.' -f1-2) |