Ticket #13032: trac13032_root.patch

File trac13032_root.patch, 2.4 KB (added by ohanar, 10 years ago)

apply to root repo

  • spkg/bin/sage-env

    # HG changeset patch
    # User R. Andrew Ohana <andrew.ohana@gmail.com>
    # Date 1338148660 25200
    # Node ID 0b444adcf030c129e6929f58c41228dbc437ebbe
    # Parent  423244dca2d7ebaf91401931230736bde1da57eb
    setup ccache in build scripts
    
    diff --git a/spkg/bin/sage-env b/spkg/bin/sage-env
    a b  
    473473    done
    474474fi
    475475
     476# Setup env varariables if ccache is installed
     477if [ -d "$SAGE_LOCAL/libexec/ccache" ]; then
     478    PATH="$SAGE_LOCAL/libexec/ccache:$PATH"; export PATH
     479fi
     480if [ -z "$CCACHE_DIR" ]; then
     481    CCACHE_DIR="$DOT_SAGE/ccache"
     482fi
     483if [ -z "$CYCACHE_DIR" ]; then
     484    CYCACHE_DIR="$DOT_SAGE/cycache"
     485fi
     486if [ -z "$CCACHE_BASEDIR" ]; then
     487    CCACHE_BASEDIR="$SAGE_ROOT"
     488fi
     489export CCACHE_DIR CYCACHE_DIR
     490export CCACHE_BASEDIR
    476491
    477492if [ "$LD" = "" ]; then
    478493    LD="ld"  && export LD
  • spkg/install

    diff --git a/spkg/install b/spkg/install
    a b  
    443443EOF
    444444
    445445# $(TOOLCHAIN) variable containing prerequisites for the build
    446 if [ "$need_to_install_gcc" = yes ]; then
    447     echo >&3 'TOOLCHAIN=$(INST)/$(GCC)'
    448 else
    449     echo >&3 'TOOLCHAIN='
     446echo >&3 -n 'TOOLCHAIN ='
     447if [ "$SAGE_INSTALL_CCACHE" == yes ]; then
     448    echo >&3 -n ' $(INST)/ccache'
    450449fi
     450if [ "$need_to_install_gcc" == yes ]; then
     451    echo >&3 -n ' $(INST)/$(GCC)'
     452fi
     453echo >&3
    451454
    452455# Copy spkg/standard/deps
    453456cat >&3 <<EOF
  • spkg/standard/deps

    diff --git a/spkg/standard/deps b/spkg/standard/deps
    a b  
    489489        +$(PIPE) "$(SAGE_SPKG) $(SAGE_SCRIPTS) 2>&1" "tee -a $(SAGE_LOGS)/$(SAGE_SCRIPTS).log"
    490490
    491491###############################################################################
    492 # Further receipts for normal packages:
     492# Receipts for toolchain packages:
    493493###############################################################################
    494494
     495$(INST)/ccache: $(BASE) $(INST)/$(ZLIB)
     496        +$(PIPE) "$(SAGE_SPKG) ccache 2>&1" "tee -a $(SAGE_LOGS)/ccache.log"
     497        touch $(INST)/ccache
     498
    495499$(INST)/$(GCC): $(BASE) $(INST)/$(MPIR) $(INST)/$(MPFR) $(INST)/$(MPC) \
    496500                $(INST)/$(ZLIB) $(INST)/$(PATCH)
    497501        +$(PIPE) "$(SAGE_SPKG) $(GCC) 2>&1" "tee -a $(SAGE_LOGS)/$(GCC).log"
    498502
     503###############################################################################
     504# Further receipts for normal packages:
     505###############################################################################
     506
    499507$(INST)/$(PIL): $(BASE) $(INST)/$(PYTHON) $(INST)/$(PATCH)
    500508        +$(PIPE) "$(SAGE_SPKG) $(PIL) 2>&1" "tee -a $(SAGE_LOGS)/$(PIL).log"
    501509