Ticket #9603: 9306-more-cleanup.patch

File 9306-more-cleanup.patch, 7.9 KB (added by drkirkby, 12 years ago)

Correct unquoted "$SAGE_LOCAL" and a bit of a cosmetic cleanup.

  • SPKG.txt

    # HG changeset patch
    # User David Kirkby <david.kirkby@onetel.net>
    # Date 1281469679 -3600
    # Node ID c91f30ba571d12cf29edae1c4de37eb8be3d7bbc
    # Parent  745799a814dda62b29714fb400b7a1b2c9e1c585
    #9603 Address more reviewer comments. Mainly cosmetic, but also fix the fact $SAGE_LOCAL was not quoted.
    
    diff -r 745799a814dd -r c91f30ba571d SPKG.txt
    a b  
    1 == iconv ==
     1= iconv =
    22
    3 == Description ==
    4 GNU libiconv is a library that is used to enable different
    5 languages, with different characters to be handled properly.
    6 
    7 For more details see http://www.gnu.org/software/libiconv/
     3== Description ==
     4GNU libiconv is a library that is used to enable different
     5languages, with different characters to be handled properly.
    86
    97== License ==
    10 GPL 3 and LGPL 3. So we can link against the library ok.
     8 * GPL 3 and LGPL 3. So we can link against the library in Sage
    119
    1210== SPKG Maintainers ==
    1311 * David Kirkby
    1412
     13== Upstream Contact ==
     14 * http://www.gnu.org/software/libiconv/
     15 * Bug reports to bug-gnu-libiconv@gnu.org
     16
    1517== Dependencies ==
    16 
    17  * None for the purposes of Sage, but in general gettext.
     18 * None for the purposes of Sage, but in general gettext.
    1819
    1920== Special Update/Build Instructions ==
     21 * None
    2022 
    21   * spkg-install removes ALL files installed by iconv - man pages,
    22     docs, etc etc. If iconv gets updated, check these still
    23     remove all traces of iconv.
    24 
    25     The sizes of the docs and man pages is small, so they are not
    26     work removing from the package, as they potentially risk
    27     breaking the install.
    28 
    2923== Changelog ==
    3024 
    31 === iconv-1.13.1.p3 (David Kirkby, July 26th 2010) ===
    32  * Do not assume bash is in /bin, as it is not on HP-UX
    33    Instead use #!/usr/bin/env bash as suggested in the
    34    Sage deveopers guide.
    35  * Force install of iconv on HP-UX in addition to the
    36    two previous platforms this was installed on
    37    (Solaris and Cygwin)
    38  * 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.
     25=== iconv-1.13.1.p3 (David Kirkby, August 10th, 2010) ===
     26 * No longer assume bash is in /bin, as it is not on HP-UX or AIX.
     27   Instead use "#!/usr/bin/env bash", as suggested in the
     28   Sage Developers Guide.
     29 * Install iconv on HP-UX in addition to the two platforms iconv was
     30   previously installed on (Solaris and Cygwin).
     31 * Additionally force make-check to execute on HP-UX.
     32 * Change the format of the tests in spkg-install and
     33   spkg-check to be a little clearer.
     34 * Add a few extra comments.
     35 * Removed code to remove old files, to avoid causing any confusion.
     36 * Quoted "$SAGE_LOCAL" where this had been omitted before
     37 * Removed trailing white space on lines.
     38 * Removed a surplus ; in both spkg-check and spkg-install.
     39 * Added the "Upstream Contact" section to SPKG.txt
     40 * Changed the "Special Update/Build Instructions" to be "none",
     41   as what was written before was confusing.
    4242 
    4343=== iconv-1.13.1.p2 (John Palmieri, March 31st 2010) ===
    4444 * spkg-check: only run 'make check' on Solaris and Cygwin.
     
    5252 * #8567 Ensure iconv only builds on Solaris and Cygwin as
    5353   having two copies of iconv causes problems on some Linux systems.
    5454   
    55    
    5655=== iconv-1.13.1 (David Kirkby, February 13th 2010) ===
    5756 * #8191 First release of libiconv, needed for R on Solaris
    5857   and probably for Cygwin too (see #7319)
    5958
    60 
    61 
    62 
  • spkg-check

    diff -r 745799a814dd -r c91f30ba571d spkg-check
    a b  
    11#!/usr/bin/env bash
    22
    33if [ -z "$SAGE_LOCAL" ]; then
    4     echo "SAGE_LOCAL undefined ... exiting";
     4    echo "SAGE_LOCAL undefined ... exiting"
    55    exit 1
    66fi
    77
    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.
     8# Only test iconv on Solaris, HP-UX and Cygwin, as those are the only
     9# platforms on which iconv is installed. On other platforms Sage uses
     10# the system iconv.
    1111
    12 if [ "x$UNAME" = xSunOS ] || [ "x$UNAME" = xCYGWIN ] || [ "x$UNAME" = xHP-UX ]; then 
    13    # We must test iconv, but on Solaris some tests will always fail. 
     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.
    1414   if [ "x`uname`" = xSunOS ] ; then
    1515      echo "If you see 3 core dumps, do not be too alarmed. See"
    1616      echo "http://trac.sagemath.org/sage_trac/ticket/8270"
    1717      echo "This is a Solaris bug and can be safely ignored"
    1818      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 
     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
    2222
    2323   cd src
    2424
    2525   make check
    2626
    2727   if [ $? -ne 0 ]; then
    28        echo "Error encountered while running the iconv testsuite ... exiting"
     28       echo "Error encountered while running the iconv test-suite ... exiting"
    2929       exit 1
    3030   fi
    3131   echo "All the tests for iconv passed"
    32    exit 0 
     32   exit 0
    3333else
    3434   echo "iconv was not be tested, as the system iconv will be used"
    35    echo "and not the iconv supplied with Sage. The iconv" 
     35   echo "and not the iconv supplied with Sage. The iconv"
    3636   echo "supplied with Sage is only used on Cygwin, HP-UX and Solaris"
    3737   exit 0
    3838fi
  • spkg-install

    diff -r 745799a814dd -r c91f30ba571d spkg-install
    a b  
    11#!/usr/bin/env bash
    22
    3 if [ -z "$SAGE_LOCAL" ] ; then
    4    echo "SAGE_LOCAL undefined ... exiting";
     3if [ -z "$SAGE_LOCAL" ]; then
     4   echo "SAGE_LOCAL undefined ... exiting"
    55   echo "Maybe run 'sage -sh'?"
    66   exit 1
    77fi
    88
    99# Only build iconv on Solaris, HP-UX and Cygwin
    10 # See 
     10# See
    1111# http://trac.sagemath.org/sage_trac/ticket/8567
    1212# and http://trac.sagemath.org/sage_trac/ticket/9603
    1313
    14 if [ "x$UNAME" = xSunOS ] || [ "x$UNAME" = xHP-UX ] || [ "x$UNAME" = xCYGWIN ] ; then 
     14if [ "x$UNAME" = xSunOS ] || [ "x$UNAME" = xHP-UX ] || [ "x$UNAME" = xCYGWIN ]; then
    1515   echo "iconv will be installed as the operating system is Cygwin, HP-UX or Solaris"
    1616   echo "These system either lack iconv, or do not have a sufficiently capable"
    1717   echo "iconv. See:"
    1818   echo "http://trac.sagemath.org/sage_trac/ticket/8567"
    1919   echo "http://trac.sagemath.org/sage_trac/ticket/9603"
    2020
    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 
    3321   # Let an environment variable CFLAG64 specify the option to generate 64-bit
    3422   # code. If this is not set, default to -m64.
    35    if [ -z "$CFLAG64" ] ; then
     23   if [ -z "$CFLAG64" ]; then
    3624      CFLAG64=-m64
    3725   fi
    3826
    39    # Add option for a 64-bit build if needed.
    40    if [ "x$SAGE64" = xyes ] ; then
    41       CFLAGS="$CFLAG64"
     27   # If the environment variable SAGE64="yes", then build a 64-bit version.
     28   if [ "x$SAGE64" = xyes ]; then
     29      CFLAGS="$CFLAGS $CFLAG64"
    4230      export CFLAGS
     31      echo "Building a 64-bit version of iconv"
    4332   fi
    4433
    4534   cd src
    46    ./configure --prefix=$SAGE_LOCAL
     35   ./configure --prefix="$SAGE_LOCAL"
    4736   if [ $? -ne 0 ]; then
    4837      echo "Error configuring iconv"
    4938      exit 1
    5039   fi
    5140
    52    make 
     41   make
    5342   if [ $? -ne 0 ]; then
    5443      echo "Error building iconv"
    5544      exit 1