Changeset 377173c5f0356e4f4427e26ad83366752e614227

Show
Ignore:
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
  • projects/macosx/framework/Pre-Compile.sh

    r54f8fd2 r377173c  
    3636    # @param src_lib     source library to copy to the destination directory 
    3737    # @param dest_dir    destination directory where the src_lib should be copied to 
    38     install_library() {     
     38    install_library() {  
     39    
    3940        if [ ${3} = "library" ]; then 
    40             install_name="@loader_path/lib" 
     41            local install_name="@loader_path/lib" 
    4142        elif [ ${3} = "module" ]; then 
    42             install_name="@loader_path/modules" 
     43            local install_name="@loader_path/modules" 
    4344        fi 
    44          
    4545        if [ "${5}" != "" ]; then 
    46             lib_dest="${2}/${5}" 
     46            local lib_dest="${2}/${5}" 
    4747        else 
    48             lib_dest="${2}/`basename ${1}`" 
     48            local lib_dest="${2}/`basename ${1}`" 
    4949        fi 
    5050 
    5151        if [ "${4}" != "" ]; then 
    52             lib_install_prefix="${4}" 
     52            local lib_install_prefix="${4}" 
    5353        else 
    54             lib_install_prefix="@loader_path/../lib" 
     54            local lib_install_prefix="@loader_path/../lib" 
    5555        fi 
    5656         
     
    7272            # Iterate through each installed library and modify the references to other dynamic libraries to match the framework's library directory 
    7373            for linked_lib in `otool -L ${lib_dest}  | grep '(' | sed 's/\((.*)\)//'`; do 
    74                 name=`basename ${linked_lib}` 
     74                local name=`basename ${linked_lib}` 
    7575                case "${linked_lib}" in 
    76                     */vlc_build_dir/lib/*  | *vlc* | */extras/contrib/lib/*) 
     76                    */vlc_build_dir/*  | *vlc* | */extras/contrib/lib/*) 
    7777                        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}" 
    7979                            linked_libs="${linked_libs} ${ref_lib}" 
    80  
    8180                            install_library ${linked_lib} ${target_lib} "library" 
    8281                        fi 
    83                         ;; 
    84                     *) 
    8582                        ;; 
    8683                esac