Ticket #9603: 9603-cleanup.patch

File 9603-cleanup.patch, 6.8 KB (added by drkirkby, 12 years ago)

Change the style of the tests, in the light of comments from the reviewer.

  • SPKG.txt

    # HG changeset patch
    # User David Kirkby <david.kirkby@onetel.net>
    # Date 1280277301 -3600
    # Node ID 745799a814dda62b29714fb400b7a1b2c9e1c585
    # Parent  3fe4fc14de91698a97f104182a2e84cb73d2e27f
    #9603 Clean up spkg-install and spkg-check in the light of reviewer comments.
    
    diff -r 3fe4fc14de91 -r 745799a814dd SPKG.txt
    a b  
    3636   two previous platforms this was installed on
    3737   (Solaris and Cygwin)
    3838 * Additionally force make-check to run on HP-UX
     39 * Change the format of the tests in spkg-install and
     40   spkg-check to be a little clearer.
     41 * Add a few extra comments.
    3942 
    4043=== iconv-1.13.1.p2 (John Palmieri, March 31st 2010) ===
    4144 * spkg-check: only run 'make check' on Solaris and Cygwin.
  • spkg-check

    diff -r 3fe4fc14de91 -r 745799a814dd spkg-check
    a b  
    55    exit 1
    66fi
    77
    8 # Only test iconv on Solaris, HP-UX and Cygwin
    9 if [ "x$UNAME" != xSunOS ] && [ "x$UNAME" != xCYGWIN ] && [ "x$UNAME" != xHP-UX ]; then 
    10   echo "'make check' for iconv will not be run, since iconv is"
    11   echo "only installed on HP-UX, Solaris and Cygwin - see:"
    12   echo "http://trac.sagemath.org/sage_trac/ticket/8567"
    13   exit 0
     8# Only test iconv on Solaris, HP-UX and Cygwin, at that is
     9# the only platforms on which iconv is installed. On
     10# other platforms Sage uses the system iconv.
     11
     12if [ "x$UNAME" = xSunOS ] || [ "x$UNAME" = xCYGWIN ] || [ "x$UNAME" = xHP-UX ]; then 
     13   # We must test iconv, but on Solaris some tests will always fail.
     14   if [ "x`uname`" = xSunOS ] ; then
     15      echo "If you see 3 core dumps, do not be too alarmed. See"
     16      echo "http://trac.sagemath.org/sage_trac/ticket/8270"
     17      echo "This is a Solaris bug and can be safely ignored"
     18      echo "http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6550204"
     19      echo "It will probably be fixed in later releases of Solaris 10"
     20      echo "It was fixed in build 66 of OpenSolaris."
     21   fi
     22
     23   cd src
     24
     25   make check
     26
     27   if [ $? -ne 0 ]; then
     28       echo "Error encountered while running the iconv testsuite ... exiting"
     29       exit 1
     30   fi
     31   echo "All the tests for iconv passed"
     32   exit 0
     33else
     34   echo "iconv was not be tested, as the system iconv will be used"
     35   echo "and not the iconv supplied with Sage. The iconv"
     36   echo "supplied with Sage is only used on Cygwin, HP-UX and Solaris"
     37   exit 0
    1438fi
    1539
    16 if [ "x`uname`" = xSunOS ] ; then
    17    echo "If you see 3 core dumps, do not be too alarmed. See"
    18    echo "http://trac.sagemath.org/sage_trac/ticket/8270"
    19    echo "This is a Solaris bug and can be safely ignored"
    20    echo "http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6550204"
    21    echo "It will probably be fixed in later releases of Solaris 10"
    22 fi
    23 
    24 cd src
    25 
    26 make check
    27 
    28 if [ $? -ne 0 ]; then
    29     echo "Error encountered while running the iconv testsuite ... exiting"
    30     exit 1
    31 fi
    32 
    33 echo "All the tests for iconv passed"
    34 exit 0
  • spkg-install

    diff -r 3fe4fc14de91 -r 745799a814dd spkg-install
    a b  
    66   exit 1
    77fi
    88
     9# Only build iconv on Solaris, HP-UX and Cygwin
     10# See
     11# http://trac.sagemath.org/sage_trac/ticket/8567
     12# and http://trac.sagemath.org/sage_trac/ticket/9603
    913
    10 # Only build iconv on Solaris, HP-UX and Cygwin
    11 if [ "x$UNAME" != xSunOS ] && [ "x$UNAME" != xHP-UX ] && [ "x$UNAME" != xCYGWIN ] ; then 
    12   echo "iconv will not be installed, as we only need to build it on"
    13   echo "Solaris, HP-UX and Cygwin - see:"
    14   echo "http://trac.sagemath.org/sage_trac/ticket/8567"
    15   exit 0
     14if [ "x$UNAME" = xSunOS ] || [ "x$UNAME" = xHP-UX ] || [ "x$UNAME" = xCYGWIN ] ; then 
     15   echo "iconv will be installed as the operating system is Cygwin, HP-UX or Solaris"
     16   echo "These system either lack iconv, or do not have a sufficiently capable"
     17   echo "iconv. See:"
     18   echo "http://trac.sagemath.org/sage_trac/ticket/8567"
     19   echo "http://trac.sagemath.org/sage_trac/ticket/9603"
     20
     21   echo "First removing old iconv files if they exist"
     22   # If iconv is updated, please double-check these are still necessary
     23   # and that there are no extra files added.
     24
     25   rm -f $SAGE_LOCAL/bin/iconv  $SAGE_LOCAL/lib/charset.alias
     26   rm -f $SAGE_LOCAL/lib/*libiconv*  $SAGE_LOCAL/lib/libcharset*
     27   rm -f $SAGE_LOCAL/include/iconv.h  $SAGE_LOCAL/include/libcharset.h   
     28   rm -f $SAGE_LOCAL/include/localcharset.h
     29   rm -rf  $SAGE_LOCAL/share/doc/libiconv
     30   rm -f $SAGE_LOCAL/share/man/man1/iconv* $SAGE_LOCAL/share/man/man3/iconv*
     31
     32
     33   # Let an environment variable CFLAG64 specify the option to generate 64-bit
     34   # code. If this is not set, default to -m64.
     35   if [ -z "$CFLAG64" ] ; then
     36      CFLAG64=-m64
     37   fi
     38
     39   # Add option for a 64-bit build if needed.
     40   if [ "x$SAGE64" = xyes ] ; then
     41      CFLAGS="$CFLAG64"
     42      export CFLAGS
     43   fi
     44
     45   cd src
     46   ./configure --prefix=$SAGE_LOCAL
     47   if [ $? -ne 0 ]; then
     48      echo "Error configuring iconv"
     49      exit 1
     50   fi
     51
     52   make
     53   if [ $? -ne 0 ]; then
     54      echo "Error building iconv"
     55      exit 1
     56   fi
     57
     58   make install
     59   if [ $? -ne 0 ]; then
     60      echo "Error installing iconv"
     61      exit 1
     62   fi
     63   exit 0
     64else
     65   echo "iconv will not be installed, as we only need to build it on"
     66   echo "Solaris, HP-UX and Cygwin, as the system iconv will be"
     67   echo "used on other platforms, rather than the one shipped with Sage"
     68   echo "See:"
     69   echo "http://trac.sagemath.org/sage_trac/ticket/8567"
     70   echo "http://trac.sagemath.org/sage_trac/ticket/9603"
     71   exit 0
    1672fi
    1773
    18 echo "Installing iconv as the operating system is Cygwin, HP-UX or Solaris"
    19 
    20 
    21 echo "Removing old iconv files if they exist"
    22 # If iconv is updated, please double-check these are still necessary
    23 # and that there are no extra files added.
    24 
    25 rm -f $SAGE_LOCAL/bin/iconv  $SAGE_LOCAL/lib/charset.alias
    26 rm -f $SAGE_LOCAL/lib/*libiconv*  $SAGE_LOCAL/lib/libcharset*
    27 rm -f $SAGE_LOCAL/include/iconv.h  $SAGE_LOCAL/include/libcharset.h   
    28 rm -f $SAGE_LOCAL/include/localcharset.h
    29 rm -rf  $SAGE_LOCAL/share/doc/libiconv
    30 rm -f $SAGE_LOCAL/share/man/man1/iconv* $SAGE_LOCAL/share/man/man3/iconv*
    31 
    32 
    33 # Let an environment variable CFLAG64 specify the option to generate 64-bit
    34 # code. If this is not set, default to -m64.
    35 if [ -z "$CFLAG64" ] ; then
    36    CFLAG64=-m64
    37 fi
    38 
    39 # Add option for a 64-bit build if needed.
    40 if [ "x$SAGE64" = xyes ] ; then
    41   CFLAGS="$CFLAG64"
    42   export CFLAGS
    43 fi
    44 
    45 cd src
    46 ./configure --prefix=$SAGE_LOCAL
    47 if [ $? -ne 0 ]; then
    48     echo "Error configuring iconv"
    49     exit 1
    50 fi
    51 
    52 make
    53 if [ $? -ne 0 ]; then
    54     echo "Error making iconv"
    55     exit 1
    56 fi
    57 
    58 make install
    59 
    60 if [ $? -ne 0 ]; then
    61     echo "Error installing iconv"
    62     exit 1
    63 fi
    64