Commit 377173c5 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

macosx/framework: Use local variables where needed. That prevent wrong linkage...

macosx/framework: Use local variables where needed. That prevent wrong linkage with an other libvlc, and fix the multiple crash resulting in linking to 2 differents libvlc.
parent 670cfc5b
......@@ -36,22 +36,22 @@ if test "${ACTION}" = "build"; then
# @param src_lib source library to copy to the destination directory
# @param dest_dir destination directory where the src_lib should be copied to
install_library() {
if [ ${3} = "library" ]; then
install_name="@loader_path/lib"
local install_name="@loader_path/lib"
elif [ ${3} = "module" ]; then
install_name="@loader_path/modules"
local install_name="@loader_path/modules"
fi
if [ "${5}" != "" ]; then
lib_dest="${2}/${5}"
local lib_dest="${2}/${5}"
else
lib_dest="${2}/`basename ${1}`"
local lib_dest="${2}/`basename ${1}`"
fi
if [ "${4}" != "" ]; then
lib_install_prefix="${4}"
local lib_install_prefix="${4}"
else
lib_install_prefix="@loader_path/../lib"
local lib_install_prefix="@loader_path/../lib"
fi
if test -e ${1} && ((! test -e ${lib_dest}) || test ${1} -nt ${lib_dest} ); then
......@@ -71,18 +71,15 @@ if test "${ACTION}" = "build"; then
# Iterate through each installed library and modify the references to other dynamic libraries to match the framework's library directory
for linked_lib in `otool -L ${lib_dest} | grep '(' | sed 's/\((.*)\)//'`; do
name=`basename ${linked_lib}`
local name=`basename ${linked_lib}`
case "${linked_lib}" in
*/vlc_build_dir/lib/* | *vlc* | */extras/contrib/lib/*)
*/vlc_build_dir/* | *vlc* | */extras/contrib/lib/*)
if test -e ${linked_lib}; then
install_name_tool -change ${linked_lib} "${lib_install_prefix}/${name}" ${lib_dest}
install_name_tool -change "$linked_lib" "${lib_install_prefix}/${name}" "${lib_dest}"
linked_libs="${linked_libs} ${ref_lib}"
install_library ${linked_lib} ${target_lib} "library"
fi
;;
*)
;;
esac
done
fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment