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"

Pick-to: 6.8
Task-number: QTBUG-122010
Change-Id: Idfe4addacee68edfb0f7ccaac1a19860c539c0e0
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
This commit is contained in:
Bartlomiej Moskal 2024-05-28 12:04:21 +02:00
parent 5cef9d32c5
commit 4f3b057d01
1 changed files with 4 additions and 1 deletions

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