mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 11:26:04 +08:00
Coin, FFmpeg, macOS: Apply 'prefix' consistently
In the provisioning script 'install-ffmpeg-macos.sh', we have a variable 'prefix' controlling where to install the finalized library. The value of this prefix is sometimes hardcoded into some of the temporary build directories, making the script break if we actually modify the 'prefix' variable. This means we currently cannot easily change the output directory. This patch modifies 'install-ffmpeg-macos.sh' so that the 'prefix' is applied consistently throughout the script, allowing us to change the output directory in the future. Pick-to: 6.9 6.8 Change-Id: Id0b1bb23513b7bccf02f0c4073e4177f651792dd Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
This commit is contained in:
@@ -47,8 +47,9 @@ if [ "$os" == "macos" ]; then
|
||||
build_ffmpeg
|
||||
|
||||
install_dir="$ffmpeg_source_dir/build/installed"
|
||||
"$fix_relative_dependencies" "$install_dir/usr/local/$ffmpeg_name/lib"
|
||||
sudo mv "$install_dir/usr/local/$ffmpeg_name" "/usr/local"
|
||||
"$fix_relative_dependencies" "$install_dir$prefix/lib"
|
||||
sudo mkdir -p "$prefix"
|
||||
sudo mv "$install_dir$prefix" "$prefix/../"
|
||||
else
|
||||
build_ffmpeg "arm64"
|
||||
build_ffmpeg "x86_64"
|
||||
@@ -56,11 +57,11 @@ else
|
||||
arm64_install_dir="$ffmpeg_source_dir/build/arm64/installed"
|
||||
x86_64_install_dir="$ffmpeg_source_dir/build/x86_64/installed"
|
||||
|
||||
"$fix_relative_dependencies" "$arm64_install_dir/usr/local/$ffmpeg_name/lib"
|
||||
"$fix_relative_dependencies" "$x86_64_install_dir/usr/local/$ffmpeg_name/lib"
|
||||
"$fix_relative_dependencies" "$arm64_install_dir$prefix/lib"
|
||||
"$fix_relative_dependencies" "$x86_64_install_dir$prefix/lib"
|
||||
|
||||
sudo rm -rf "/usr/local/$ffmpeg_name" # lipo fails upon 2nd run
|
||||
sudo rm -rf "$prefix" # lipo fails upon 2nd run
|
||||
sudo "${BASH_SOURCE%/*}/../macos/makeuniversal.sh" "$arm64_install_dir" "$x86_64_install_dir"
|
||||
fi
|
||||
|
||||
set_ffmpeg_dir_env_var "FFMPEG_DIR" "/usr/local/$ffmpeg_name"
|
||||
set_ffmpeg_dir_env_var "FFMPEG_DIR" "$prefix"
|
||||
|
||||
Reference in New Issue
Block a user