# HG changeset patch
# User J. H. Palmieri <palmieri@math.washington.edu>
# Date 1351285561 25200
# Node ID 46935f1ecd7687bea94d0b8362479c0fc6600aab
# Parent 0c1731b225dc33e6ced60a82740f3ad36e30beb6
#9668: make R relocatable by using $SAGE_ROOT instead of hard-coded path.
diff --git a/SPKG.txt b/SPKG.txt
a
|
b
|
much code written for S runs unaltered u |
41 | 41 | |
42 | 42 | == Changelog == |
43 | 43 | |
| 44 | === r-2.14.0.p7 (John Palmieri, 25 October 2012) === |
| 45 | * #9668: make R relocatable by using $SAGE_ROOT instead of hard-coded path. |
| 46 | |
44 | 47 | === r-2.14.0.p6 (Jeroen Demeyer, 10 September 2012) === |
45 | 48 | * #13443: some clean up of spkg-install. |
46 | 49 | * Compile R with optimization (at -O2 level). |
diff --git a/spkg-install b/spkg-install
a
|
b
|
if [ $? -ne 0 ]; then |
146 | 146 | exit 1 |
147 | 147 | fi |
148 | 148 | |
| 149 | # Make R relocatable by using "$SAGE_ROOT" instead of the hardcoded path. |
| 150 | for f in "$SAGE_LOCAL/bin/R" "$SAGE_LOCAL/lib/R/bin/R" \ |
| 151 | "$SAGE_LOCAL/lib/R/bin/libtool" "$SAGE_LOCAL/lib/R/etc/Makeconf" \ |
| 152 | "$SAGE_LOCAL/lib/R/etc/Renviron" |
| 153 | do |
| 154 | # Add quotes in lines like 'blah=$SAGE_ROOT/...' |
| 155 | # and replace any remaining occurrences of SAGE_ROOT. |
| 156 | sed -e "s|=$SAGE_ROOT|=\"\$SAGE_ROOT\"|g" -e "s|$SAGE_ROOT|\$SAGE_ROOT|g" "$f" > "$f.tmp" |
| 157 | mv "$f.tmp" "$f" |
| 158 | done |
| 159 | |
| 160 | # Make scripts executable. |
| 161 | chmod a+x "$SAGE_LOCAL/bin/R" "$SAGE_LOCAL/lib/R/bin/R" "$SAGE_LOCAL/lib/R/bin/libtool" |
| 162 | |
149 | 163 | if [ "$UNAME" = "Darwin" ]; then |
150 | 164 | echo "Removing fake java and javac compiler" |
151 | 165 | rm -f "$SAGE_LOCAL"/bin/java |