From 6de792c46513bb549cdbc1d33f27a55825d23540 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 30 Dec 2023 16:54:14 +1000 Subject: [PATCH] CI: Add xz/zstd/lz4/webp to Mac dependencies Also fix building on Apple Silicon, and allow the destination path to be specified, instead of being hardcoded to $HOME/deps. --- .github/workflows/macos_build.yml | 3 +- .../scripts/macos/build-dependencies.sh | 134 +++++++++++++----- 2 files changed, 102 insertions(+), 35 deletions(-) diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml index 2d39a93700..7d56457486 100644 --- a/.github/workflows/macos_build.yml +++ b/.github/workflows/macos_build.yml @@ -79,7 +79,8 @@ jobs: - name: Build Dependencies if: steps.cache-deps.outputs.cache-hit != 'true' - run: .github/workflows/scripts/macos/build-dependencies.sh + run: | + .github/workflows/scripts/macos/build-dependencies.sh "$HOME/deps" - name: Download patches run: | diff --git a/.github/workflows/scripts/macos/build-dependencies.sh b/.github/workflows/scripts/macos/build-dependencies.sh index 05e2221a0f..797377118f 100755 --- a/.github/workflows/scripts/macos/build-dependencies.sh +++ b/.github/workflows/scripts/macos/build-dependencies.sh @@ -2,27 +2,39 @@ set -e +if [ "$#" -ne 1 ]; then + echo "Syntax: $0 " + exit 1 +fi + export MACOSX_DEPLOYMENT_TARGET=11.0 -INSTALLDIR="$HOME/deps" +INSTALLDIR="$1" NPROCS="$(getconf _NPROCESSORS_ONLN)" SDL=SDL2-2.28.5 +XZ=5.4.5 +ZSTD=1.5.5 +LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29 PNG=1.6.37 -JPG=9e +WEBP=1.3.2 FFMPEG=6.0 QT=6.6.0 -mkdir deps-build +mkdir -p deps-build cd deps-build export PKG_CONFIG_PATH="$INSTALLDIR/lib/pkgconfig:$PKG_CONFIG_PATH" -export LDFLAGS="-L$INSTALLDIR/lib -dead_strip $LDFLAGS" -export CFLAGS="-I$INSTALLDIR/include -Os $CFLAGS" -export CXXFLAGS="-I$INSTALLDIR/include -Os $CXXFLAGS" +export LDFLAGS="-L$INSTALLDIR/lib $LDFLAGS" +export CFLAGS="-I$INSTALLDIR/include $CFLAGS" +export CXXFLAGS="-I$INSTALLDIR/include $CXXFLAGS" cat > SHASUMS <