Ticket #13938: ccache-3.1.9.diff

File ccache-3.1.9.diff, 2.9 KB (added by jdemeyer, 10 years ago)

Diff for the ccache spkg, for review only

  • SPKG.txt

    # 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  
    1919
    2020== Changelog ==
    2121
     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
    2230=== ccache-3.1.8 (R. Andrew Ohana, 11 September 2012) ===
    23   * #13032: create ccache spkg
     31 * #13032: create ccache spkg
  • new file spkg-check

    diff --git a/spkg-check b/spkg-check
    new file mode 100755
    - +  
     1#!/usr/bin/env bash
     2
     3cd src
     4
     5$MAKE check
  • spkg-install

    diff --git a/spkg-install b/spkg-install
    a b  
    11#!/usr/bin/env bash
    22
    33die () {
    4   echo >&2 "$@"
    5   exit 1
     4    echo >&2 "$@"
     5    exit 1
    66}
    77
    88[ -n "$SAGE_LOCAL" ] || die "SAGE_LOCAL undefined, maybe run \`sage -sh\`?"
    99
    1010cd src
    1111export LDFLAGS="-L$SAGE_LOCAL/lib $LDFLAGS"
    12 export CPPFLAGS="-I$SAGE_LOCAL/include $LDFLAGS"
     12export CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS"
    1313./configure --prefix="$SAGE_LOCAL" ||
    14   die "configuring ccache failed"
     14    die "configuring ccache failed"
    1515
    1616$MAKE ||
    17   die "building ccache failed"
     17    die "building ccache failed"
    1818
    1919$MAKE install ||
    20   die "installing ccache failed"
     20    die "installing ccache failed"
    2121
    2222mkdir -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++"
     23ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/cc"
     24ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/c++"
     25ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/gcc"
     26ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/g++"
     27ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/clang"
     28ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/clang++"
    2929
    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.
     33if [ -z "$CCACHE_DIR" ]; then
     34    # Default directory for the test below
     35    CCACHE_DIR="$HOME/.ccache"
     36fi
     37if [ ! -d "$CCACHE_DIR" ]; then
    3538    ccache --max-size=4G
    3639fi