Ticket #14365: Portfile-boost.diff
File Portfile-boost.diff, 2.3 KB (added by gui-dos (Guido Soranzio), 17 years ago) |
---|
-
Portfile
old new 36 36 # with their final destination path (not the destroot path that 37 37 # they've just been installed to) 38 38 foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] { 39 system "install_name_tool -id ${prefix}/lib/${lib} ${lib}" 39 set libtail [file tail ${lib}] 40 system "install_name_tool -id ${prefix}/lib/${libtail} ${lib}" 40 41 } 41 42 42 43 # create relative symbolic links to the versioned libraries (.dylib only; 43 44 # .a were built with unversioned extensions that are duplicate files of the 44 45 # versioned extensions... handled next) 45 46 foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] { 46 set libname [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}] 47 set libtail [file tail ${lib}] 48 set libroot [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}] 49 set libname [file tail ${libroot}] 47 50 set libext [file extension ${lib}] 48 set liblink "${lib name}${libext}"51 set liblink "${libroot}${libext}" 49 52 if {![catch {set libtype [file type ${liblink}]}]} { 50 53 if {${libtype} == "link"} { 51 54 file delete -force ${liblink} 52 55 } 53 56 } 54 system "cd ${destroot}${prefix}/lib;ln -s ${lib } ${liblink}"57 system "cd ${destroot}${prefix}/lib;ln -s ${libtail} ${libname}${libext}" 55 58 } 56 59 57 60 # change the duplicated non-version-named .a libraries to 58 61 # symbolic links to the version-named .a libraries 59 62 foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.a] { 60 set libname [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}] 63 set libtail [file tail ${lib}] 64 set libroot [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}] 65 set libname [file tail ${libroot}] 61 66 set libext [file extension ${lib}] 62 set liblink "${lib name}${libext}"67 set liblink "${libroot}${libext}" 63 68 # if this file is around, it is a duplicate, delete it 64 69 if {[file exists ${liblink}]} { 65 70 file delete -force ${liblink} 66 71 } 67 72 # add a symbolic link instead 68 system "cd ${destroot}${prefix}/lib; ln -s ${lib } ${liblink}"73 system "cd ${destroot}${prefix}/lib; ln -s ${libtail} ${libname}${libext}" 69 74 } 70 75 71 76 # create a symbolic link in the include directory pointing to the current