Skip to content
Snippets Groups Projects
Commit 45a4ac51 authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Jean-Baptiste Kempf
Browse files

contrib: qt: add install_wrapper.sh

The script is used by enforcing it through the INSTALL_FILE= make
variable and override the copy of .pc files so as to fix the lib=
variable and ensure the .pc file is linked to $(PREFIX)/lib/pkgconfig/
unlike the installed Qt plugins and qml plugins.
parent 52c46bfe
No related branches found
No related tags found
1 merge request!2479qt: fix contrib to avoid race conditions and make it work on Linux and Macosx reliably
#!/usr/bin/env sh
# Copyright (C) 2022 Videolabs
# This file is distributed under the same license as the vlc package.
set -e
SCRIPT_DIR="$(cd "$(dirname "$0" )" && pwd -P)"
SOURCE="$1"
DEST="$2"
install -m 644 -p $SOURCE $DEST
# Filter pkg-config files only
if [ "${SOURCE##*.}" != 'pc' ]; then
exit 0
fi
"${SCRIPT_DIR}/../pkg-static.sh" "${DEST}"
# Filter pkg-config files that are not installed in the main pkg-config folder
if [ "$(dirname $2)" -ef "${VLC_PREFIX}/lib/pkgconfig" ]; then
exit 0
fi
pkgconfigdir="$(cd "$(dirname "${DEST}")" && pwd -P)"
# Filter packages installed in a pkgconfig/ folder
if [ "$(basename "${pkgconfigdir}")" -eq "pkgconfig" ]; then
exit 0
fi
sed -i.orig "s,libdir=.*,libdir=${pkgconfigdir}," "${DEST}"
mkdir -p "${VLC_PREFIX}/lib/pkgconfig"
ln -sf "${DEST}" "${VLC_PREFIX}/lib/pkgconfig/"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment