Coin: Extend script for fixing FFmpeg dependencies to stubs

Add an additional parameter to disable the rpath setting.
The rpath update somehow interferes with the ffmpeg libraries fails
with: "java.lang.UnsatisfiedLinkError: dlopen failed: empty/none
DT_HASH/DT_GNU_HASH"

Task-number: QTBUG-122010
Change-Id: Idfe4addacee68edfb0f7ccaac1a19860c539c0e0
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
(cherry picked from commit 4f3b057d01)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Bartlomiej Moskal
2024-05-28 12:04:21 +02:00
committed by Qt Cherry-pick Bot
parent 01c0814cc5
commit f010bb13a9

View File

@@ -6,6 +6,7 @@ set -x
lib_dir="$1/lib"
additional_suffix="${2:-}"
set_rpath="${3:-yes}"
ffmpeg_libs=("avcodec" "avdevice" "avfilter" "avformat" "avutil" "swresample" "swscale")
@@ -37,5 +38,7 @@ for lib_name in "${ffmpeg_libs[@]}"; do
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
patchelf --set-rpath '$ORIGIN' $lib_path
if [[ "$set_rpath" == "yes" ]]; then
patchelf --set-rpath '$ORIGIN' $lib_path
fi
done