Ticket #26426: Portfile-R.diff
File Portfile-R.diff, 3.9 KB (added by kjell.konis@…, 14 years ago) |
---|
-
Portfile
old new 4 4 5 5 name R 6 6 version 2.11.1 7 revision 1 7 8 categories math science 8 9 maintainers epfl.ch:kjell.konis 9 10 platforms darwin … … 43 44 44 45 universal_variant no 45 46 47 variant recommended description {Install recommended R packages} { 48 configure.args-delete --without-recommended-packages 49 configure.args-append --with-recommended-packages 50 } 51 46 52 variant gcc42 conflicts gcc43 gcc44 description {Build with gcc42} { 47 53 configure.compiler macports-gcc-4.2 48 54 depends_lib-append port:gcc42 … … 58 64 depends_lib-append port:gcc44 59 65 } 60 66 67 default_variants +recommended 68 61 69 if {![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44]} { 62 default_variants +gcc4470 default_variants-append +gcc44 63 71 } 64 72 65 73 post-extract { 66 74 reinplace "s|R_HOME|\"${prefix}/lib/R\"|" "${worksrcpath}/src/unix/Rscript.c" 67 75 } 68 76 77 configure.env-append r_arch=${build_arch} 78 69 79 configure.args --mandir=\\\${prefix}/share/man \ 70 80 --enable-BLAS-shlib \ 71 81 --enable-R-shlib \ … … 76 86 --with-tcl-config=${prefix}/lib/tclConfig.sh \ 77 87 --with-tk-config=${prefix}/lib/tkConfig.sh \ 78 88 --x-include=${prefix}/include \ 79 --x-lib=${prefix}/lib 89 --x-lib=${prefix}/lib \ 90 --without-recommended-packages 80 91 81 92 test.run yes 82 93 test.target check … … 93 104 reinplace "s|${v}=${destroot}|${v}=|" "${destroot}${prefix}/lib/pkgconfig/libR.pc" 94 105 } 95 106 96 foreach dylib [ exec find ${destroot}${prefix}/lib/R/lib -name "\*.dylib" ] { 107 reinplace "s|rlibdir=\$\{rhome\}/lib|rlibdir=\$\{rhome\}/lib/${build_arch}|" \ 108 "${destroot}${prefix}/lib/pkgconfig/libR.pc" 109 110 foreach dylib [ exec find ${destroot}${prefix}/lib/R/lib/${build_arch} -name "\*.dylib" ] { 97 111 regsub ":$" ${dylib} "" destroot_dylib_path 98 112 regsub ${destroot} ${destroot_dylib_path} "" dylib_path 99 113 system "install_name_tool -id ${dylib_path} ${destroot_dylib_path}" 100 system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/ libR.dylib \114 system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/${build_arch}/libR.dylib \ 101 115 ${destroot_dylib_path}" 102 system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/ libRblas.dylib \116 system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/${build_arch}/libRblas.dylib \ 103 117 ${destroot_dylib_path}" 104 system "install_name_tool -change libRlapack.dylib ${prefix}/lib/R/lib/ libRlapack.dylib \118 system "install_name_tool -change libRlapack.dylib ${prefix}/lib/R/lib/${build_arch}/libRlapack.dylib \ 105 119 ${destroot_dylib_path}" 106 120 } 107 121 … … 109 123 regsub ":$" ${so} "" destroot_so_path 110 124 regsub ${destroot} ${destroot_so_path} "" so_path 111 125 system "install_name_tool -id ${so_path} ${destroot_so_path}" 112 system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/ libR.dylib \126 system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/${build_arch}/libR.dylib \ 113 127 ${destroot_so_path}" 114 system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/ libRblas.dylib \128 system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/${build_arch}/libRblas.dylib \ 115 129 ${destroot_so_path}" 116 system "install_name_tool -change libRlapack.dylib ${prefix}/lib/R/lib/ libRlapack.dylib \130 system "install_name_tool -change libRlapack.dylib ${prefix}/lib/R/lib/${build_arch}/libRlapack.dylib \ 117 131 ${destroot_so_path}" 118 132 } 119 133 120 134 reinplace "s|-dylib_file libRblas\.dylib:\$\(R_HOME\)/lib\$\(R_ARCH\)/libRblas\.dylib| |" \ 121 "${destroot}${prefix}/lib/R/etc/ Makeconf"135 "${destroot}${prefix}/lib/R/etc/${build_arch}/Makeconf" 122 136 }