mirror of
git://code.qt.io/qt/qt5.git
synced 2026-04-04 20:56:46 +08:00
Coin: Dynamically linked FFmpeg for Android (on macOS host)
Prepare for turning on dynamically linked FFmpeg on macOS:
- install binutils (for readelf) on macOS;
- readelf need to be used with absolute path on macOS. Prepare
workaround solution for this system in
fix_ffmpeg_dependencies.sh script;
- install patchelf on macOS;
- ensuring compatibility of sed call on Linux and macOS;
Task-number: QTBUG-122010
Change-Id: I810566786de4363b4383f29467c6ca4395f9f668
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
(cherry picked from commit b5e6c9e59b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
committed by
Qt Cherry-pick Bot
parent
f63272740c
commit
c9009d7c7a
@@ -8,6 +8,12 @@ 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 "$@"
|
||||
}
|
||||
fi
|
||||
|
||||
ffmpeg_libs=("avcodec" "avdevice" "avfilter" "avformat" "avutil" "swresample" "swscale")
|
||||
|
||||
for lib_name in "${ffmpeg_libs[@]}"; do
|
||||
@@ -37,7 +43,7 @@ for lib_name in "${ffmpeg_libs[@]}"; do
|
||||
fi
|
||||
done <<< "$(readelf -d $lib_path | grep '(NEEDED)' )"
|
||||
|
||||
sed -i -E "/^Libs.private:/s/ -l(va|va-x11|va-drm|ssl|crypto)/ -lQt6FFmpegStub-\\1/g;" $pkg_config_file_path
|
||||
sed -i.bak -E '/^Libs.private:/s/ -l(va|va-x11|va-drm|ssl|crypto)/ -lQt6FFmpegStub-\1/g;' $pkg_config_file_path && rm -f ${pkg_config_file_path}.bak
|
||||
if [[ "$set_rpath" == "yes" ]]; then
|
||||
patchelf --set-rpath '$ORIGIN' $lib_path
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user