Ticket #14447: trac_14447-case-v2.patch

File trac_14447-case-v2.patch, 5.8 KB (added by jdemeyer, 8 years ago)
  • spkg/base/prereq-1.2-install

    # HG changeset patch
    # User Jean-Pierre Flori <jean-pierre.flor@ssi.gouv.fr>
    # Date 1365758372 -7200
    # Node ID 9bc6d07aee14324d6fe76c0e012da792aaf3b6bc
    # Parent  a3a0401ce60c860027941434467e621d5f979bc5
    #14447: Add Cygwin as a supported platform
    
    diff --git a/spkg/base/prereq-1.2-install b/spkg/base/prereq-1.2-install
    a b  
    2424echo ""
    2525
    2626if [ "x$SAGE_PORT" = x ]; then
    27     if [ "$UNAME" = "SunOS" ]; then
    28        if [ "$RELEASE" = "5.9" ] || [ "$RELEASE" = "5.8" ] || [ "$RELEASE" = "5.7" ] || [ "$RELEASE" = "5.6" ] ; then
    29           echo "Sage is not supported on any version of Solaris earlier than 10."
    30           echo "Sage has been tested on the first release of Solaris 10"
    31           echo "(03/2005) and works on that. Sage may or may not work with"
    32           echo "your version of Solaris."
    33           echo ""
    34           echo "More information can be found about Sage on Solaris"
    35           echo "on the Wiki at http://wiki.sagemath.org/solaris"
    36           echo ""
    37           fail=yes
    38        fi
    39     elif [ "$UNAME" = "HP-UX" ]; then
     27    case "${UNAME}-${RELEASE}" in
     28    # Unsupported platforms.
     29    SunOS-5.[0-9])
     30        echo "Sage is not supported on any version of Solaris earlier than 10."
     31        echo "Sage has been tested on the first release of Solaris 10"
     32        echo "(03/2005) and works on that. Sage may or may not work with"
     33        echo "your version of Solaris."
     34        echo ""
     35        echo "More information can be found about Sage on Solaris"
     36        echo "on the Wiki at http://wiki.sagemath.org/solaris"
     37        echo ""
     38        fail=yes;;
     39    HP-UX*)
    4040        echo "You are attempting to build Sage on HP's HP-UX operating system,"
    4141        echo "which is not a supported platform for Sage yet though"
    4242        echo "some work has been done on HP-UX. A port does not look to"
     
    4848        echo "http://groups.google.com/group/sage-devel"
    4949        echo "The Sage community would also appreciate any patches you submit."
    5050        echo ""
    51         fail=yes
    52     elif [ "$UNAME" = "AIX" ]; then
     51        fail=yes;;
     52    AIX*)
    5353        echo "You are attempting to build Sage on IBM's AIX operating system,"
    5454        echo "which is not a supported platform for Sage yet. Things may or"
    5555        echo "may not work. If you would like to help port Sage to AIX,"
     
    5757        echo "http://groups.google.com/group/sage-devel"
    5858        echo "The Sage community would also appreciate any patches you submit."
    5959        echo ""
    60         fail=yes
    61     elif [ "$UNAME" = "IRIX" ] || [ "$UNAME" = "IRIX64"  ]; then
     60        fail=yes;;
     61    IRIX*)
    6262        echo "You are attempting to build Sage on SGI's IRIX operating system,"
    6363        echo "which is not a supported platform for Sage yet. Things may or"
    6464        echo "may not work. If you would like to help port Sage to IRIX,"
     
    6666        echo "http://groups.google.com/group/sage-devel"
    6767        echo "The Sage community would also appreciate any patches you submit."
    6868        echo ""
    69         fail=yes
    70     elif [ "$UNAME" = "Tru64" ]; then
     69        fail=yes;;
     70    Tru64*)
    7171        echo "You are attempting to build Sage on HP's Tru64 operating system,"
    7272        echo "which is not a supported platform for Sage yet. Things may or"
    7373        echo "may not work. If you would like to help port Sage to Tru64,"
     
    7575        echo "http://groups.google.com/group/sage-devel"
    7676        echo "The Sage community would also appreciate any patches you submit."
    7777        echo ""
    78         fail=yes
    79     elif [ "$UNAME" = "FreeBSD" ]; then
     78        fail=yes;;
     79    FreeBSD*)
    8080        echo "You are attempting to build Sage on the FreeBSD operating system,"
    8181        echo "which is not a supported platform for Sage yet, though"
    8282        echo "developers are working on adding FreeBSD support. Things may or"
     
    8585        echo "http://groups.google.com/group/sage-devel"
    8686        echo "The Sage community would also appreciate any patches you submit."
    8787        echo ""
    88         fail=yes
    89     elif [ "$UNAME" != "SunOS" ] && [ "$UNAME" != "Darwin" ] && [ "$UNAME" != "Linux" ]; then
     88        fail=yes;;
     89    # Supported platforms.
     90    Linux*|Darwin*|SunOS*|CYGWIN*)
     91        # For SunOS, not all versions are supported, but we checked for
     92        # unsupported versions above.
     93        #
     94        # On Cygwin the result of `uname` depends on the version of
     95        # Windows it is running on, e.g. CYGWIN_NT-5.1 on 32 bits
     96        # Windows XP or CYGWIN_NT-6.1-WOW64 on 64 bits Windows 7 which
     97        # currently makes no difference for us.
     98        fail=no;;
     99    # Wildcard for other unsupported platforms.
     100    *)
    90101        echo "You are attempting to build Sage on $UNAME,"
    91102        echo "which is not a supported platform for Sage yet. Things may or"
    92103        echo "may not work. If you would like to help port Sage to $UNAME,"
     
    94105        echo "http://groups.google.com/group/sage-devel"
    95106        echo "The Sage community would also appreciate any patches you submit."
    96107        echo ""
    97         fail=yes
    98     fi
     108        fail=yes;;
     109    esac
    99110
    100111    # Test versions of "tar" and "make".
    101112    have_gnu_tar=`tar --version 2>&1 | grep GNU`
  • spkg/bin/sage-env

    diff --git a/spkg/bin/sage-env b/spkg/bin/sage-env
    a b  
    417417
    418418############ compilation flags
    419419
    420 UNAME=`uname`
    421 if [ `uname | sed -e 's/WIN.\+/WIN/'` = "CYGWIN" ]; then
    422     UNAME="CYGWIN"
    423 fi
    424 export UNAME
     420# On Cygwin the result of `uname` depends on the version of Windows
     421# it is running on, e.g. CYGWIN_NT-5.1 on 32 bits Windows XP or
     422# CYGWIN_NT-6.1-WOW64 on 64 bits Windows 7.
     423# Currently, this information is of no use to us so we discard it.
     424export UNAME=`uname | sed 's/CYGWIN.*/CYGWIN/' `
    425425
    426426# Setting Sage-related compilation flags.
    427427# This could be used in code to make special changes only when