From 21f7a4c9457841f4de169fee83cf28056847fbb2 Mon Sep 17 00:00:00 2001 From: Markus Perl <1220081+markus-perl@users.noreply.github.com> Date: Sat, 20 Jul 2024 15:02:39 +0200 Subject: [PATCH] MacOS fix --- build-ffmpeg | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/build-ffmpeg b/build-ffmpeg index 4bd493b5..2dda0b2b 100755 --- a/build-ffmpeg +++ b/build-ffmpeg @@ -476,22 +476,23 @@ if command_exists "python3"; then #check if macOs and brew is available if [[ "$OSTYPE" == "darwin"* ]]; then - if ! command_exists "brew"; then + if command_exists "brew"; then brew install python-setuptools meson ninja MESON_INSTALLED=true fi - fi - - #check if meson and ninja are installed MESON_INSTALLED - if ! $MESON_INSTALLED; then - # meson and ninja can be installed via pip3 - execute pip3 install pip setuptools --quiet --upgrade --no-cache-dir --disable-pip-version-check - for r in meson ninja; do - if ! command_exists ${r}; then - execute pip3 install ${r} --quiet --upgrade --no-cache-dir --disable-pip-version-check - fi - export PATH=$PATH:~/Library/Python/3.9/bin - done + else + #check if meson and ninja are installed MESON_INSTALLED AND system is not MacOS + if ! $MESON_INSTALLED; then + + # meson and ninja can be installed via pip3 + execute pip3 install pip setuptools --quiet --upgrade --no-cache-dir --disable-pip-version-check + for r in meson ninja; do + if ! command_exists ${r}; then + execute pip3 install ${r} --quiet --upgrade --no-cache-dir --disable-pip-version-check + fi + export PATH=$PATH:~/Library/Python/3.9/bin + done + fi fi fi