diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1359e706..a6aab34c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,7 @@ jobs: build-macos: name: build in native macOS - runs-on: macos-latest + runs-on: macos-14 steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/build-ffmpeg b/build-ffmpeg index c8aee7b1..a504142c 100755 --- a/build-ffmpeg +++ b/build-ffmpeg @@ -470,14 +470,30 @@ fi if command_exists "python3"; then # dav1d needs meson and ninja along with nasm to be built if command_exists "pip3"; 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 + + #set variable meson and ninja installed to false + MESON_INSTALLED=false + + #check if macOs and brew is available + if [[ "$OSTYPE" == "darwin"* ]]; then + if ! command_exists "brew"; then + brew install python-setuptools meson ninja + MESON_INSTALLED=true fi - export PATH=$PATH:~/Library/Python/3.9/bin - done + 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 + fi + fi if command_exists "meson"; then if build "dav1d" "1.4.2"; then