Ticket #12011: cvxopt-1.1.4.p1.diff

File cvxopt-1.1.4.p1.diff, 2.9 KB (added by jdemeyer, 10 years ago)

Diff for the cvxopt spkg (p0->p1). For review only

  • SPKG.txt

    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    3838
    3939== Special Update/Build Instructions ==
    4040
    41  * cvxopt.h.patch: TODO: document the reasons for this patch!
     41 * cvxopt.h.patch: Fix building with GCC on Solaris.
    4242
    43  * setup.py.patch: look for ATLAS (etc.) in SAGE_ROOT/local/lib
    44    instead of /usr/lib. TODO: more details for this patch.
     43 * setup.py.patch: look for libraries and includes in $SAGE_LOCAL
     44   instead of /usr.  Add fortran, blas,... libraries if needed.
     45   Build with GSL and GLPK support.
    4546
    4647 * dense.c.patch: this incorporates upstream changes from version
    4748   1.1.5, fixing a bug to allow self-tests to pass on OS X 10.7
     
    6061
    6162== Changelog ==
    6263
     64=== cvxopt-1.1.4.p1 (Jeroen Demeyer, 3 April 2012) ===
     65 * Trac #12011: edit cvxopt.h.patch to apply with all GCC versions.
     66
    6367=== cvxopt-1.1.4.p0 (John Palmieri, 31 March 2012) ===
    6468 * Upgrade to version 1.1.4.
    65  * Trac #12011: apply upstream fix (from 1.1.5) to fix self-tests on
    66    OS X Lion.
     69 * Trac #12011: apply upstream fix (from 1.1.5) dense.c.patch to fix
     70   self-tests on OS X Lion.
    6771
    6872=== cvxopt-1.1.3.p1 (Jeroen Demeyer, 23 February 2012) ===
    6973 * Trac #12519: Do not add -lcblas and -latlas on Darwin, since those
  • patches/cvxopt.h.patch

    diff --git a/patches/cvxopt.h.patch b/patches/cvxopt.h.patch
    a b  
    1 --- src/src/C/cvxopt.h  2011-12-21 13:53:49.000000000 -0800
    2 +++ src.patched/src/C/cvxopt.h  2012-03-31 10:13:43.000000000 -0700
    3 @@ -27,8 +27,22 @@
     1diff -ru src/src/C/cvxopt.h src.patched/src/C/cvxopt.h
     2--- src/src/C/cvxopt.h  2011-12-21 22:53:49.000000000 +0100
     3+++ src.patched/src/C/cvxopt.h  2012-04-03 15:32:27.348269553 +0200
     4@@ -27,8 +27,16 @@
    45 /* ANSI99 complex is disabled during build of CHOLMOD */
    56 
    67 #ifndef NO_ANSI99_COMPLEX
    78-#include "complex.h"
    8 -#define MAT_BUFZ(O)  ((complex *)((matrix *)O)->buffer)
     9+#include <complex.h>
     10 #define MAT_BUFZ(O)  ((complex *)((matrix *)O)->buffer)
    911+
    10 +#include <complex.h>
    11 +/* work around Solaris 10 specific problem in complex.h */
    12 + #if defined(__sun__) && defined(__GNUC__)
    13 +    #if __GNUC__ < 4  || ( __GNUC__ == 4 && __GNUC_MINOR__ < 5   )
    14 +
    15 +       #undef  _Complex_I
    16 +       #define _Complex_I (__extension__ 1.0iF)
    17 +
    18 +       #undef I
    19 +       #define I _Complex_I
    20 +
    21 +    #endif
    22 + #endif
     12+/* The <complex.h> header of Solaris 10 defines I in a way that GCC
     13+ * doesn't understand.  Redefine I like in glibc. */
     14+#if defined(__sun__) && defined(__GNUC__)
     15+    #undef I
     16+    #define I (__extension__ 1.0iF)
     17+#endif
    2318+
    24 +#define MAT_BUFZ(O)  ((complex *)((matrix *)O)->buffer)
    2519 #endif
    2620 
    2721 #ifndef __CVXOPT__
    28 @@ -49,7 +63,7 @@
     22@@ -49,7 +57,7 @@
    2923   int_t strides[2];
    3024   int_t ob_exports;
    3125 #else
    3226-  int_t nrows, ncols;    /* number of rows and columns */
    33 +  int nrows, ncols;    /* number of rows and columns */
     27+  int nrows, ncols;      /* number of rows and columns */
    3428 #endif
    3529   int   id;              /* DOUBLE, INT, COMPLEX */
    3630 } matrix;