Ticket #13684: boost.patch
File boost.patch, 2.2 KB (added by freespace+macforge@…, 17 years ago) |
---|
-
Portfile
27 27 28 28 platform darwin { 29 29 post-destroot { 30 cd ${destroot}${prefix}/lib31 30 32 31 # get the library version as it shows up in the library names: 33 32 # eg. 1_34_1 … … 36 35 # ensure the identification name of the dynamic libraries agree 37 36 # with their final destination path (not the destroot path that 38 37 # they've just been installed to) 39 foreach lib [glob *-${libver}.dylib] {38 foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] { 40 39 system "install_name_tool -id ${prefix}/lib/${lib} ${lib}" 41 40 } 42 41 43 42 # create relative symbolic links to the versioned libraries (.dylib only; 44 43 # .a were built with unversioned extensions that are duplicate files of the 45 44 # versioned extensions... handled next) 46 foreach lib [glob *-${libver}.dylib] {45 foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] { 47 46 set libname [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}] 48 47 set libext [file extension ${lib}] 49 48 set liblink "${libname}${libext}" … … 52 51 file delete -force ${liblink} 53 52 } 54 53 } 55 system " ln -s ${lib} ${liblink}"54 system "cd ${destroot}${prefix}/lib;ln -s ${lib} ${liblink}" 56 55 } 57 56 58 57 # change the duplicated non-version-named .a libraries to 59 58 # symbolic links to the version-named .a libraries 60 foreach lib [glob *-${libver}.a] {59 foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.a] { 61 60 set libname [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}] 62 61 set libext [file extension ${lib}] 63 62 set liblink "${libname}${libext}" … … 66 65 file delete -force ${liblink} 67 66 } 68 67 # add a symbolic link instead 69 system " ln -s ${lib} ${liblink}"68 system "cd ${destroot}${prefix}/lib; ln -s ${lib} ${liblink}" 70 69 } 71 70 72 71 # create a symbolic link in the include directory pointing to the current 73 72 # version of the boost include directory (e.g. boost-1_34_1/boost -> include/boost) 74 system " ln -fs boost-${libver}/boost ${destroot}${prefix}/include/boost"73 system "cd ${destroot}${prefix}/lib; ln -fs boost-${libver}/boost ${destroot}${prefix}/include/boost" 75 74 } 76 75 } 77 76