From 886eb3a7f77c04fe11df168e7752c2da514a2f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Petter=20Sk=C3=A5lerud?= Date: Tue, 3 Sep 2024 13:55:22 +0200 Subject: [PATCH] coin, macOS: Add arm64 support to fix-ffmpeg-dependencies.sh This file is used by the script common/unix/install-ffmpeg-android.sh. This script is useful for compiling FFmpeg for Android locally on macOS. Currently the script assumes the Homebrew installation of readelf is that of x86. The Homebrews path for readelf is different under arm64 and this change accounts for this. Pick-to: 6.5 Change-Id: I7ec1d4173e35fe91bc988492e56dd9a5fcbad072 Reviewed-by: Artem Dyomin (cherry picked from commit 03ffb922631bfd388ac4003aad94abe6165e24c1) Reviewed-by: Qt Cherry-pick Bot --- .../provisioning/common/shared/fix_ffmpeg_dependencies.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/coin/provisioning/common/shared/fix_ffmpeg_dependencies.sh b/coin/provisioning/common/shared/fix_ffmpeg_dependencies.sh index 54d566a1..f3972f07 100755 --- a/coin/provisioning/common/shared/fix_ffmpeg_dependencies.sh +++ b/coin/provisioning/common/shared/fix_ffmpeg_dependencies.sh @@ -8,10 +8,10 @@ lib_dir="$1/lib" additional_suffix="${2:-}" set_rpath="${3:-yes}" -if uname -a |grep -q "Darwin"; then - readelf() { - /usr/local/opt/binutils/bin/readelf "$@" - } +if [ "$(uname -s)" = "Darwin" ]; then + # Under Homebrew, binutils package is not symlinked into PATH. + # This lets us use readelf provided by Homebrew. + readelf() { "$(brew --prefix binutils)/bin/readelf" "$@"; } fi ffmpeg_libs=("avcodec" "avdevice" "avfilter" "avformat" "avutil" "swresample" "swscale")