Ticket #24612: Portfile.diff

File Portfile.diff, 5.5 KB (added by kjell.konis@…, 15 years ago)
  • Portfile

    old new  
    33PortSystem 1.0
    44
    55name             R
    6 version          2.10.1
    7 revision        1
     6version          2.11.0
    87categories       math science
    98maintainers      epfl.ch:kjell.konis
    109platforms        darwin
     
    2524                 http://cran.hu.r-project.org/src/base/R-2/ \
    2625                 http://cran.r-project.org/src/base/R-2/
    2726
    28 checksums        md5     75f8b7e875b846ea96a4c6cc0abc00a4 \
    29                  sha1    f5b1969fde3642c233f5198e44a7bf17a7b85ab6 \
    30                  rmd160  7acf060192f205da4731d0ea3c2cc318b65b7e91
     27checksums        md5     c6c1e866299f533617750889c729bfb3 \
     28                 sha1    86af359879afaf18bf0cd9ca36f2957d7b146ba3 \
     29                 rmd160  358d5ba19bd534e9f5be56f517bd217c235599dc
    3130
    3231depends_lib      port:gettext \
    3332                 port:icu \
     
    4443
    4544universal_variant no
    4645
    47 platform darwin 9 {
    48     patchfiles       patch-configure.diff
    49 }
    50 
    51 platform darwin 10 {
    52     patchfiles       patch-configure.diff
    53 }
    54 
    5546variant gcc42 description {Build with gcc42} {
    5647    configure.compiler macports-gcc-4.2
    5748    depends_lib-append port:gcc42
     
    6253    depends_lib-append port:gcc43
    6354}
    6455
    65 if {![variant_isset gcc42] && ![variant_isset gcc43]} {
     56variant gcc44 description {Build with gcc44} {
     57    configure.compiler macports-gcc-4.4
     58    depends_lib-append port:gcc44
     59}
     60
     61if {![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44]} {
    6662    default_variants +gcc43
    6763}
    6864
    6965post-extract {
    70   reinplace "s|R_HOME|\"${prefix}/lib/R\"|" ${worksrcpath}/src/unix/Rscript.c
     66  reinplace "s|R_HOME|\"${prefix}/lib/R\"|" "${worksrcpath}/src/unix/Rscript.c"
    7167}
    7268
    7369configure.args   --mandir=\\\${prefix}/share/man \
     70                 --enable-BLAS-shlib \
    7471                 --enable-R-shlib \
    7572                 --disable-nls \
    7673                 --without-libintl-prefix \
     
    8885post-destroot {
    8986  foreach r { "/bin/R" "/lib/R/bin/R" } {
    9087    foreach dir { "R_HOME_DIR" "R_SHARE_DIR" "R_INCLUDE_DIR" "R_DOC_DIR" } {
    91       reinplace "s|${dir}=${destroot}|${dir}=|" \
    92         "${destroot}${prefix}${r}"
     88      reinplace "s|${dir}=${destroot}|${dir}=|" "${destroot}${prefix}${r}"
    9389    }
    9490  }
    9591
    96   foreach v { "rhome" "rincludedir"} {
     92  foreach v { "rhome" "rincludedir" } {
    9793    reinplace "s|${v}=${destroot}|${v}=|" "${destroot}${prefix}/lib/pkgconfig/libR.pc"
    9894  }
    99 }
    10095
    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"
    137122}
     123