installdeps: update for mac brew

Replace wxmac obsolete package with wxwidgets.

Use brew install -f (--force) to install all deps.

Unlink and relink gettext, wxwidgets and ffmpeg for every invocation.

Add -DENABLE_FFMPEG=FALSE to cmake invocation instructions because brew
has ffmpeg 5 and we cannot build with it yet.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2022-03-18 19:19:23 +00:00
parent 8caea3ae6c
commit 2810f4b228
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 8 additions and 9 deletions

View File

@ -1168,7 +1168,7 @@ brew_installdeps() {
check brew -v update
brews="nasm cmake ccache gettext pkg-config sdl2 wxmac ccache ninja"
brews="nasm cmake ccache gettext pkg-config sdl2 wxwidgets ccache ninja"
[ -n "$ENABLE_FFMPEG" ] && brews="$brews ffmpeg"
@ -1177,18 +1177,17 @@ brew_installdeps() {
brews="$brews sfml"
# fi
set --
for f in $brews; do
if brew info "$f" | grep -Eq '^Not installed$'; then
set -- "$@" "$f"
fi
done
[ $# -gt 0 ] && check brew -v install "$@"
check brew -v install -f $brews
brew link gettext --force
for brew in gettext wxwidgets ffmpeg; do
brew unlink $brew
brew link $brew --force
done
brew -v cleanup
cmake_flags='-DENABLE_FFMPEG=FALSE'
build_instructions
}