Ticket #20222: R.diff

File R.diff, 3.9 KB (added by blb@…, 15 years ago)

diff to R

  • files/patch-configure.diff

     
     1--- configure.orig      2009-06-15 09:22:20.000000000 -0600
     2+++ configure   2009-07-07 23:51:35.000000000 -0600
     3@@ -31854,10 +31854,10 @@
     4     DYLIB_EXT=".dylib"
     5     dylib_ldflags="${darwin_dylib_ldflags}"
     6     MAJR_VERSION=`echo "${PACKAGE_VERSION}" | sed  -e "s/[\.][1-9]$/.0/"`
     7-    LIBR_LDFLAGS="-install_name libR.dylib -compatibility_version ${MAJR_VERSION}  -current_version ${PACKAGE_VERSION}  -headerpad_max_install_names"
     8-    RLAPACK_LDFLAGS="-install_name libRlapack.dylib -compatibility_version ${MAJR_VERSION} -current_version ${PACKAGE_VERSION}  -headerpad_max_install_names"
     9+    LIBR_LDFLAGS="-install_name \$(libdir)/R/lib/libR.dylib -compatibility_version ${MAJR_VERSION}  -current_version ${PACKAGE_VERSION}  -headerpad_max_install_names"
     10+    RLAPACK_LDFLAGS="-install_name \$(libdir)/R/lib/libRlapack.dylib -compatibility_version ${MAJR_VERSION} -current_version ${PACKAGE_VERSION}  -headerpad_max_install_names"
     11     ## don't use version in libRblas so we can replace it with any BLAS implementation
     12-    RBLAS_LDFLAGS="-install_name libRblas.dylib -headerpad_max_install_names"
     13+    RBLAS_LDFLAGS="-install_name \$(libdir)/R/lib/libRblas.dylib -headerpad_max_install_names"
     14     ;;
     15   hpux*)
     16     ## Needs to avoid embedding a relative path ../../../bin.
     17@@ -38329,20 +38329,6 @@
     18 fi
     19 
     20 
     21-case "${host_os}" in
     22-  darwin*)
     23-    ## In order to allow the R build to be relocatable, we strip paths
     24-    ## from all shlibs and rely on DYLD_LIBRARY_PATH. Unfortunately
     25-    ## Darwin linker ignores it at build-time and doesn't use -L to
     26-    ## resolve dylib dependencies, so libRblas will not be found unless
     27-    ## we tell ld where it lives. I don't know of any more elegant solution :/
     28-    if test "x${use_blas_shlib}" = xyes; then
     29-      LIBR="${LIBR} -dylib_file libRblas.dylib:\$(R_HOME)/lib\$(R_ARCH)/libRblas.dylib"
     30-    fi
     31-  ;;
     32-esac
     33-
     34-
     35 ## This version is used to build a shared BLAS lib
     36 BLAS_LIBS0=${BLAS_LIBS}
     37 
  • Portfile

     
    44
    55name             R
    66version          2.9.1
     7revision         1
    78categories       math science
    89maintainers      epfl.ch:kjell.konis
    910platforms        darwin
     
    4243
    4344universal_variant no
    4445
     46patchfiles       patch-configure.diff
    4547
    4648variant gcc42 description {Build with gcc42} {
    4749    configure.compiler macports-gcc-4.2
     
    8789  foreach v { "rhome" "rincludedir"} {
    8890    reinplace "s|${v}=${destroot}|${v}=|" "${destroot}${prefix}/lib/pkgconfig/libR.pc"
    8991  }
    90 
    91   system "install_name_tool -id ${prefix}/lib/R/lib/libR.dylib \
    92     ${destroot}${prefix}/lib/R/lib/libR.dylib"
    93   system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/libRblas.dylib \
    94     ${destroot}${prefix}/lib/R/lib/libR.dylib"
    95 
    96   system "install_name_tool -id ${prefix}/lib/R/lib/libRblas.dylib \
    97     ${destroot}${prefix}/lib/R/lib/libRblas.dylib"
    98 
    99   system "install_name_tool -id ${prefix}/lib/R/lib/libRlapack.dylib \
    100     ${destroot}${prefix}/lib/R/lib/libRlapack.dylib"
    101   system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/libRblas.dylib \
    102     ${destroot}${prefix}/lib/R/lib/libRlapack.dylib"
    103   system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
    104     ${destroot}${prefix}/lib/R/lib/libRlapack.dylib"
    105 
    106   foreach so [ exec find ${destroot}${prefix}/lib/R -name "\*.so" ] {
    107     regsub ":$" ${so} "" destroot_so_path
    108     regsub ${destroot} ${destroot_so_path} "" so_path
    109     system "install_name_tool -id ${so_path} ${destroot_so_path}"
    110     system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib ${destroot_so_path}"
    111   }
    11292}
    11393