# HG changeset patch
# User Jeroen Demeyer <jdemeyer@cage.ugent.be>
# Date 1357828710 -3600
# Node ID 6fa7ab28f19769f10dc83a34fccbd61c21159241
# Parent 792aa717790b7a2aaac37721affeb7fdd4b0e509
#13938: various fixes to the ccache package
diff --git a/SPKG.txt b/SPKG.txt
a
|
b
|
|
19 | 19 | |
20 | 20 | == Changelog == |
21 | 21 | |
| 22 | === ccache-3.1.9 (Jeroen Demeyer, 10 January 2013) === |
| 23 | * #13938: upgrade to ccache 3.1.9. |
| 24 | * Fix $CPPFLAGS. |
| 25 | * Remove superfluous "hash -r". |
| 26 | * Add -f option to ln -s to get rid of "File exists" errors. |
| 27 | * Only configure cache size if the user hasn't run ccache before. |
| 28 | * Add spkg-check to run testsuite. |
| 29 | |
22 | 30 | === ccache-3.1.8 (R. Andrew Ohana, 11 September 2012) === |
23 | | * #13032: create ccache spkg |
| 31 | * #13032: create ccache spkg |
diff --git a/spkg-check b/spkg-check
new file mode 100755
-
|
+
|
|
| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | cd src |
| 4 | |
| 5 | $MAKE check |
diff --git a/spkg-install b/spkg-install
a
|
b
|
|
1 | 1 | #!/usr/bin/env bash |
2 | 2 | |
3 | 3 | die () { |
4 | | echo >&2 "$@" |
5 | | exit 1 |
| 4 | echo >&2 "$@" |
| 5 | exit 1 |
6 | 6 | } |
7 | 7 | |
8 | 8 | [ -n "$SAGE_LOCAL" ] || die "SAGE_LOCAL undefined, maybe run \`sage -sh\`?" |
9 | 9 | |
10 | 10 | cd src |
11 | 11 | export LDFLAGS="-L$SAGE_LOCAL/lib $LDFLAGS" |
12 | | export CPPFLAGS="-I$SAGE_LOCAL/include $LDFLAGS" |
| 12 | export CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS" |
13 | 13 | ./configure --prefix="$SAGE_LOCAL" || |
14 | | die "configuring ccache failed" |
| 14 | die "configuring ccache failed" |
15 | 15 | |
16 | 16 | $MAKE || |
17 | | die "building ccache failed" |
| 17 | die "building ccache failed" |
18 | 18 | |
19 | 19 | $MAKE install || |
20 | | die "installing ccache failed" |
| 20 | die "installing ccache failed" |
21 | 21 | |
22 | 22 | mkdir -p "$SAGE_LOCAL/libexec/ccache" |
23 | | ln -s ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/cc" |
24 | | ln -s ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/c++" |
25 | | ln -s ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/gcc" |
26 | | ln -s ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/g++" |
27 | | ln -s ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/clang" |
28 | | ln -s ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/clang++" |
| 23 | ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/cc" |
| 24 | ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/c++" |
| 25 | ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/gcc" |
| 26 | ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/g++" |
| 27 | ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/clang" |
| 28 | ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/clang++" |
29 | 29 | |
30 | | # respect the user's settings if they have them |
31 | | if [[ "$CCACHE_DIR" == "$DOT_SAGE/ccache" ]]; then |
32 | | # we need to increase the max size of ccache |
33 | | # to be able to cache the sage distribution |
34 | | hash -r |
| 30 | # If the user hasn't run ccache before, configure the cache size to 4GB |
| 31 | # to be able to cache the Sage distribution. Otherwise, respect any |
| 32 | # existing configuration. |
| 33 | if [ -z "$CCACHE_DIR" ]; then |
| 34 | # Default directory for the test below |
| 35 | CCACHE_DIR="$HOME/.ccache" |
| 36 | fi |
| 37 | if [ ! -d "$CCACHE_DIR" ]; then |
35 | 38 | ccache --max-size=4G |
36 | 39 | fi |