Ticket #9668: trac_9668-r.v3.patch

File trac_9668-r.v3.patch, 2.4 KB (added by jhpalmieri, 8 years ago)
  • SPKG.txt

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1363566717 25200
    # Node ID 485622df5b1322e4e8b271d707b45d6c86f40ef1
    # Parent  40ae1098f9d08af16729275c58552be4664bd658
    #9668: fix hardcoding of paths in R by defining R_SHARE_DIR,
    R_INCLUDE_DIR, and R_DOC_DIR relative to R_HOME_DIR, or rather, by
    removing the portion of scripts/Makefile.in which hardcodes these
    paths.
    
    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    3636     The corresponding patch to m4/clibs.m4 is not included, as
    3737     autoconf-2.68 gives errors, even on the clean upstream sources.
    3838   - R.sh.in: Set R_HOME_DIR to "${SAGE_LOCAL}/lib/R/" when running R.
     39   - scripts.Makefile.in.patch: the file src/src/scripts/R.sh.in
     40     defines R_SHARE_DIR, R_INCLUDE_DIR, and R_DOC_DIR relative to
     41     R_HOME_DIR, but scripts/Makefile.in hardcodes these
     42     locations. This patch removes this hardcoding. See Sage trac
     43     #9668.
    3944   - cygwin-logl.patch: disable use of logl on Cygwin, see #14078.
    4045
    4146== Changelog ==
    4247
     48=== r-2.15.2.p2 (John H. Palmieri, 17 March 2013) ===
     49 * #9668: fix hardcoding of paths in R by defining R_SHARE_DIR,
     50   R_INCLUDE_DIR, and R_DOC_DIR relative to R_HOME_DIR, or rather, by
     51   removing the portion of scripts/Makefile.in which hardcodes these
     52   paths.
     53
    4354=== r-2.15.2.p1 (Jean-Pierre Flori, 7 February 2013) ===
    4455 * #14078: do not use logl on Cygwin.
    4556
  • new file patches/scripts.Makefile.in.patch

    diff --git a/patches/scripts.Makefile.in.patch b/patches/scripts.Makefile.in.patch
    new file mode 100644
    - +  
     1--- src/src/scripts/Makefile.in 2012-03-01 15:02:25.000000000 -0800
     2+++ src/src/scripts/Makefile.in 2013-03-17 08:48:56.000000000 -0700
     3@@ -86,10 +86,7 @@
     4 install: installdirs install-cmds
     5        @rm -f $(DESTDIR)$(bindir)/R
     6        @(d=`$(ECHO) '$(rhome)' | sed 's,/,\\\/,g';`; \
     7-         d2=`$(ECHO) '$(rsharedir)' | sed 's,/,\\\/,g';`; \
     8-         d3=`$(ECHO) '$(rincludedir)' | sed 's,/,\\\/,g';`; \
     9-         d4=`$(ECHO) '$(rdocdir)' | sed 's,/,\\\/,g';`; \
     10-         sed -e "1,/R_HOME_DIR=/s/\\(R_HOME_DIR=\\).*/\\1$${d}/;" -e "s/\\(R_SHARE_DIR=\\).*/\\1$${d2}/;" -e  "s/\\(R_INCLUDE_DIR=\\).*/\\1$${d3}/;" -e "s/\\(R_DOC_DIR=\\).*/\\1$${d4}/;"\
     11+         sed -e "1,/R_HOME_DIR=/s/\\(R_HOME_DIR=\\).*/\\1$${d}/;"\
     12          < R.fe > "$(DESTDIR)$(Rexecbindir)/R")
     13        @$(INSTALL_SCRIPT)  "$(DESTDIR)$(Rexecbindir)/R" "$(DESTDIR)$(bindir)/R"
     14        @chmod 755 "$(DESTDIR)$(bindir)/R" "$(DESTDIR)$(Rexecbindir)/R"