#9668: Fix hardcoding of paths in R binary
---------------------------------------------------------------------------------------------------------------+
       Reporter:  kcrisman                                                      
                               |         Owner:  leif                        
           Type:  defect                                                        
                               |        Status:  new                         
       Priority:  major                                                         
                               |     Milestone:  sage-5.4                    
      Component:  packages                                                      
                               |    Resolution:                              
       Keywords:  R spkg R.sh.in libR.pc pkg-config hard-coded package 
installation R_HOME_DIR sd32 r-project  |   Work issues:  Provide an R 
2.10.1.p6 spkg.
Report Upstream:  N/A                                                           
                               |     Reviewers:                              
        Authors:                                                                
                               |     Merged in:                              
   Dependencies:  #9906                                                         
                               |      Stopgaps:                              
---------------------------------------------------------------------------------------------------------------+

Comment (by jhpalmieri):

 Well, if the problems on mark are not related, then for this ticket, we
 could just add some lines at the end of spkg-install:
 {{{
 # Make R relocatable by using "$SAGE_ROOT" instead of the hardcoded path.
 sed -e "s|$SAGE_ROOT|\$SAGE_ROOT/|" "$SAGE_LOCAL/bin/R" >
 "$SAGE_LOCAL/bin/R.tmp" && mv "$SAGE_LOCAL/bin/R.tmp" "$SAGE_LOCAL/bin/R"
 && chmod a+x "$SAGE_LOCAL/bin/R"
 sed -e "s|$SAGE_ROOT|\$SAGE_ROOT/|" "$SAGE_LOCAL/lib/R/bin/R" >
 "$SAGE_LOCAL/lib/R/bin/R.tmp" && mv "$SAGE_LOCAL/lib/R/bin/R.tmp"
 "$SAGE_LOCAL/lib/R/bin/R" && chmod a+x "$SAGE_LOCAL/lib/R/bin/R"
 }}}
 (It's too bad that the `-i` flag for sed is not portable.) `libR.pc`
 already uses SAGE_ROOT. What else needs to be done?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9668#comment:16>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to