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 | | } |
| 96 | foreach dylib [ exec find ${destroot}${prefix}/lib/R/lib -name "\*.dylib" ] { |
| 97 | regsub ":$" ${dylib} "" destroot_dylib_path |
| 98 | regsub ${destroot} ${destroot_dylib_path} "" dylib_path |
| 99 | system "install_name_tool -id ${dylib_path} ${destroot_dylib_path}" |
| 100 | system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \ |
| 101 | ${destroot_dylib_path}" |
| 102 | system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/libRblas.dylib \ |
| 103 | ${destroot_dylib_path}" |
| 104 | system "install_name_tool -change libRlapack.dylib ${prefix}/lib/R/lib/libRlapack.dylib \ |
| 105 | ${destroot_dylib_path}" |
| 106 | } |
| 107 | |
| 108 | foreach so [ exec find ${destroot}${prefix}/lib/R -name "\*.so" ] { |
| 109 | regsub ":$" ${so} "" destroot_so_path |
| 110 | regsub ${destroot} ${destroot_so_path} "" so_path |
| 111 | system "install_name_tool -id ${so_path} ${destroot_so_path}" |
| 112 | system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \ |
| 113 | ${destroot_so_path}" |
| 114 | system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/libRblas.dylib \ |
| 115 | ${destroot_so_path}" |
| 116 | system "install_name_tool -change libRlapack.dylib ${prefix}/lib/R/lib/libRlapack.dylib \ |
| 117 | ${destroot_so_path}" |
| 118 | } |
| 119 | |
| 120 | reinplace "s|-dylib_file libRblas\.dylib:\$\(R_HOME\)/lib\$\(R_ARCH\)/libRblas\.dylib| |" \ |
| 121 | "${destroot}${prefix}/lib/R/etc/Makeconf" |