Ticket #13963: gap-4.5.7.p2.diff

File gap-4.5.7.p2.diff, 4.1 KB (added by jdemeyer, 9 years ago)
  • .hgignore

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1358438172 -3600
    # Node ID 34743416451a0abf91ebab31fb5f79c8b1b3fe77
    # Parent  edcabb521fbd26439352acd96a95afee4d8b255b
    Trac #13963: do not touch gap_stamp
    Use -O2 -g as default CFLAGS and never override user-set flags.
    Remove unsetting of CC and CXX which doesn't seem to be needed anymore.
    Use autoconf tracing to determine the GAP version number.
    
    diff --git a/.hgignore b/.hgignore
    a b  
    11src
     2gap-version
  • SPKG.txt

    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    4949   Since the (pre-)built HTML documentation is currently included, I've
    5050   commented out some lines in that part of `spkg-install`. -leif
    5151
    52  * Upon upgrading, check whether the build still fails when `CC` or `CXX`
    53    contain spaces (or multiple words, as e.g. with `CC="ccache gcc"`).
    54    Otherwise unsetting `CC` and `CXX` can be removed, which is an odd work-
    55    around anyway.
     52== Changelog ==
    5653
    57 == Changelog ==
     54=== gap-4.5.7.p2 (Jeroen Demeyer, 17 January 2013) ===
     55 * #13963: do not touch gap_stamp (which isn't used anyway).
     56 * Use -O2 -g as default CFLAGS and never override user-set flags.
     57 * Remove unsetting of CC and CXX which doesn't seem to be needed
     58   anymore.
     59 * Use autoconf tracing to determine the GAP version number.
    5860
    5961=== gap-4.5.7.p1 (Volker Braun, 20 December 2012) ===
    6062 * #13211: Fix gap/latest symlink creation.
  • spkg-install

    diff --git a/spkg-install b/spkg-install
    a b  
    1212    exit 1
    1313fi
    1414
    15 # Only unset CC and CXX if they contain spaces, which is what (is said to)
    16 # currently would break the build:
    17 # (Note that CC and CXX are always defined, since sage-env provides
    18 # defaults in case they're not.)
    19 if [[ "`echo $CC | wc -w`" -ne 1 ]]; then
    20     echo >&2 "WARNING: \$CC (=$CC) contains multiple words,"
    21     echo >&2 "  which currently breaks GAP's build scripts."
    22     echo >&2 "  To work around this, we therefore unset it!"
    23     echo >&2 "  (This may lead to other errors of course.)"
    24     unset CC
    25 fi
    26 if [[ "`echo $CXX | wc -w`" -ne 1 ]]; then
    27     echo >&2 "WARNING: \$CXX (=$CXX) contains multiple words,"
    28     echo >&2 "  which currently breaks GAP's build scripts."
    29     echo >&2 "  To work around this, we therefore unset it!"
    30     echo >&2 "  (This may lead to other errors of course.)"
    31     unset CXX
    32 fi
    33 
    34 # be sure to update this to the
    35 VERSION=`grep AC_INIT $SPKG_ROOT/src/cnf/configure.in | cut -d '[' -f 3 | cut -d ']' -f 1`
     15# Read gap-version, which was written by spkg-src
     16VERSION=`cat gap-version`
    3617GAP_DIR="gap-$VERSION"
    3718INSTALL_DIR="$SAGE_LOCAL/gap/$GAP_DIR"
    3819
     
    5031    echo "Building a 64-bit version of GAP (with '$CFLAG64')."
    5132fi
    5233
    53 # Indicate that GAP has somehow been updated, which invalidates all workspaces:
    54 touch "$SAGE_LOCAL/bin/gap_stamp"
     34# Workaround for MPIR missing macro issue
     35export CPPFLAGS="$CPPFLAGS -D__GMP_MP_RELEASE=50002"
    5536
    56 # workaround for MPIR missing macro issue
    57 CFLAGS="$CFLAGS -D__GMP_MP_RELEASE=50002"
    58 
    59 # enable debug info if possible
     37# Enable debug info if requested.
    6038# Note that -g3 allows you to use preprocessor macros in gdb which are widely used
    61 if [ "$SAGE_DEBUG" == "yes" ] ; then
    62     export CFLAGS="$CFLAGS -O0 -g3 -DDEBUG_MASTERPOINTERS -DDEBUG_GLOBAL_BAGS -DDEBUG_FUNCTIONS_BAGS"
     39if [ "$SAGE_DEBUG" = yes ] ; then
     40    export CFLAGS="-O0 -g3 -DDEBUG_MASTERPOINTERS -DDEBUG_GLOBAL_BAGS -DDEBUG_FUNCTIONS_BAGS $CFLAGS"
     41else
     42    # Default flags
     43    export CFLAGS="-O2 -g $CFLAGS"
    6344fi
    6445
    6546# Apply fixes to upstream source
     
    139120echo "Creating symlink to new GAP installation..."
    140121cd "$SAGE_LOCAL/gap"
    141122rm -f latest
    142 ln -sf "$GAP_DIR" latest
     123ln -s "$GAP_DIR" latest
    143124
    144125echo "Copying GAP startup script..."
    145126rm -f "$SAGE_LOCAL/bin/gap"
  • spkg-src

    diff --git a/spkg-src b/spkg-src
    a b  
    11#!/usr/bin/env bash
    22
     3SPKG_ROOT=`pwd`
     4
    35set -e
    46shopt -s extglob
    57
     
    4143rm -r bin/*
    4244cd extern
    4345rm -r !(Makefile.in)
     46
     47# Write version to gap-version
     48cd "$SPKG_ROOT"
     49autoconf --trace='AC_INIT:$2' src/cnf/configure.in >gap-version
     50rm -rf autom4te.cache