diff --git a/coin/provisioning/common/shared/fix_ffmpeg_dependencies.sh b/coin/provisioning/common/shared/fix_ffmpeg_dependencies.sh index fc6301cf..54d566a1 100755 --- a/coin/provisioning/common/shared/fix_ffmpeg_dependencies.sh +++ b/coin/provisioning/common/shared/fix_ffmpeg_dependencies.sh @@ -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 diff --git a/coin/provisioning/qtci-macos-12-x86_64/27-binutils.sh b/coin/provisioning/qtci-macos-12-x86_64/27-binutils.sh new file mode 100755 index 00000000..04d3c5bf --- /dev/null +++ b/coin/provisioning/qtci-macos-12-x86_64/27-binutils.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +# binutlis is installed with an error: The formula built, but is not symlinked into /usr/local +# To avoid stopping the configuration due to this problem, "|| true" is added. +brew install binutils || true + diff --git a/coin/provisioning/qtci-macos-12-x86_64/28-patchelf.sh b/coin/provisioning/qtci-macos-12-x86_64/28-patchelf.sh new file mode 100755 index 00000000..0710f483 --- /dev/null +++ b/coin/provisioning/qtci-macos-12-x86_64/28-patchelf.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +brew install patchelf + diff --git a/coin/provisioning/qtci-macos-13-x86_64/27-binutils.sh b/coin/provisioning/qtci-macos-13-x86_64/27-binutils.sh new file mode 100755 index 00000000..04d3c5bf --- /dev/null +++ b/coin/provisioning/qtci-macos-13-x86_64/27-binutils.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +# binutlis is installed with an error: The formula built, but is not symlinked into /usr/local +# To avoid stopping the configuration due to this problem, "|| true" is added. +brew install binutils || true + diff --git a/coin/provisioning/qtci-macos-13-x86_64/28-patchelf.sh b/coin/provisioning/qtci-macos-13-x86_64/28-patchelf.sh new file mode 100755 index 00000000..0710f483 --- /dev/null +++ b/coin/provisioning/qtci-macos-13-x86_64/28-patchelf.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +brew install patchelf +