Ticket #9603: trac_9603-iconv_spkg-first_reviewer.patch

File trac_9603-iconv_spkg-first_reviewer.patch, 10.6 KB (added by leif, 12 years ago)

SPKG patch. Apply on top of other patches. (Consistently use "$UNAME"; clean-up.)

  • SPKG.txt

    # HG changeset patch
    # User Leif Leonhardy <not.really@online.de>
    # Date 1283961538 -7200
    # Node ID e5178b991bd2e50da3f184874fe74f9958b128a6
    # Parent  ceb9cde565c1a8b9458add511e1411dd8084c282
    #9603: Consistently use "$UNAME"; more comments, corrections & cosmetic changes.
    
    diff -r ceb9cde565c1 -r e5178b991bd2 SPKG.txt
    a b  
    55languages, with different characters to be handled properly.
    66
    77== License ==
    8  * GPL 3 and LGPL 3. So we can link against the library in Sage
     8 * GPL 3 and LGPL 3. So we can safely link against the library in Sage.
    99
    1010== SPKG Maintainers ==
    1111 * David Kirkby
     
    1919
    2020== Special Update/Build Instructions ==
    2121 * None, other than anyone updating this package should be familiar with how
    22    to write shell scripts. 
    23  
     22   to write shell scripts.
     23
    2424== Changelog ==
    25  
     25
    2626=== iconv-1.13.1.p3 (David Kirkby, August 10th, 2010) ===
    27  * Use '$MAKE' instead of 'make' in spkg-install and spkg-check
    28    to enable parallel builds.
    29  * used CC="$CC $CFLAG64" instead of adding $CLFAG64 to
    30    CFLAGS. The former cause problems on Solaris 10 x86
    31    and an early version of OpenSolaris on x86. It was never
    32    a problem on a recent OpenSolaris or Solaris 10 on SPARC.
    33  * Change the format of the tests in spkg-install and
    34    spkg-check to be a little clearer. See #9718 for a discussion of this.
    35  * Add a few extra comments.
    36  * Removed code to remove old files, to avoid causing any confusion. 
    37  * Quoted "$SAGE_LOCAL" where this had been omitted before
     27 * Use '$MAKE' instead of 'make' in spkg-install and spkg-check to enable
     28   parallel builds, and allow the user to specify a different 'make' program.
     29 * Use CC="$CC $CFLAG64" instead of adding $CFLAG64 to CFLAGS. The latter
     30   caused problems on Solaris 10 x86 and an early version of OpenSolaris
     31   on x86. It was never a problem on recent versions of OpenSolaris, or
     32   Solaris 10 on SPARC. See #9718 for a discussion of this.
     33 * Changed the format of the tests in spkg-install and spkg-check to be a
     34   little clearer.
     35 * Added a few extra comments.
     36 * Removed code to remove old files, to avoid causing any confusion.
     37 * Quoted "$SAGE_LOCAL" where this had been omitted before.
    3838 * Removed trailing white space on lines.
    3939 * Removed a surplus ; in both spkg-check and spkg-install.
    40  * Added the "Upstream Contact" section to SPKG.txt
    41  * Changed the "Special Update/Build Instructions" to be "none", 
    42    as what was written before was confusing. 
     40 * Added the "Upstream Contact" section to SPKG.txt.
     41 * Changed the "Special Update/Build Instructions" to be "none",
     42   as what was written before was confusing.
    4343 * Install iconv on HP-UX in addition to the two platforms iconv was
    44    previously installed on (Solaris and Cygwin). 
    45  * Additionally force make-check to execute on HP-UX.
     44   previously installed on (Solaris and Cygwin).
     45 * Additionally force 'make check' to execute on HP-UX, too.
    4646 * No longer assume bash is in /bin, as it is not on HP-UX or AIX.
    47    Instead use "#!/usr/bin/env bash", as suggested in the
    48    Sage Developers Guide.
    49  
     47   Instead use "#!/usr/bin/env bash", as suggested in the Sage
     48   Developers Guide.
     49 * Consistently use "$UNAME" (which is set by 'sage-env') rather than
     50   `uname`. (Reviewer change. Also further cosmetic changes.)
     51 * All patches/changes made at #9603.
     52
    5053=== iconv-1.13.1.p2 (John Palmieri, March 31st 2010) ===
    5154 * spkg-check: only run 'make check' on Solaris and Cygwin.
    5255
    5356=== iconv-1.13.1.p1 (William Stein, March 31st 2010) ===
    5457 * Really ensure iconv spkg only does something on Solaris and Cygwin.
    5558   In particular, don't delete old versions thus breaking everybody's
    56    upgrades. 
     59   upgrades.
    5760
    5861=== iconv-1.13.1.p0 (David Kirkby, March 21st 2010) ===
    5962 * #8567 Ensure iconv only builds on Solaris and Cygwin as
    6063   having two copies of iconv causes problems on some Linux systems.
    61    
     64
    6265=== iconv-1.13.1 (David Kirkby, February 13th 2010) ===
    6366 * #8191 First release of libiconv, needed for R on Solaris
    64    and probably for Cygwin too (see #7319) 
     67   and probably for Cygwin too (see #7319)
    6568
  • spkg-check

    diff -r ceb9cde565c1 -r e5178b991bd2 spkg-check
    a b  
    66fi
    77
    88# 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.
     9# platforms on which the iconv shipped with Sage will be installed. On
     10# other platforms Sage uses the system's iconv.
    1111
    1212if [ "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
     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."
     16        echo "This is a known Solaris bug and can safely be ignored."
     17        echo "See http://trac.sagemath.org/sage_trac/ticket/8270"
     18        echo "It will probably be fixed in later releases of Solaris 10,"
     19        echo "and was fixed in build 66 of OpenSolaris:"
     20        echo "http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6550204"
     21    fi
    2222
    23    cd src
     23    cd src
    2424
    25    $MAKE check
     25    $MAKE check
    2626
    27    if [ $? -ne 0 ]; then
    28        echo "Error encountered while running the iconv test-suite ... exiting"
    29        exit 1
    30    fi
    31    echo "All the tests for iconv passed"
    32    exit 0
     27    if [ $? -ne 0 ]; then
     28        echo "Error encountered while running the iconv test suite ... exiting"
     29        exit 1
     30    fi
     31    echo "All the tests for iconv passed."
     32    exit 0
    3333else
    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
     34    echo "iconv was not to be tested, since Sage will use the system's iconv"
     35    echo "and not the one shipped with Sage."
     36    echo "The iconv supplied by Sage is only used on Cygwin, HP-UX and Solaris."
     37    exit 0
    3838fi
    3939
     40# NOT REACHED
     41
  • spkg-install

    diff -r ceb9cde565c1 -r e5178b991bd2 spkg-install
    a b  
    11#!/usr/bin/env bash
    22
    33if [ -z "$SAGE_LOCAL" ]; then
    4    echo "SAGE_LOCAL undefined ... exiting"
    5    echo "Maybe run 'sage -sh'?"
    6    exit 1
     4    echo "SAGE_LOCAL undefined ... exiting"
     5    echo "Maybe run 'sage -sh'?"
     6    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
     9# Only build iconv on Solaris, HP-UX and Cygwin. See
     10#     http://trac.sagemath.org/sage_trac/ticket/8567 and
     11#     http://trac.sagemath.org/sage_trac/ticket/9603
     12# for details.
    1313
    14 if [ "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"
     14if [ "x$UNAME" = xSunOS ] || [ "x$UNAME" = xHP-UX ] || [ "x$UNAME" = xCYGWIN ];
     15then
     16    echo "iconv will be installed as the operating system is Cygwin, HP-UX or Solaris."
     17    echo "These systems either lack iconv, or do not have a sufficiently capable"
     18    echo "version of iconv. See:"
     19    echo "    http://trac.sagemath.org/sage_trac/ticket/8567"
     20    echo "    http://trac.sagemath.org/sage_trac/ticket/9603"
    2021
    21    # Let an environment variable CFLAG64 specify the option to generate 64-bit
    22    # code. If this is not set, default to -m64.
    23    if [ -z "$CFLAG64" ]; then
    24       CFLAG64=-m64
    25    fi
     22    # Let an environment variable CFLAG64 specify the option to generate 64-bit
     23    # code. If this is not set, default to -m64:
     24    if [ -z "$CFLAG64" ]; then
     25        CFLAG64=-m64
     26    fi
    2627
    27    # If the environment variable SAGE64="yes", then build a 64-bit version.
    28    if [ "x$SAGE64" = xyes ]; then
    29       CC="$CC $CFLAG64"
    30       export CC
    31       echo "Building a 64-bit version of iconv"
    32    fi
     28    # If the environment variable SAGE64=yes, force building a 64-bit version:
     29    if [ "x$SAGE64" = xyes ]; then
     30        echo "Building a 64-bit version of iconv"
     31        # Put the flag(s) for building a 64-bit version into the C compiler
     32        # command rather than into CFLAGS, since (the included version of)
     33        # libtool would strip it off s.t. the build would otherwise fail.
     34        # See http://trac.sagemath.org/sage_trac/ticket/9718 for details.
     35        CC="$CC $CFLAG64"
     36        export CC
     37    fi
    3338
    34    cd src
    35    ./configure --prefix="$SAGE_LOCAL"
    36    if [ $? -ne 0 ]; then
    37       echo "Error configuring iconv"
    38       exit 1
    39    fi
     39    cd src
    4040
    41    $MAKE
    42    if [ $? -ne 0 ]; then
    43       echo "Error building iconv"
    44       exit 1
    45    fi
     41    ./configure --prefix="$SAGE_LOCAL"
     42    if [ $? -ne 0 ]; then
     43        echo "Error configuring iconv"
     44        exit 1
     45    fi
    4646
    47    $MAKE install
    48    if [ $? -ne 0 ]; then
    49       echo "Error installing iconv"
    50       exit 1
    51    fi
    52    exit 0
     47    $MAKE
     48    if [ $? -ne 0 ]; then
     49        echo "Error building iconv"
     50        exit 1
     51    fi
     52
     53    $MAKE install
     54    if [ $? -ne 0 ]; then
     55        echo "Error installing iconv"
     56        exit 1
     57    fi
     58    exit 0
    5359else
    54    echo "iconv will not be installed, as we only need to build it on"
    55    echo "Solaris, HP-UX and Cygwin, as the system iconv will be"
    56    echo "used on other platforms, rather than the one shipped with Sage"
    57    echo "See:"
    58    echo "http://trac.sagemath.org/sage_trac/ticket/8567"
    59    echo "http://trac.sagemath.org/sage_trac/ticket/9603"
    60    exit 0
     60    echo "iconv will not be installed, as we only need to build it on"
     61    echo "Solaris, HP-UX and Cygwin, as the system's iconv will be used"
     62    echo "on other platforms, rather than the one shipped with Sage."
     63    echo "See:"
     64    echo "    http://trac.sagemath.org/sage_trac/ticket/8567"
     65    echo "    http://trac.sagemath.org/sage_trac/ticket/9603"
     66    exit 0
    6167fi
    6268
     69# NOT REACHED
     70