Merge branch 'darwin-portability' into 'main'

Misc portability improvements to help bring wayland to darwin

See merge request wayland/wayland!290
This commit is contained in:
Jeremy Huddleston Sequoia 2023-06-22 21:43:05 +00:00
commit 29f820549f
14 changed files with 138 additions and 28 deletions

View file

@ -14,7 +14,12 @@ if ! test -n "$NM"; then
exit 99
fi
AVAIL_FUNCS="$($NM -D --format=bsd --defined-only $LIB | awk '{print $3}')"
# Assuming any system with SystemVersion.plist is a darwin-derivative and prefixes C symbols with _
if [ -f "/System/Library/CoreServices/SystemVersion.plist" ] ; then
AVAIL_FUNCS="$($NM $LIB | awk '{print $3}' | sed 's:^_::')"
else
AVAIL_FUNCS="$($NM -D --format=bsd --defined-only $LIB | awk '{print $3}')"
fi
# Official ABI, taken from the header.
REQ_FUNCS="wl_egl_window_resize