Skip to content

Commit 0378ad8

Browse files
committed
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 <[email protected]>
1 parent a114199 commit 0378ad8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

scripts/bootstrap-prefix.sh

+9-2
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ bootstrap_tree() {
548548
# retain this comment and the line below to
549549
# keep this snapshot around in the snapshots
550550
# MKSNAPSHOT-ANCHOR -- directory of rsync slaves
551-
local PV="20240718"
551+
local PV="20240721"
552552

553553
# RAP uses the latest gentoo main repo snapshot to bootstrap.
554554
is-rap && LATEST_TREE_YES=1
@@ -1503,7 +1503,14 @@ bootstrap_stage1() {
15031503
local fsdk
15041504
local osvers
15051505
# try and find a matching OS SDK
1506-
fsdk="$(readlink -f "${SDKPATH}")"
1506+
fsdk="$(readlink "${SDKPATH}")"
1507+
# note readlink -f is not supported on older versions of
1508+
# macOS so need to emulate it
1509+
if [[ ${fsdk} != /* ]] ; then
1510+
# this is not proper, but Apple does not use ../
1511+
# constructs here, as far as we know
1512+
fsdk="${SDKPATH%/*}/${fsdk}"
1513+
fi
15071514
osvers="$(sw_vers -productVersion)"
15081515
if [[ ${osvers%%.*} -le 10 ]] ; then
15091516
osvers=$(echo "${osvers}" | cut -d'.' -f1-2)

0 commit comments

Comments
 (0)