diff --git a/SPKG.txt b/SPKG.txt
a
|
b
|
|
27 | 27 | |
28 | 28 | == Changelog == |
29 | 29 | |
| 30 | === termcap-1.3.1.p3 (Jeroen Demeyer, 28 March 2012) === |
| 31 | * Trac #12725: Symlink libtermcap.a to libncurses.a if we cannot link |
| 32 | programs against -lncurses. |
| 33 | |
30 | 34 | === termcap-1.3.1.p2 (Jeroen Demeyer, 11 January 2012) === |
31 | 35 | * Trac #12282: Add patches/strcmp_NULL.patch to fix a bug when the |
32 | 36 | environment variable TERM is not set. |
diff --git a/spkg-install b/spkg-install
a
|
b
|
|
1 | 1 | #!/usr/bin/env bash |
2 | 2 | |
3 | 3 | if [ "$SAGE_LOCAL" = "" ]; then |
4 | | echo "SAGE_LOCAL undefined ... exiting"; |
5 | | echo "Maybe run 'sage -sh'?" |
6 | | exit 1 |
| 4 | echo >&2 "SAGE_LOCAL undefined ... exiting" |
| 5 | echo >&2 "Maybe run 'sage --sh'?" |
| 6 | exit 1 |
7 | 7 | fi |
8 | 8 | |
9 | 9 | CFLAGS="-O2 -g -fPIC $CFLAGS" |
10 | 10 | |
11 | 11 | if [ "x$SAGE64" = xyes ]; then |
12 | | CFLAGS="$CFLAGS -m64" |
| 12 | CFLAGS="$CFLAGS -m64" |
13 | 13 | fi |
14 | 14 | export CFLAGS |
15 | 15 | |
… |
… |
|
27 | 27 | |
28 | 28 | build() |
29 | 29 | { |
30 | | if [ ! -f Makefile ]; then |
31 | | ./configure --prefix="$SAGE_LOCAL" |
32 | | if [ $? -ne 0 ]; then |
33 | | echo "ERROR configuring termcap" |
34 | | exit 1 |
35 | | fi |
| 30 | ./configure --prefix="$SAGE_LOCAL" |
| 31 | if [ $? -ne 0 ]; then |
| 32 | echo >&2 "Error configuring termcap" |
| 33 | exit 1 |
36 | 34 | fi |
| 35 | |
37 | 36 | $MAKE CFLAGS="$CFLAGS" install |
38 | 37 | if [ $? -ne 0 ]; then |
39 | | echo "ERROR building termcap" |
| 38 | echo >&2 "Error building termcap" |
40 | 39 | exit 1 |
41 | 40 | fi |
42 | 41 | } |
43 | 42 | |
44 | 43 | build |
45 | 44 | |
46 | | if [ $? -eq 0 -a $SAGE_LOCAL/lib/libtermcap.a ]; then |
47 | | echo "Success building termcap" |
| 45 | # If we cannot link programs against -lncurses, then symlink |
| 46 | # libtermcap.a to libncurses.a. This is to support the PARI and |
| 47 | # Python build scripts when /usr/lib/libncurses.so exists but |
| 48 | # cannot be linked (e.g. because we are cross-compiling). |
| 49 | # See #12725. |
| 50 | if testcflags.sh -lncurses >/dev/null; then |
| 51 | echo "Good, we can link against libncurses on your system." |
48 | 52 | else |
49 | | echo "ERROR building termcap." |
50 | | exit 1 |
| 53 | echo "We cannot link against libncurses on your system," |
| 54 | echo "making a symbolic link libncurses.a -> libtermcap.a" |
| 55 | echo "(to work around bugs in the PARI and Python build scripts)" |
| 56 | cd "$SAGE_LOCAL/lib" && ln -s libtermcap.a libncurses.a |
| 57 | if [ $? -ne 0 ]; then |
| 58 | echo >&2 "Error making symbolic link libncurses.a -> libtermcap.a" |
| 59 | exit 1 |
| 60 | fi |
51 | 61 | fi |
52 | | |