1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
--- src/bin/sage-env.orig 2015-01-06 10:46:04.469687605 +0100
+++ src/bin/sage-env 2015-01-06 10:49:59.547762019 +0100
@@ -110,41 +110,7 @@
}
-# New value for SAGE_ROOT: either SAGE_ROOT (if given)
-# or a guessed value based on pwd.
-if [ -n "$SAGE_ROOT" ]; then
- NEW_SAGE_ROOT="$SAGE_ROOT"
-elif [ -f sage -a -d build ]; then
- NEW_SAGE_ROOT="."
-elif [ -f ../../sage -a -d ../../build ]; then
- NEW_SAGE_ROOT="../.."
-else
- # No idea what SAGE_ROOT should be...
- echo >&2 "Error: You must set the SAGE_ROOT environment variable or run this"
- echo >&2 "script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory."
- return 1
-fi
-
-# Make NEW_SAGE_ROOT absolute
-NEW_SAGE_ROOT=`cd "$NEW_SAGE_ROOT" && pwd -P`
-
-# Sanity check NEW_SAGE_ROOT
-if [ -f "$NEW_SAGE_ROOT/sage" -a -d "$NEW_SAGE_ROOT/build" ]; then
- :
-else
- echo >&2 "Error: SAGE_ROOT is set to a bad value:"
- echo >&2 "SAGE_ROOT=$SAGE_ROOT"
- echo >&2 "You must correct it or erase it and run this script from the SAGE_ROOT"
- echo >&2 "or SAGE_ROOT/local/bin/ directory."
- return 1
-fi
-
-# Warn if NEW_SAGE_ROOT does not equal the old SAGE_ROOT
-if [ "$SAGE_ROOT" != "$NEW_SAGE_ROOT" -a -n "$SAGE_ROOT" ]; then
- echo >&2 "Warning: overwriting SAGE_ROOT environment variable:"
- echo >&2 "Old SAGE_ROOT=$SAGE_ROOT"
- echo >&2 "New SAGE_ROOT=$NEW_SAGE_ROOT"
-fi
+NEW_SAGE_ROOT="/usr"
# Display the Sage startup banner, used in src/bin/sage
sage_banner() {
@@ -187,7 +187,7 @@
# SAGE_LOCAL is the installation prefix and can be customized
if [ -z "$SAGE_LOCAL" ]; then
- export SAGE_LOCAL="$SAGE_ROOT/local"
+ export SAGE_LOCAL="/usr"
fi
# sage-env must know where the Sage's script files are
@@ -233,8 +233,9 @@
export SAGE_EXTCODE="$SAGE_SHARE/sage/ext"
export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
-export SAGE_SRC="$SAGE_ROOT/src"
-export SAGE_DOC_SRC="$SAGE_SRC/doc"
+export GAP_ROOT_DIR="/usr/lib/gap"
+export SAGE_SRC="$SAGE_SHARE/sage/source"
+export SAGE_DOC_SRC="$SAGE_SHARE/doc/sage"
export SAGE_DOC="$SAGE_SHARE/doc/sage"
if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
@@ -374,6 +337,9 @@
export SAGE_STARTUP_FILE
fi
+export LIBMTX="$DOT_SAGE/meataxe"
+[[ -d $LIBMTX ]] || mkdir $LIBMTX # Create meataxe data dir
+
if [ -z "$IPYTHONDIR" ]; then
# We hardcode a version number in the directory name. The idea is
# that we keep using the same version number as long as that is
@@ -468,7 +400,6 @@
fi
fi
fi
-export MAXIMA_PREFIX="$SAGE_LOCAL"
PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB
@@ -629,9 +608,6 @@
LD_LIBRARY_PATH="$SAGE_LOCAL/bin:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH
fi
-# See trac 7186 -- this is needed if ecl is moved
-ECLDIR="$SAGE_LOCAL/lib/ecl/" && export ECLDIR
-
# Handle parallel building/testing/...
# See Trac Ticket #12016
# First, figure out the right values for SAGE_NUM_THREADS (default
|