ci: Update macOS build script to use GNU compat greadlink

This commit is contained in:
Darren Thompson 2019-10-16 23:29:40 -04:00 committed by espes
parent c230d77bc2
commit 8e9fe7e054
2 changed files with 10 additions and 1 deletions

View File

@ -52,6 +52,7 @@ addons:
- pixman
- sdl2
- libepoxy
- coreutils
git:
# we want to do this ourselves

View File

@ -37,6 +37,7 @@ do
esac
done
readlink=$(command -v readlink)
case "$(uname -s)" in # adjust compilation option based on platform
Linux)
@ -50,6 +51,13 @@ case "$(uname -s)" in # adjust compilation option based on platform
sys_opts='--disable-cocoa'
# necessary to find libffi, which is required by gobject
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}/usr/local/opt/libffi/lib/pkgconfig"
# macOS needs greadlink for a GNU compatible version of readlink
if readlink=$(command -v greadlink); then
echo 'GNU compatible readlink detected'
else
echo 'Could not find a GNU compatible readlink. Please install coreutils with homebrew'
exit -1
fi
;;
CYGWIN*|MINGW*|MSYS*)
echo 'Compiling for Windows…'
@ -64,7 +72,7 @@ case "$(uname -s)" in # adjust compilation option based on platform
esac
# find absolute path (and resolve symlinks) to build out of tree
configure="$(dirname "$(readlink -f "${0}")")/configure"
configure="$(dirname "$($readlink -f "${0}")")/configure"
set -x # Print commands from now on