Changeset 71488


Ignore:
Timestamp:
Sep 15, 2010, 2:09:59 AM (10 years ago)
Author:
dports@…
Message:

R: fix package build errors (#26426)

  • set r_arch environment variable and install into R's multi-platform directory structure
  • make installation of recommended packages a (default) variant
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/math/R/Portfile

    r69211 r71488  
    55name             R
    66version          2.11.1
     7revision         1
    78categories       math science
    89maintainers      epfl.ch:kjell.konis
     
    4445universal_variant no
    4546
     47variant recommended description {Install recommended R packages} {
     48    configure.args-delete --without-recommended-packages
     49    configure.args-append --with-recommended-packages
     50}
     51
    4652variant gcc42 conflicts gcc43 gcc44 description {Build with gcc42} {
    4753    configure.compiler macports-gcc-4.2
     
    5965}
    6066
     67default_variants +recommended
     68
    6169if {![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44]} {
    62     default_variants +gcc44
     70    default_variants-append +gcc44
    6371}
    6472
     
    6674  reinplace "s|R_HOME|\"${prefix}/lib/R\"|" "${worksrcpath}/src/unix/Rscript.c"
    6775}
     76
     77configure.env-append r_arch=${build_arch}
    6878
    6979configure.args   --mandir=\\\${prefix}/share/man \
     
    7787                 --with-tk-config=${prefix}/lib/tkConfig.sh \
    7888                 --x-include=${prefix}/include \
    79                  --x-lib=${prefix}/lib
     89                 --x-lib=${prefix}/lib \
     90                 --without-recommended-packages
    8091
    8192test.run         yes
     
    94105  }
    95106
    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" ] {
    97111    regsub ":$" ${dylib} "" destroot_dylib_path
    98112    regsub ${destroot} ${destroot_dylib_path} "" dylib_path
    99113    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 \
    101115      ${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 \
    103117      ${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 \
    105119      ${destroot_dylib_path}"
    106120  }
     
    110124    regsub ${destroot} ${destroot_so_path} "" so_path
    111125    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 \
    113127      ${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 \
    115129      ${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 \
    117131      ${destroot_so_path}"
    118132  }
    119133
    120134  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"
    122136}
Note: See TracChangeset for help on using the changeset viewer.