Ticket #7761: python-7761.patch

File python-7761.patch, 3.0 KB (added by drkirkby, 10 years ago)
  • SPKG.txt

    # HG changeset patch
    # User David Kirkby <david.kirkby@onetel.net>
    # Date 1263157062 0
    # Node ID 6c707a35536410d42d8c733b11bd7879df83b040
    # Parent  47b63cd1e3873cd120dd5853722538c4f144ec68
    Ensure CC, CFLAGS, CXX and CXXFLAGS propogate properly
    which will allow suitable flags to be set globally.
    
    Removed a 'set -e' which caused more problems than it solved,
    as it stopped error messages being displayed. Virtually all
    functions which could have failed were checked anyway. One,
    where an Itanium fix was applied was not checked, so I added a check
    
    diff -r 47b63cd1e387 -r 6c707a355364 SPKG.txt
    a b  
    5353
    5454== Changelog ==
    5555
     56=== python-2.6.2.p5 (David Kirkby, January 10th 2010 ==
     57 * Add "CC=$CC $CFLAGS" in order to get the code to honor CFLAGS.
     58   Otherwise, CFLAGS gets ignored. Changes to sage-env will ensure
     59   CFLAGS gets set to sensible values.
     60 * Do same for CXX and CXXFLAGS
     61 * Remove an undesirable 'set -e' which stopped errors being displayed.
     62 * Added a check that the Itanium fix was properly applied.
     63
    5664=== python-2.6.2.p2 (Jason Grout Sep 22, 2009) ===
    5765 * Patch for readline-6.0: http://bugs.python.org/issue5833 (we
    5866   applied the small patch
  • spkg-install

    diff -r 47b63cd1e387 -r 6c707a355364 spkg-install
    a b  
    1111   exit 1
    1212fi
    1313
    14 # This tells Bash to exit the script if any statement returns a non-true
    15 # value.
    16 set -e
    17 
    1814# PATCH
    1915
    2016cp patches/ctypes__init__.py src/Lib/ctypes/__init__.py
     
    10197    if [ "`uname -m`" = "ia64" -a "`uname`" = "Linux" ]; then
    10298        echo "Updating readline.c for Linux/Itanium"
    10399        cp ../patches/readline.c-Itanium-fix Modules/readline.c
     100        if [ $? -ne 0 ]; then
     101            echo "Error copying patched readline.c for Itanium"
     102            exit 1
     103        fi
    104104    fi
    105105}
    106106
     
    121121            --disable-toolbox-glue
    122122        fi
    123123    else
    124         ./configure $EXTRAFLAGS --prefix="$SAGE_LOCAL" --without-libpng --enable-unicode=ucs4
     124        ./configure $EXTRAFLAGS --prefix="$SAGE_LOCAL" --without-libpng --enable-unicode=ucs4 CC="$CC $CFLAGS" CXX="$CXX $CXXFLAGS"
    125125    fi
    126126
    127127
     
    148148
    149149patch
    150150
    151 # Do not exit script if there is an error, but instead print an
    152 # informative error message. This is helps in determining why the
    153 # configuration, compilation or installation failed. So put this before the
    154 # build() function.
    155 set +e
    156 
    157151build
    158152
    159 # This tells Bash to exit the script if any statement returns a non-true
    160 # value.
    161 set -e
    162 
    163153cd $SAGE_LOCAL/lib
    164154
    165155if [ -d python2.5/site-packages ]; then
     
    168158
    169159rm -rf python/python2.6 python/python2.5 python/python python python2.4 python2.5
    170160ln -s python2.6 python
     161if [ $? -ne 0 ]; then
     162    echo "Error creeating symbolic link"
     163    exit 1
     164fi
    171165
    172166# Sleeping for three seconds so that parallel 'make install' catches up
    173167# with the following test.