Changeset 377173c5f0356e4f4427e26ad83366752e614227
- Timestamp:
- 09/02/08 22:54:14
(10 months ago)
- Author:
- Pierre d'Herbemont <pdherbemont@videolan.org>
- git-committer:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1202594054 +0000
- git-parent:
[670cfc5ba336c4ad15e1d79518d77cf68d9f2dbd]
- git-author:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1202594054 +0000
- Message:
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.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r54f8fd2 |
r377173c |
|
| 36 | 36 | # @param src_lib source library to copy to the destination directory |
|---|
| 37 | 37 | # @param dest_dir destination directory where the src_lib should be copied to |
|---|
| 38 | | install_library() { |
|---|
| | 38 | install_library() { |
|---|
| | 39 | |
|---|
| 39 | 40 | if [ ${3} = "library" ]; then |
|---|
| 40 | | install_name="@loader_path/lib" |
|---|
| | 41 | local install_name="@loader_path/lib" |
|---|
| 41 | 42 | elif [ ${3} = "module" ]; then |
|---|
| 42 | | install_name="@loader_path/modules" |
|---|
| | 43 | local install_name="@loader_path/modules" |
|---|
| 43 | 44 | fi |
|---|
| 44 | | |
|---|
| 45 | 45 | if [ "${5}" != "" ]; then |
|---|
| 46 | | lib_dest="${2}/${5}" |
|---|
| | 46 | local lib_dest="${2}/${5}" |
|---|
| 47 | 47 | else |
|---|
| 48 | | lib_dest="${2}/`basename ${1}`" |
|---|
| | 48 | local lib_dest="${2}/`basename ${1}`" |
|---|
| 49 | 49 | fi |
|---|
| 50 | 50 | |
|---|
| 51 | 51 | if [ "${4}" != "" ]; then |
|---|
| 52 | | lib_install_prefix="${4}" |
|---|
| | 52 | local lib_install_prefix="${4}" |
|---|
| 53 | 53 | else |
|---|
| 54 | | lib_install_prefix="@loader_path/../lib" |
|---|
| | 54 | local lib_install_prefix="@loader_path/../lib" |
|---|
| 55 | 55 | fi |
|---|
| 56 | 56 | |
|---|
| … | … | |
| 72 | 72 | # Iterate through each installed library and modify the references to other dynamic libraries to match the framework's library directory |
|---|
| 73 | 73 | for linked_lib in `otool -L ${lib_dest} | grep '(' | sed 's/\((.*)\)//'`; do |
|---|
| 74 | | name=`basename ${linked_lib}` |
|---|
| | 74 | local name=`basename ${linked_lib}` |
|---|
| 75 | 75 | case "${linked_lib}" in |
|---|
| 76 | | */vlc_build_dir/lib/* | *vlc* | */extras/contrib/lib/*) |
|---|
| | 76 | */vlc_build_dir/* | *vlc* | */extras/contrib/lib/*) |
|---|
| 77 | 77 | if test -e ${linked_lib}; then |
|---|
| 78 | | install_name_tool -change ${linked_lib} "${lib_install_prefix}/${name}" ${lib_dest} |
|---|
| | 78 | install_name_tool -change "$linked_lib" "${lib_install_prefix}/${name}" "${lib_dest}" |
|---|
| 79 | 79 | linked_libs="${linked_libs} ${ref_lib}" |
|---|
| 80 | | |
|---|
| 81 | 80 | install_library ${linked_lib} ${target_lib} "library" |
|---|
| 82 | 81 | fi |
|---|
| 83 | | ;; |
|---|
| 84 | | *) |
|---|
| 85 | 82 | ;; |
|---|
| 86 | 83 | esac |
|---|