Ticket #33150: Portfile.Io.diff

File Portfile.Io.diff, 1.3 KB (added by crossd@…, 12 years ago)
  • Portfile

    old new  
    6666use_parallel_build      no
    6767
    6868post-destroot {
     69    set files_to_fix \
     70        [list "libIoObjcBridge.dylib" \
     71              "libIoOpenGL.dylib" \
     72              "libIoRegex.dylib" \
     73              "libIoTheora.dylib" \
     74              "libIoVorbis.dylib" ]
     75    set names_to_fix \
     76        [list "Blowfish" "Box" "MD5" "Ogg" "Range" "Socket" "SystemCall" "Yajl" ]
    6977    fs-traverse destlib ${destroot}${prefix}/lib {
    7078        if {[file isfile ${destlib}] && [file extension ${destlib}] == ".dylib"} {
    7179            set lib [strsed ${destlib} "s|^${destroot}||"]
     
    7381            ui_debug "Assembled command: '${cmd}'"
    7482            system "${cmd}"
    7583        }
     84        if {[file isfile ${destlib}] && [lsearch ${files_to_fix} [file tail ${destlib}]] > -1} {
     85            foreach name ${names_to_fix} {
     86                set lib "libIo${name}.dylib"
     87                set old "${prefix}/lib/${lib}"
     88                set new "${prefix}/lib/io/addons/${name}/_build/dll/${lib}"
     89                set cmd "install_name_tool -change ${old} ${new} ${destlib}"
     90                ui_debug "Assembled command: '${cmd}'"
     91                system "${cmd}"
     92            }
     93        }
    7694    }
    7795}