Ticket #4949: trac_4949-root-delta3to4.patch

File trac_4949-root-delta3to4.patch, 6.6 KB (added by jhpalmieri, 8 years ago)

root repo: diff between v3 and v4

  • Makefile

    diff --git a/Makefile b/Makefile
    a b doc-clean: 
    5555clean:
    5656        @echo "Deleting spkg/build..."
    5757        rm -rf spkg/build
    58         mkdir -p spkg/build
    5958        @echo "Deleting spkg/archive..."
    6059        rm -rf spkg/archive
    61         mkdir -p spkg/archive
    62         @if [ -n "$(SAGE_BUILD_TMPDIR)" ] && [ -d "$(SAGE_BUILD_TMPDIR)/build" ]; then \
    63             echo "Deleting \$$SAGE_BUILD_TMPDIR/build..."; \
    64             echo "rm -rf $(SAGE_BUILD_TMPDIR)/build"; \
    65             rm -rf "$(SAGE_BUILD_TMPDIR)/build"; \
    66             echo "mkdir -p $(SAGE_BUILD_TMPDIR)/build"; \
    67             mkdir -p "$(SAGE_BUILD_TMPDIR)/build"; \
    68         fi
    6960
    7061distclean: clean
    7162        @echo "Deleting all remaining traces of builds, tests etc. ..."
    distclean: clean 
    8475        rm -rf doc
    8576        rm -rf examples
    8677        rm -rf sage-python
    87         rm -rf spkg/build
    88         rm -rf spkg/archive
    8978        rm -rf matplotlibrc
    9079        rm -rf tmp
    9180        rm -f .BUILDSTART
    92         @if [ -n "$(SAGE_BUILD_TMPDIR)" ]; then \
    93             echo "rm -rf $(SAGE_BUILD_TMPDIR)/build"; \
    94             rm -rf "$(SAGE_BUILD_TMPDIR)/build"; \
    95         fi
    9681
    9782micro_release:
    9883        . spkg/bin/sage-env && local/bin/sage-micro_release
  • spkg/base/bzip2-1.0.5-install

    diff --git a/spkg/base/bzip2-1.0.5-install b/spkg/base/bzip2-1.0.5-install
    a b  
    44###########################################
    55
    66CUR="`pwd`"
    7 BUILD=build
     7if [ ! -n "$SAGE_BUILD_DIR" ]; then
     8    SAGE_BUILD_DIR="$SAGE_ROOT/spkg/build"
     9fi
     10# This directory should already exist: it should have been created by
     11# prereq.  Just in case...
     12mkdir -p "$SAGE_BUILD_DIR"
     13if [ $? -ne 0 ]; then
     14    echo >&2 "Error creating directory $SAGE_BUILD_DIR."
     15    exit 1
     16fi
     17
    818SAGE_LOCAL="`pwd`/../local"
    919VERSION=1.0.5
    1020TARGET=bzip2-$VERSION
    fi 
    3545
    3646build()
    3747{
    38     cd $BUILD
     48    cd "$SAGE_BUILD_DIR"
    3949    echo "Unpacking bzip2"
    40     gzip -cd ../base/$TARGET.tar.gz | tar xf -
     50    gzip -cd "$SAGE_ROOT/spkg/base/$TARGET.tar.gz" | tar xf -
    4151    cd bzip2-$VERSION
    4252
    4353    echo "Building bzip2"
  • spkg/base/dir-0.1-install

    diff --git a/spkg/base/dir-0.1-install b/spkg/base/dir-0.1-install
    a b  
    11#!/bin/sh
    22
    33TARGET=dir-0.1
    4 BUILD=`pwd`/build
    54
    65mymkdir()
    76{
    build() 
    2019   mymkdir "../local/bin"
    2120   mymkdir "../local/include"
    2221   mymkdir "../tmp/"
    23    mymkdir "$BUILD"
    2422   mymkdir "installed/"
    2523
    2624   # Remove this line in Trac #12311
  • spkg/base/prereq-0.9-install

    diff --git a/spkg/base/prereq-0.9-install b/spkg/base/prereq-0.9-install
    a b  
    44###########################################
    55
    66
    7 BUILD=build
    8 ROOT=`pwd`
    9 LOCAL="$ROOT/../local"
    107TARGET=prereq-0.9
     8if [ ! -n "$SAGE_BUILD_DIR" ]; then
     9    SAGE_BUILD_DIR="$SAGE_ROOT/spkg/build"
     10fi
     11mkdir -p "$SAGE_BUILD_DIR"
     12if [ $? -ne 0 ]; then
     13    echo >&2 "Error creating directory $SAGE_BUILD_DIR."
     14    exit 1
     15fi
    1116
    12 cd $BUILD
     17cd "$SAGE_BUILD_DIR"
    1318
    1419echo "Starting prerequisite check."
    1520echo "Machine: `uname -a`"
    trap '' TTOU 
    151156# does not update the base packages and we cannot retro-actively change
    152157# that in earlier versions.  So the only thing to do is to skip this
    153158# test.
    154 if ! [ -f "../base/$TARGET.tar" ]; then
     159if ! [ -f "$SAGE_ROOT/spkg/base/$TARGET.tar" ]; then
    155160    echo >&2 "The file 'spkg/base/$TARGET.tar' does not exist."
    156161    echo >&2 "Most likely, this is because you upgraded from an old version of Sage."
    157162    echo >&2 "Since this package only does some checks, it should be okay to continue"
    158163    echo >&2 "without it.  Skipping prerequisite checks..."
    159164else
    160     tar xf "../base/$TARGET.tar"
     165    tar xf "$SAGE_ROOT/spkg/base/$TARGET.tar"
    161166   
    162167    # A reasonably sophisticated test is performed in a configure
    163168    # script, which checks compilers exist, their version numbers,
    if [ -z "`make --version 2>&1 | grep GNU 
    413418fi
    414419
    415420
    416 touch $ROOT/installed/$TARGET
    417 
     421touch "$SAGE_ROOT/spkg/installed/$TARGET"
  • spkg/bin/sage-spkg

    diff --git a/spkg/bin/sage-spkg b/spkg/bin/sage-spkg
    a b if [ -f "$INSTALLED/$PKG_NAME" -a $FORCE 
    192192    exit 0
    193193fi
    194194
    195 if [ -n "$SAGE_BUILD_TMPDIR" ]; then
    196     if [ ! -d "$SAGE_BUILD_TMPDIR" ]; then
    197         echo "Creating directory \$SAGE_BUILD_TMPDIR (=$SAGE_BUILD_TMPDIR)."
    198         mkdir -p "$SAGE_BUILD_TMPDIR"
    199     fi
    200     echo "Building in $SAGE_BUILD_TMPDIR."
    201 else
    202     SAGE_BUILD_TMPDIR="$SAGE_PACKAGES"
     195if [ ! -n "$SAGE_BUILD_DIR" ]; then
     196    SAGE_BUILD_DIR="$SAGE_PACKAGES/build"
    203197fi
    204  
     198
    205199mkdir -p "$SAGE_PACKAGES/installed"
    206200if [ $? -ne 0 ]; then
    207201    echo >&2 "Error creating directory $SAGE_PACKAGES/installed."
    208202    exit 1
    209203fi
    210 mkdir -p "$SAGE_BUILD_TMPDIR/build/old"
     204mkdir -p "$SAGE_BUILD_DIR"
    211205if [ $? -ne 0 ]; then
    212     echo >&2 "Error creating directory $SAGE_BUILD_TMPDIR/build/old."
     206    echo >&2 "Error creating directory $SAGE_BUILD_DIR."
    213207    exit 1
    214208fi
    215209
    216 SAGE_BUILD_TMPDIR="$SAGE_BUILD_TMPDIR/build/"
    217 cd "$SAGE_BUILD_TMPDIR"
     210cd "$SAGE_BUILD_DIR"
    218211
    219212if [ $DELETE_TMP -eq 1 ]; then
    220213    echo "Deleting directories from past builds of previous/current versions of $PKG_NAME"
    221214    # Make triply sure that we are in the build directory before doing
    222215    # a scary "rm -rf".
    223     cd "$SAGE_BUILD_TMPDIR"
     216    cd "$SAGE_BUILD_DIR"
    224217    # The previous command should always succeed because we just
    225218    # created this directory if it wasn't there already, but just in case...
    226219    if [ $? -ne 0 ]; then
    if [ $DELETE_TMP -eq 1 ]; then 
    229222        rm -rf "$PKG_BASE-"*
    230223    fi
    231224else
    232     echo "Moving directories from past builds of previous/current versions of $PKG_NAME to build/old"
    233     mv -f "$PKG_BASE-"* old/  2>/dev/null
     225    for dir in "$PKG_BASE-"*
     226    do
     227        if [ -e "$dir" ]; then
     228            echo "Moving old directory $dir to $SAGE_BUILD_DIR/old..."
     229            mkdir -p old
     230            if [ $? -ne 0 ]; then
     231                echo >&2 "Error creating directory $SAGE_BUILD_DIR/old."
     232                exit 1
     233            fi
     234            rm -rf old/"$dir"
     235            mv -f "$dir" old/
     236        fi
     237    done
    234238fi
    235239
    236240if [ ! -f "$PKG_SRC" ]; then
    if [ $? -eq 0 ]; then 
    454458    # Delete the temporary build directory if required.
    455459    if [ $DELETE_TMP -eq 1 ]; then
    456460        echo "Now cleaning up tmp files."
    457         if [ -d "$SAGE_BUILD_TMPDIR/$PKG_NAME" ]; then
     461        if [ -d "$SAGE_BUILD_DIR/$PKG_NAME" ]; then
    458462            # the if is there only to avoid the possibility of a weird bug.
    459             cd "$SAGE_BUILD_TMPDIR/"
    460             rm -rf "$SAGE_BUILD_TMPDIR/$PKG_NAME"
     463            cd "$SAGE_BUILD_DIR/"
     464            rm -rf "$SAGE_BUILD_DIR/$PKG_NAME"
    461465        fi
    462466    else
    463467        echo "You can safely delete the temporary build directory"
    464         echo "$SAGE_BUILD_TMPDIR/$PKG_NAME"
     468        echo "$SAGE_BUILD_DIR/$PKG_NAME"
    465469    fi
    466470
    467471else