Ticket #13954: gap-4.5.7.p3.diff

File gap-4.5.7.p3.diff, 6.5 KB (added by jpflori, 9 years ago)

Spkg diff, for review only.

  • SPKG.txt

    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    3333== Dependencies ==
    3434
    3535 * Readline
     36 * MPIR
    3637
    3738== Special Update/Build Instructions ==
    3839
     
    5152
    5253== Changelog ==
    5354
     55=== gap-4.5.7.p3 (Jean-Pierre Flori, 26 January 2013) ===
     56 * #13954: Let gap build on top of a shared version of MPIR.
     57 * Cleanup old Cygwin fixes now unnecessary.
     58
    5459=== gap-4.5.7.p2 (Jeroen Demeyer, 17 January 2013) ===
    5560 * #13963: do not touch gap_stamp (which isn't used anyway).
    5661 * Use -O2 -g as default CFLAGS and never override user-set flags.
  • new file patches/configure.patch

    diff --git a/patches/configure.patch b/patches/configure.patch
    new file mode 100644
    - +  
     1--- src.orig/configure  2012-12-14 18:45:34.000000000 +0100
     2+++ src/configure       2013-01-15 16:09:19.962069400 +0100
     3@@ -4125,11 +4125,22 @@
     4   *)
     5     # user specified directory
     6     GMP_HOME="$with_gmp"
     7-       if test -d ${GMP_HOME}/include && test -f ${GMP_HOME}/lib/libgmp.a ; then
     8+    if test -d ${GMP_HOME}/include ;
     9+    then
     10       GMP_CFLAGS="-I${GMP_HOME}/include"
     11-      GMP_LIBS="${GMP_HOME}/lib/libgmp.a"
     12+      if test -f ${GMP_HOME}/lib/libgmp.a ; then
     13+        GMP_LIBS="${GMP_HOME}/lib/libgmp.a"
     14+      elif test -f ${GMP_HOME}/lib/libgmp.so; then
     15+        GMP_LIBS="${GMP_HOME}/lib/libgmp.so"
     16+      elif test -f ${GMP_HOME}/lib/libgmp.dll.a; then
     17+        GMP_LIBS="${GMP_HOME}/lib/libgmp.dll.a"
     18+      elif test -f ${GMP_HOME}/lib/libgmp.dylib; then
     19+        GMP_LIBS="${GMP_HOME}/lib/libgmp.dylib"
     20+      else
     21+        as_fn_error $? "Could not locate GMP library in the specified location" "$LINENO" 5
     22+      fi;
     23     else
     24-      as_fn_error $? "Could not locate GMP in the specified location" "$LINENO" 5
     25+      as_fn_error $? "Could not locate GMP header in the specified location" "$LINENO" 5
     26     fi;
     27     MAKE_GMP=""
     28     ;;
  • deleted file patches/gap_cygwin

    diff --git a/patches/gap_cygwin b/patches/gap_cygwin
    deleted file mode 100755
    + -  
    1 #!/bin/sh
    2 #############################################################################
    3 ##
    4 ##  gap.sh                      GAP                          Martin Schoenert
    5 ##
    6 ##  This is a shell script for the  UNIX  operating system  that starts  GAP.
    7 ##  This is the place  where  you  make  all  the  necessary  customizations.
    8 ##  Then copy this file to a  directory in your  search path,  e.g., '~/bin'.
    9 ##  If you later move GAP to another location you must only change this file.
    10 ##
    11 
    12 if [ $SAGE_ROOT"" = "" ]; then
    13     echo "Set the environment variable SAGE_ROOT."
    14     exit 1
    15 fi
    16 
    17 #############################################################################
    18 ##
    19 ##  GAP_DIR . . . . . . . . . . . . . . . . . . . . directory where GAP lives
    20 ##
    21 ##  Set 'GAP_DIR' to the name of the directory where you have installed  GAP,
    22 ##  i.e., the directory with the subdirectories  'lib',  'grp',  'doc',  etc.
    23 ##  The default is '/home/was/tmp/sage-0.8.0-2005-10-22/local/lib/gap-sage-4.4.6', which is where you installed GAP.
    24 ##  You won't have to change this unless you move the installation.
    25 ##
    26 if [ "x$GAP_DIR" = "x" ];  then
    27     GAP_DIR="$SAGE_ROOT/local/lib/gap-4.5.5"
    28 fi
    29 
    30 
    31 #############################################################################
    32 ##
    33 ##  GAP_MEM . . . . . . . . . . . . . . . . . . . amount of initial workspace
    34 ##
    35 ##  Set 'GAP_MEM' to the amount of memory GAP shall use as initial workspace.
    36 ##  The default is 12 MByte, which is the minimal reasonable amount of memory.
    37 ##  You have to change it if you want  GAP to use a larger initial workspace.
    38 ##  If you are not going to run  GAP  in parallel with other programs you may
    39 ##  want to set this value close to the  amount of memory your  computer has.
    40 ##
    41 if [ "x$GAP_MEM" = "x" ];  then
    42 GAP_MEM=24m
    43 fi
    44 
    45 
    46 #############################################################################
    47 ##
    48 ##  GAP_PRG . . . . . . . . . . . . . . . . .  name of the executable program
    49 ##
    50 ##  Set 'GAP_PRG' to the  name of the executable  program of the  GAP kernel.
    51 ##  The  default is  '`hostname'/gap'.    You  can   either change this    to
    52 ##  '<target>/gap' where <target> is the  target you have selected during the
    53 ##  compilation or create  a symbolic link  from <target> to  '`hostname`' in
    54 ##  the 'bin' directory.
    55 ##
    56 if [ "x$GAP_PRG" = "x" ];  then
    57 GAP_PRG=i686-pc-cygwin-gcc/gap
    58 fi
    59 
    60 
    61 #############################################################################
    62 ##
    63 ##  GAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . run GAP
    64 ##
    65 ##  You  probably should  not change  this line,  which  finally starts  GAP.
    66 ##
    67 exec "$GAP_DIR/bin/"$GAP_PRG -m $GAP_MEM -l "$GAP_DIR" $*
  • spkg-install

    diff --git a/spkg-install b/spkg-install
    a b  
    2929    CFLAGS="$CFLAGS $CFLAG64"
    3030    CXXFLAGS="$CXXFLAGS $CFLAG64"
    3131    echo "Building a 64-bit version of GAP (with '$CFLAG64')."
    32 fi 
     32fi
    3333
    3434# Workaround for MPIR missing macro issue
    3535export CPPFLAGS="$CPPFLAGS -D__GMP_MP_RELEASE=50002"
     
    6767    exit 1
    6868fi
    6969
    70 # On Cygwin installations the GAP build creates a file 'gap.exe',
    71 # and then tries to strip the file 'gap'.
    72 # This broke the build on old Cygwin installations.
    73 # On newer Cygwins, 'gap' is automatically "translated" to 'gap.exe'.
    74 if [[ "$UNAME" = CYGWIN ]]; then
    75     echo "Creating a dummy 'gap.exe' in 'bin/i686-pc-cygwin-gcc'..."
    76     cd "$SPKG_ROOT/src"
    77     mkdir -p bin/i686-pc-cygwin-gcc &&
    78     cd bin/i686-pc-cygwin-gcc &&
    79     touch gap.exe
    80     if [[ $? -ne 0 ]]; then
    81         # Something really went wrong.
    82         echo >&2 "Error creating a dummy gap.exe file."
    83         exit 1
    84     fi
    85     # Check if 'gap' is automatically "translated" to 'gap.exe'.
    86     # If not, create a symbolic link from 'gap' to 'gap.exe'.
    87     if [[ ! -f gap ]]; then
    88         echo "Creating a symbolic link from 'gap' to 'gap.exe'..."
    89         ln -s gap.exe gap
    90         if [[ $? -ne 0 ]]; then
    91             # Something really went wrong.
    92             echo >&2 "Error creating the symbolic link."
    93             exit 1
    94         fi
    95     fi
    96 fi
    97 
    9870echo "Building GAP..."
    9971cd "$SPKG_ROOT/src"
    10072$MAKE -j1
     
    12597echo "Copying GAP startup script..."
    12698rm -f "$SAGE_LOCAL/bin/gap"
    12799cd "$SPKG_ROOT"
    128 if [[ "$UNAME" = CYGWIN ]]; then
    129     cp patches/gap_cygwin "$SAGE_LOCAL/bin/gap"
    130 else
    131     cp src/bin/gap.sh "$SAGE_LOCAL/bin/gap"
    132 fi
     100cp src/bin/gap.sh "$SAGE_LOCAL/bin/gap"
    133101if [[ $? -ne 0 ]]; then
    134102    echo >&2 "Error copying customized GAP startup script."
    135103    exit 1
     
    149117        exit 1
    150118    fi
    151119fi
    152