101 | | platform darwin 8 { |
102 | | post-destroot { |
103 | | foreach r { "/bin/R" "/lib/R/bin/R" } { |
104 | | foreach dir { "R_HOME_DIR" "R_SHARE_DIR" "R_INCLUDE_DIR" "R_DOC_DIR" } { |
105 | | reinplace "s|${dir}=${destroot}|${dir}=|" \ |
106 | | "${destroot}${prefix}${r}" |
107 | | } |
108 | | } |
109 | | |
110 | | foreach v { "rhome" "rincludedir"} { |
111 | | reinplace "s|${v}=${destroot}|${v}=|" "${destroot}${prefix}/lib/pkgconfig/libR.pc" |
112 | | } |
113 | | |
114 | | system "install_name_tool -id ${prefix}/lib/R/lib/libR.dylib \ |
115 | | ${destroot}${prefix}/lib/R/lib/libR.dylib" |
116 | | system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/libRblas.dylib \ |
117 | | ${destroot}${prefix}/lib/R/lib/libR.dylib" |
118 | | |
119 | | system "install_name_tool -id ${prefix}/lib/R/lib/libRblas.dylib \ |
120 | | ${destroot}${prefix}/lib/R/lib/libRblas.dylib" |
121 | | |
122 | | system "install_name_tool -id ${prefix}/lib/R/lib/libRlapack.dylib \ |
123 | | ${destroot}${prefix}/lib/R/lib/libRlapack.dylib" |
124 | | system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/libRblas.dylib \ |
125 | | ${destroot}${prefix}/lib/R/lib/libRlapack.dylib" |
126 | | system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \ |
127 | | ${destroot}${prefix}/lib/R/lib/libRlapack.dylib" |
128 | | |
129 | | foreach so [ exec find ${destroot}${prefix}/lib/R -name "\*.so" ] { |
130 | | regsub ":$" ${so} "" destroot_so_path |
131 | | regsub ${destroot} ${destroot_so_path} "" so_path |
132 | | system "install_name_tool -id ${so_path} ${destroot_so_path}" |
133 | | system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \ |
134 | | ${destroot_so_path}" |
135 | | } |
136 | | } |
| 97 | foreach dylib [ exec find ${destroot}${prefix}/lib/R/lib -name "\*.dylib" ] { |
| 98 | regsub ":$" ${dylib} "" destroot_dylib_path |
| 99 | regsub ${destroot} ${destroot_dylib_path} "" dylib_path |
| 100 | system "install_name_tool -id ${dylib_path} ${destroot_dylib_path}" |
| 101 | system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \ |
| 102 | ${destroot_dylib_path}" |
| 103 | system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/libRblas.dylib \ |
| 104 | ${destroot_dylib_path}" |
| 105 | system "install_name_tool -change libRlapack.dylib ${prefix}/lib/R/lib/libRlapack.dylib \ |
| 106 | ${destroot_dylib_path}" |
| 107 | } |
| 108 | |
| 109 | foreach so [ exec find ${destroot}${prefix}/lib/R -name "\*.so" ] { |
| 110 | regsub ":$" ${so} "" destroot_so_path |
| 111 | regsub ${destroot} ${destroot_so_path} "" so_path |
| 112 | system "install_name_tool -id ${so_path} ${destroot_so_path}" |
| 113 | system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \ |
| 114 | ${destroot_so_path}" |
| 115 | system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/libRblas.dylib \ |
| 116 | ${destroot_so_path}" |
| 117 | system "install_name_tool -change libRlapack.dylib ${prefix}/lib/R/lib/libRlapack.dylib \ |
| 118 | ${destroot_so_path}" |
| 119 | } |