Ticket #13515: 13515_debian_gcc.patch

File 13515_debian_gcc.patch, 2.3 KB (added by jdemeyer, 10 years ago)
  • spkg/bin/sage-env

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1348234812 -28800
    # Node ID ee89af7ca6acad4c8db730740b0332be891b90cb
    # Parent  771585d08af4358e6386744bdd892b55ca28678b
    Support Debian multi-arch systems
    
    diff --git a/spkg/bin/sage-env b/spkg/bin/sage-env
    a b  
    254254[ -z "$CPATH" ] || CPATH="${CPATH}:"
    255255export CPATH="${CPATH}$SAGE_LOCAL/include"
    256256
     257# Add Debian multi-arch directories if applicable.
     258# See http://wiki.debian.org/Multiarch
     259MULTI_ARCH=`dpkg-architecture -qDEB_BUILD_MULTIARCH 2>/dev/null`
     260if [ -n "$MULTI_ARCH" ]; then
     261    LIBRARY_PATH="${LIBRARY_PATH}:/usr/lib/$MULTI_ARCH"
     262    CPATH="${CPATH}:/usr/include/$MULTI_ARCH"
     263fi
     264
    257265# For PARI/GP
    258266GP_DATA_DIR="$SAGE_LOCAL/share/pari" && export GP_DATA_DIR
    259267GPHELP="$SAGE_LOCAL/bin/gphelp" && export GPHELP
  • spkg/install

    diff --git a/spkg/install b/spkg/install
    a b  
    179179                # known to give trouble within Sage:
    180180                # * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48702
    181181                # * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48774
    182                 #
    183                 # Detect a Debian multi-arch install.  In this case, some
    184                 # include files will be in /usr/include/x86_64-linux-gnu for
    185                 # example.  We detect whether GCC searches for include files
    186                 # in /usr/include/*.  If so, we don't install GCC.
    187                 if $CC -x c /dev/null -E -v -o /dev/null 2>&1 |grep '^ */usr/include/.' >/dev/null; then
    188                     echo >&2 "Not installing GCC as your system $CC is looking for include files"
    189                     echo >&2 "in unusual directories."
    190                 else
    191                     echo >&2 "Installing GCC because you have $CC version $GCCVERSION."
    192                     echo >&2 "gcc-4.6.0 and gcc-4.6.1 have known bugs affecting Sage."
    193                     need_to_install_gcc=yes
    194                 fi;;
     182                echo >&2 "Installing GCC because you have $CC version $GCCVERSION."
     183                echo >&2 "gcc-4.6.0 and gcc-4.6.1 have known bugs affecting Sage."
     184                need_to_install_gcc=yes;;
    195185            4.7.0)
    196186                # GCC 4.7.0 is very broken on ia64, see
    197187                # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496