Ticket #24328: Portfile.diff

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

    old new  
    44
    55name             R
    66version          2.10.1
    7 revision        1
     7revision         2
    88categories       math science
    99maintainers      epfl.ch:kjell.konis
    1010platforms        darwin
     
    4444
    4545universal_variant no
    4646
    47 platform darwin 9 {
    48     patchfiles       patch-configure.diff
    49 }
    50 
    51 platform darwin 10 {
    52     patchfiles       patch-configure.diff
    53 }
    54 
    5547variant gcc42 description {Build with gcc42} {
    5648    configure.compiler macports-gcc-4.2
    5749    depends_lib-append port:gcc42
     
    6254    depends_lib-append port:gcc43
    6355}
    6456
    65 if {![variant_isset gcc42] && ![variant_isset gcc43]} {
     57variant gcc44 description {Build with gcc44} {
     58    configure.compiler macports-gcc-4.4
     59    depends_lib-append port:gcc44
     60}
     61
     62if {![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44]} {
    6663    default_variants +gcc43
    6764}
    6865
     
    7168}
    7269
    7370configure.args   --mandir=\\\${prefix}/share/man \
     71                 --enable-BLAS-shlib \
    7472                 --enable-R-shlib \
    7573                 --disable-nls \
    7674                 --without-libintl-prefix \
     
    8886post-destroot {
    8987  foreach r { "/bin/R" "/lib/R/bin/R" } {
    9088    foreach dir { "R_HOME_DIR" "R_SHARE_DIR" "R_INCLUDE_DIR" "R_DOC_DIR" } {
    91       reinplace "s|${dir}=${destroot}|${dir}=|" \
    92         "${destroot}${prefix}${r}"
     89      reinplace "s|${dir}=${destroot}|${dir}=|" "${destroot}${prefix}${r}"
    9390    }
    9491  }
    9592
    96   foreach v { "rhome" "rincludedir"} {
     93  foreach v { "rhome" "rincludedir" } {
    9794    reinplace "s|${v}=${destroot}|${v}=|" "${destroot}${prefix}/lib/pkgconfig/libR.pc"
    9895  }
    99 }
    10096
    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  }
    137120}
     121