Ticket #20222: R.3.diff

File R.3.diff, 6.9 KB (added by kjell.konis@…, 15 years ago)

third time's the charm

  • Portfile

    diff -u -r -P /MacPorts/var/macports/sources/rsync.macports.org/release/ports/math/R/Portfile ./Portfile
    old new  
    33PortSystem 1.0
    44
    55name             R
    6 version          2.9.1
     6version          2.9.2
    77categories       math science
    88maintainers      epfl.ch:kjell.konis
    99platforms        darwin
     
    1212
    1313long_description \
    1414    R is a language and environment for statistical computing and graphics. \
    15     R provides a wide variety of statistical (linear and nonlinear modelling, \
     15    R provides a wide variety of statistical (linear and nonlinear modeling, \
    1616    classical statistical tests, time-series analysis, classification, \
    1717    clustering, ...) and graphical techniques, and is highly extensible.
    1818
     
    2424                 http://cran.hu.r-project.org/src/base/R-2/ \
    2525                 http://cran.r-project.org/src/base/R-2/
    2626
    27 checksums        md5     54a79eebdf0cec3fd2c489fc94d99b00 \
    28                  sha1    59bcc4e775db5c681aefbfafe9fc357bc99e1fad \
    29                  rmd160  cdce66673d301555c3a4c128283b456b85d9dcaa
     27checksums        md5     112e2a1306cf71320e45d14e87e5b913 \
     28                 sha1    3934743b67a57691db724606c575e38a35ecb590 \
     29                 rmd160  71313889c2886b285dcf588d60089a5ce7260648
    3030
    3131depends_lib      port:gettext \
    3232                 port:glib2 \
     
    4242
    4343universal_variant no
    4444
     45platform darwin 9 {
     46    patchfiles       patch-configure.diff
     47}
     48
     49platform darwin 10 {
     50    patchfiles       patch-configure.diff
     51}
    4552
    4653variant gcc42 description {Build with gcc42} {
    4754    configure.compiler macports-gcc-4.2
     
    8794  foreach v { "rhome" "rincludedir"} {
    8895    reinplace "s|${v}=${destroot}|${v}=|" "${destroot}${prefix}/lib/pkgconfig/libR.pc"
    8996  }
     97}
    9098
    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   }
     99platform darwin 8 {
     100    post-destroot {
     101          foreach r { "/bin/R" "/lib/R/bin/R" } {
     102            foreach dir { "R_HOME_DIR" "R_SHARE_DIR" "R_INCLUDE_DIR" "R_DOC_DIR" } {
     103              reinplace "s|${dir}=${destroot}|${dir}=|" \
     104                "${destroot}${prefix}${r}"
     105            }
     106          }
     107
     108          foreach v { "rhome" "rincludedir"} {
     109            reinplace "s|${v}=${destroot}|${v}=|" "${destroot}${prefix}/lib/pkgconfig/libR.pc"
     110          }
     111
     112        system "install_name_tool -id ${prefix}/lib/R/lib/libR.dylib \
     113            ${destroot}${prefix}/lib/R/lib/libR.dylib"
     114        system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/libRblas.dylib \
     115            ${destroot}${prefix}/lib/R/lib/libR.dylib"
     116
     117        system "install_name_tool -id ${prefix}/lib/R/lib/libRblas.dylib \
     118            ${destroot}${prefix}/lib/R/lib/libRblas.dylib"
     119
     120        system "install_name_tool -id ${prefix}/lib/R/lib/libRlapack.dylib \
     121            ${destroot}${prefix}/lib/R/lib/libRlapack.dylib"
     122        system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/libRblas.dylib \
     123            ${destroot}${prefix}/lib/R/lib/libRlapack.dylib"
     124        system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
     125            ${destroot}${prefix}/lib/R/lib/libRlapack.dylib"
     126
     127        foreach so [ exec find ${destroot}${prefix}/lib/R -name "\*.so" ] {
     128            regsub ":$" ${so} "" destroot_so_path
     129            regsub ${destroot} ${destroot_so_path} "" so_path
     130            system "install_name_tool -id ${so_path} ${destroot_so_path}"
     131            system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib \
     132                ${destroot_so_path}"
     133        }
     134    }
    112135}
    113136
     137
  • files/patch-configure.diff

    diff -u -r -P /MacPorts/var/macports/sources/rsync.macports.org/release/ports/math/R/files/patch-configure.diff ./files/patch-configure.diff
    old new  
     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