[112626] trunk/dports/math/SuiteSparse

michaelld at macports.org michaelld at macports.org
Mon Oct 28 07:08:25 PDT 2013


Revision: 112626
          https://trac.macports.org/changeset/112626
Author:   michaelld at macports.org
Date:     2013-10-28 07:08:25 -0700 (Mon, 28 Oct 2013)
Log Message:
-----------
SuiteSparse:
* update to 4.2.1;
* change reinplace's to patches, followed by specific reinplace as needed, with the goal of making future updates easier;
* delete unneeded patch files;
* some whitespace tweaks;
* addresses ticket #40712.

Modified Paths:
--------------
    trunk/dports/math/SuiteSparse/Portfile
    trunk/dports/math/SuiteSparse/files/patch-CHOLMOD_Lib_Makefile.diff

Added Paths:
-----------
    trunk/dports/math/SuiteSparse/files/patch-CHOLMOD-Demo-Makefile.diff
    trunk/dports/math/SuiteSparse/files/patch-CHOLMOD-Partition-choldmod_metis.c.diff
    trunk/dports/math/SuiteSparse/files/patch-KLU-Include-klu_version.h.diff
    trunk/dports/math/SuiteSparse/files/patch-SPQR-Demo-Makefile.diff
    trunk/dports/math/SuiteSparse/files/patch-SuiteSparce_config_Mac.mk.diff
    trunk/dports/math/SuiteSparse/files/patch-UMFPACK-Demo-Makefile.diff

Removed Paths:
-------------
    trunk/dports/math/SuiteSparse/files/UFconfig_UFconfig.mk-patch
    trunk/dports/math/SuiteSparse/files/makefiles.patch

Modified: trunk/dports/math/SuiteSparse/Portfile
===================================================================
--- trunk/dports/math/SuiteSparse/Portfile	2013-10-28 14:05:24 UTC (rev 112625)
+++ trunk/dports/math/SuiteSparse/Portfile	2013-10-28 14:08:25 UTC (rev 112626)
@@ -5,10 +5,10 @@
 
 name                SuiteSparse
 epoch               20120107
-version             4.1.0
+version             4.2.1
 categories          math science
 platforms           darwin
-maintainers         nomaintainer
+maintainers         michaelld openmaintainer
 license             GPL-2+ LGPL-2.1+
 
 description         Sparse matrix routines
@@ -21,110 +21,96 @@
 distname            SuiteSparse-${version}
 worksrcdir          ${name}
 
-checksums           rmd160  f10b02f21d33c048de8f3beb3520cfe6388c4758 \
-                    sha256  bdd4956ee265ca79e60946a961248c241f9c70ccd14bf5eb487597d6b3046982
+checksums           rmd160  9a2fa65845564efad79311f2ff8573217bd79f0d \
+                    sha256  e8023850bc30742e20a3623fabda02421cb5774b980e3e7c9c6d9e7e864946bd
 
-global makefile
-set makefile ${worksrcpath}/SuiteSparse_config/SuiteSparse_config.mk
+# fix Mac configuration file
 
-variant universal {}
+patchfiles-append patch-SuiteSparce_config_Mac.mk.diff
 
+# get path ordering correct
+
 patchfiles-append patch-CHOLMOD_Lib_Makefile.diff
 
-post-patch {
-    if {[variant_isset metis]} {
-        # Use the MacPorts version rather than extracting copy in source dir
+# Real -> RealPart; Imag -> ImagPart to work with some PPC
 
-        # -I$(METIS_PATH)/Lib -> -I$(METIS_PATH)/include
-        reinplace \
-            "s|-I\$(METIS_PATH)/Lib|-I\$(METIS_PATH)/include|g" \
-            ${worksrcpath}/CHOLMOD/Lib/Makefile
+patchfiles-append patch-KLU-Include-klu_version.h.diff
 
-        # #include "metis.h" -> #include <metis/metis.h>
-        reinplace \
-            "s|#include \"metis.h\"|#include <metis/metis.h>|g" \
-            ${worksrcpath}/CHOLMOD/Partition/cholmod_metis.c
+# use <metis/metis.h>, and a METIS-specific type (idx_t instead of
+# idxtype) and routine (METIS_ComputeVertexSeparator in place of
+# METIS_NodeComputeSeparator)
 
-        # CHOLMOD Makefile is set up to detect metis local to build dir. Use MacPorts version.
-        reinplace \
-            "s|ifeq (../../metis-4.0, \$(wildcard ../../metis-4.0))|ifneq \(,\$\(METIS_PATH\)\)|" \
-            ${worksrcpath}/CHOLMOD/Lib/Makefile ${worksrcpath}/CHOLMOD/Demo/Makefile
+patchfiles-append patch-CHOLMOD-Partition-choldmod_metis.c.diff
 
-        # Do not try to build Metis in /opt/local
-        reinplace \
-            "s|^\$\(METIS\):$|fooblafoo:|" \
-            ${worksrcpath}/UMFPACK/Demo/Makefile \
-            ${worksrcpath}/SPQR/Demo/Makefile
-        reinplace \
-            "/\$\(METIS_PATH\)/d" ${worksrcpath}/CHOLMOD/Demo/Makefile
+# do not try to build METIS
 
-        # There is a patch on the SuiteSparse homepage to get Metis 5.0 to work with SuiteSparse.
-        # It replaces all idxtype with idx_t
-        # and METIS_NodeComputeSeparator with METIS_ComputeVertexSeparator
-        reinplace \
-            "s|idxtype|idx_t|g" \
-            ${worksrcpath}/CHOLMOD/Partition/cholmod_metis.c
-        reinplace \
-            "s|METIS_NodeComputeSeparator \(\&nn, Mp, Mi, Mnw, Mew, Opt, \&csp, Mpart\)|\
-               METIS_ComputeVertexSeparator \(\\\&nn, Mp, Mi, Mnw, Opt, \\\&csp, Mpart\)|g" \
-            ${worksrcpath}/CHOLMOD/Partition/cholmod_metis.c
-    }
+patchfiles-append \
+    patch-CHOLMOD-Demo-Makefile.diff \
+    patch-SPQR-Demo-Makefile.diff \
+    patch-UMFPACK-Demo-Makefile.diff
 
-    # klu_version.h defines Real and Imag which conflicts with math.h on ppc
-    reinplace -E \
-        "s|(\[^a-zA-Z\])Real(\[^a-zA-Z\])|\\1RealPart\\2|g" \
-        ${worksrcpath}/KLU/Include/klu_version.h
-    reinplace -E \
-        "s|(\[^a-zA-Z\])Imag(\[^a-zA-Z\])|\\1ImagPart\\2|g" \
-        ${worksrcpath}/KLU/Include/klu_version.h
-}
-
 configure {
-    file rename ${worksrcpath}/SuiteSparse_config/SuiteSparse_config.mk \
-                ${worksrcpath}/SuiteSparse_config/SuiteSparse_config_Linux.mk
-    file rename ${worksrcpath}/SuiteSparse_config/SuiteSparse_config_Mac.mk \
-                ${worksrcpath}/SuiteSparse_config/SuiteSparse_config.mk
 
-    # SuiteSparse does not use configure, so the variables must be
-    #    set manually.
-    reinplace "s|INSTALL_LIB = .*$|INSTALL_LIB = ${destroot}${prefix}/lib|g" ${makefile}
-    reinplace "s|INSTALL_INCLUDE = .*$|INSTALL_INCLUDE = ${destroot}${prefix}/include|g" ${makefile}
+    # SuiteSparse does not use a configure script, so we have to set
+    # configure variables manually.
 
-    # Include build archs
-    reinplace -E "s|^\[^#\].*(CF = .*)$|\\1 \$(TARGET_ARCH)|g" ${makefile}
+    set makefile ${worksrcpath}/SuiteSparse_config/SuiteSparse_config.mk
 
+    copy -force \
+        ${worksrcpath}/SuiteSparse_config/SuiteSparse_config_Mac.mk \
+        ${makefile}
+
+    # destroot, pretix, and build arch(es)
+
+    reinplace "s|@DESTROOT@|${destroot}|g" ${makefile}
+    reinplace "s|@PREFIX@|${prefix}|g" ${makefile}
+    reinplace "s|@ARCHES@|\$(TARGET_ARCH)|g" ${makefile}
+
+    # select BLAS and LAPACK
+
+    set BLAS "-framework Accelerate"
     if {[variant_isset atlas]} {
         # Threaded lib gets priority over non-threaded (ppc)
         if {[file exists ${prefix}/lib/libtatlas.dylib]} {
             # linking to the threaded dylib, is there a reason to use non-threaded?
-            reinplace "s|BLAS = .*$|BLAS = ${prefix}/lib/libtatlas.dylib|g" ${makefile}
-            reinplace "s|LAPACK = .*$|LAPACK = ${prefix}/lib/libtatlas.dylib|g" ${makefile}
+            set BLAS "${prefix}/lib/libtatlas.dylib"
         } else {
-            reinplace "s|BLAS = .*$|BLAS = ${prefix}/lib/libsatlas.dylib|g" ${makefile}
-            reinplace "s|LAPACK = .*$|LAPACK = ${prefix}/lib/libsatlas.dylib|g" ${makefile}
+            set BLAS "${prefix}/lib/libsatlas.dylib"
         }
     }
+    reinplace "s|@BLAS_LAPACK@|${BLAS}|g" ${makefile}
 
+    # select METIS usage, per the variant
+
+    set METIS_PATH ""
+    set METIS ""
+    set CHOLMOD_CONFIG "-DNPARTITION"
     if {[variant_isset metis]} {
-        reinplace "s|^METIS_PATH = .*$|METIS_PATH = ${prefix}|g" ${makefile}
-        reinplace "s|^METIS = .*$|METIS = ${prefix}/lib/libmetis.dylib|g" ${makefile}
-    } else {
-        reinplace "s|^METIS_PATH = .*$|METIS_PATH = |g" ${makefile}
-        reinplace "s|^METIS = .*$|METIS = |g" ${makefile}
-        reinplace "s|^CHOLMOD_CONFIG = .*$|CHOLMOD_CONFIG = -DNPARTITION|g" ${makefile}
+        set METIS_PATH "${prefix}"
+        set METIS "${prefix}/lib/libmetis.dylib"
+        set CHOLMOD_CONFIG "\$(GPU_CONFIG)"
     }
+    reinplace "s|@METIS_PATH@|${METIS_PATH}|g" ${makefile}
+    reinplace "s|@METIS@|${METIS}|g" ${makefile}
+    reinplace "s|@CHOLMOD_CONFIG@|${CHOLMOD_CONFIG}|g" ${makefile}
 }
 
 use_parallel_build  no
 
+pre-build {
+    build.args-append \
+        CC="${configure.cc}" \
+        CXX="${configure.cxx}" \
+        CFLAGS="${configure.cflags}" \
+        TARGET_ARCH="[get_canonical_archflags]"
+}
+
 build.target        default
-build.args-append   CC="${configure.cc}" CXX="${configure.cxx}" \
-                    CFLAGS="${configure.cflags}" LDFLAGS="${configure.ldflags}" \
-                    TARGET_ARCH="[get_canonical_archflags]"
 
 post-destroot {
     # Create a dylib from all .a static libs
 
+    set metis ""
     if {[variant_isset metis]} {
         catch {exec port installed metis} output
         if {[string match *+openmpi* ${output}]} {
@@ -133,25 +119,23 @@
         } else {
             set metis "-lmetis"
         }
-    } else {
-        set metis ""
     }
 
+    set atlas "-framework Accelerate"
     if {[variant_isset atlas]} {
         if {[file exists ${prefix}/lib/libtatlas.dylib]} {
             set atlas "-ltatlas"
         } else {
             set atlas "-lsatlas"
         }
-    } else {
-        set atlas "-framework Accelerate"
     }
 
     set major [join [lrange [split ${version} .] 0 0] .]
 
     set libs [list libamd.a libbtf.a libcamd.a libccolamd.a \
-             libcholmod.a libcolamd.a libcxsparse.a libklu.a \
-             libldl.a librbio.a libspqr.a libsuitesparseconfig.a libumfpack.a]
+                   libcholmod.a libcolamd.a libcxsparse.a \
+                   libklu.a libldl.a librbio.a libspqr.a \
+                   libsuitesparseconfig.a libumfpack.a]
 
     system -W ${destroot}${prefix}/lib "\
         ${configure.cxx} -Wall ${configure.cflags} [get_canonical_archflags cxx] -dynamiclib -Wl,-all_load \
@@ -162,18 +146,20 @@
     ln -s lib${name}.${version}.dylib ${destroot}${prefix}/lib/lib${name}.dylib
     ln -s lib${name}.${version}.dylib ${destroot}${prefix}/lib/lib${name}.${major}.dylib
 
+    # install documentation
+
     xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
     eval xinstall -m 644 \
         [glob ${worksrcpath}/*/Doc/*.pdf] \
         ${destroot}${prefix}/share/doc/${name}
 }
 
-variant metis description {Use METIS for graph partitioning and sparse matrix ordering} {
-    depends_build-append port:metis
+variant metis description {Include METIS for graph partitioning and sparse matrix ordering} {
+    depends_lib-append port:metis
 }
 
 variant atlas description {Use MacPorts' ATLAS instead of Accelerate Framework} {
-    depends_lib-append  port:atlas
+    depends_lib-append port:atlas
 }
 
 livecheck.type      regex

Deleted: trunk/dports/math/SuiteSparse/files/UFconfig_UFconfig.mk-patch
===================================================================
--- trunk/dports/math/SuiteSparse/files/UFconfig_UFconfig.mk-patch	2013-10-28 14:05:24 UTC (rev 112625)
+++ trunk/dports/math/SuiteSparse/files/UFconfig_UFconfig.mk-patch	2013-10-28 14:08:25 UTC (rev 112626)
@@ -1,38 +0,0 @@
---- UFconfig/UFconfig.mk.orig	2012-01-07 22:12:31.000000000 -0600
-+++ UFconfig/UFconfig.mk	2012-01-07 22:13:37.000000000 -0600
-@@ -122,13 +122,13 @@
- # The path is relative to where it is used, in CHOLMOD/Lib, CHOLMOD/MATLAB, etc.
- # You may wish to use an absolute path.  METIS is optional.  Compile
- # CHOLMOD with -DNPARTITION if you do not wish to use METIS.
--METIS_PATH = ../../metis-4.0
--METIS = ../../metis-4.0/libmetis.a
-+# METIS_PATH = ../../metis-4.0
-+# METIS = ../../metis-4.0/libmetis.a
- 
- # If you use CHOLMOD_CONFIG = -DNPARTITION then you must use the following
- # options:
--# METIS_PATH =
--# METIS =
-+METIS_PATH =
-+METIS =
- 
- #------------------------------------------------------------------------------
- # UMFPACK configuration:
-@@ -184,7 +184,7 @@
- # -DNSUNPERF	    for Solaris only.  If defined, do not use the Sun
- #			Performance Library
- 
--CHOLMOD_CONFIG =
-+CHOLMOD_CONFIG = -DNPARTITION	    
- 
- #------------------------------------------------------------------------------
- # SuiteSparseQR configuration:
-@@ -198,7 +198,7 @@
- # -DHAVE_TBB        enable the use of Intel's Threading Building Blocks (TBB)
- 
- # default, without timing, without TBB:
--SPQR_CONFIG =
-+SPQR_CONFIG = -DNPARTITION	    
- # with timing and TBB:
- # SPQR_CONFIG = -DTIMING -DHAVE_TBB
- # with timing

Deleted: trunk/dports/math/SuiteSparse/files/makefiles.patch
===================================================================
--- trunk/dports/math/SuiteSparse/files/makefiles.patch	2013-10-28 14:05:24 UTC (rev 112625)
+++ trunk/dports/math/SuiteSparse/files/makefiles.patch	2013-10-28 14:08:25 UTC (rev 112626)
@@ -1,66 +0,0 @@
---- AMD/Makefile.orig	2011-07-25 11:00:33.000000000 +1000
-+++ AMD/Makefile	2011-07-25 11:00:51.000000000 +1000
-@@ -6,6 +6,8 @@
- 
- include ../UFconfig/UFconfig.mk
- 
-+.PHONY : default all demo library fortran cross clean purge distclean doc dist ccode lib mex
-+
- # Compile all C code, including the C-callable routines.
- # Do not compile the FORTRAN versions, or MATLAB interface.
- demo:
---- CAMD/Makefile.orig	2007-05-06 00:28:33.000000000 +1000
-+++ CAMD/Makefile	2011-07-25 11:03:59.000000000 +1000
-@@ -6,6 +6,8 @@
- 
- include ../UFconfig/UFconfig.mk
- 
-+.PHONY : default all demo library clean purge distclean doc dist ccode lib mex
-+
- # Compile all C code, including the C-callable routine and the mexFunctions.
- # Do not compile the FORTRAN versions, or MATLAB interface.
- demo:
---- CCOLAMD/Makefile.orig	2007-05-05 23:57:17.000000000 +1000
-+++ CCOLAMD/Makefile	2011-07-25 11:06:00.000000000 +1000
-@@ -6,6 +6,8 @@
- 
- include ../UFconfig/UFconfig.mk
- 
-+.PHONY : default all demo library clean purge distclean dist ccode lib mex
-+
- # Compile all C code, including the C-callable routine and the mexFunctions.
- # Do not the MATLAB interface.
- demo:
---- COLAMD/Makefile.orig	2007-05-05 23:40:14.000000000 +1000
-+++ COLAMD/Makefile	2011-07-25 11:08:03.000000000 +1000
-@@ -6,6 +6,8 @@
- 
- include ../UFconfig/UFconfig.mk
- 
-+.PHONY : default all demo library clean purge distclean dist ccode lib mex
-+
- # Compile all C code, including the C-callable routine and the mexFunctions.
- # Do not the MATLAB interface.
- demo:
---- LDL/Makefile.orig	2007-05-06 03:24:14.000000000 +1000
-+++ LDL/Makefile	2011-07-25 11:11:26.000000000 +1000
-@@ -6,6 +6,8 @@
- 
- include ../UFconfig/UFconfig.mk
- 
-+.PHONY : default all demo library clean purge distclean doc dist ccode lib mex
-+
- # Compile all C code, including the C-callable routine.
- demo:
- 	( cd Lib    ; $(MAKE) )
---- SPQR/Makefile.orig	2008-08-21 05:59:59.000000000 +1000
-+++ SPQR/Makefile	2011-07-25 11:13:36.000000000 +1000
-@@ -4,6 +4,8 @@
- 
- include ../UFconfig/UFconfig.mk
- 
-+.PHONY : default all demo library cov clean purge distclean ccode mex
-+
- default: all
- 
- all:

Added: trunk/dports/math/SuiteSparse/files/patch-CHOLMOD-Demo-Makefile.diff
===================================================================
--- trunk/dports/math/SuiteSparse/files/patch-CHOLMOD-Demo-Makefile.diff	                        (rev 0)
+++ trunk/dports/math/SuiteSparse/files/patch-CHOLMOD-Demo-Makefile.diff	2013-10-28 14:08:25 UTC (rev 112626)
@@ -0,0 +1,13 @@
+--- CHOLMOD/Demo/Makefile.orig	2013-10-24 12:24:48.000000000 -0400
++++ CHOLMOD/Demo/Makefile	2013-10-24 12:31:19.000000000 -0400
+@@ -98,10 +98,6 @@
+ 	( cd ../../CCOLAMD ; $(MAKE) library )
+ 	( cd ../../CAMD ; $(MAKE) library )
+ endif
+-ifneq (,$(findstring -DNPARTITION, $(CONFIG)))
+-else
+-	( cd $(METIS_PATH) && $(MAKE) )
+-endif
+ 
+ #-------------------------------------------------------------------------------
+ 

Added: trunk/dports/math/SuiteSparse/files/patch-CHOLMOD-Partition-choldmod_metis.c.diff
===================================================================
--- trunk/dports/math/SuiteSparse/files/patch-CHOLMOD-Partition-choldmod_metis.c.diff	                        (rev 0)
+++ trunk/dports/math/SuiteSparse/files/patch-CHOLMOD-Partition-choldmod_metis.c.diff	2013-10-28 14:08:25 UTC (rev 112626)
@@ -0,0 +1,258 @@
+--- CHOLMOD/Partition/cholmod_metis.c.orig	2013-10-24 12:21:14.000000000 -0400
++++ CHOLMOD/Partition/cholmod_metis.c	2013-10-24 13:52:05.000000000 -0400
+@@ -48,7 +48,7 @@
+ #include "cholmod_internal.h"
+ #undef ASSERT
+ 
+-#include "metis.h"
++#include <metis/metis.h>
+ /* METIS has its own ASSERT that it reveals to the user, so remove it here: */
+ #undef ASSERT
+ 
+@@ -75,7 +75,7 @@
+ #ifdef DUMP_GRAPH
+ #include <stdio.h>
+ /* After dumping the graph with this routine, run "onmetis metisgraph" */
+-static void dumpgraph (idxtype *Mp, idxtype *Mi, SuiteSparse_long n,
++static void dumpgraph (idx_t *Mp, idx_t *Mi, SuiteSparse_long n,
+     cholmod_common *Common)
+ {
+     SuiteSparse_long i, j, p, nz ;
+@@ -161,7 +161,7 @@
+     s = GUESS ((double) nz, (double) n) ;
+     s *= Common->metis_memory ;
+ 
+-    if (s * sizeof (idxtype) >= ((double) Size_max))
++    if (s * sizeof (idx_t) >= ((double) Size_max))
+     {
+ 	/* don't even attempt to malloc such a large block */
+ 	return (FALSE) ;
+@@ -172,7 +172,7 @@
+     metis_guard *= Common->metis_memory ;
+ 
+     /* attempt to malloc the block */
+-    p = CHOLMOD(malloc) (metis_guard, sizeof (idxtype), Common) ;
++    p = CHOLMOD(malloc) (metis_guard, sizeof (idx_t), Common) ;
+     if (p == NULL)
+     {
+ 	/* failure - return out-of-memory condition */
+@@ -180,7 +180,7 @@
+     }
+ 
+     /* success - free the block */
+-    CHOLMOD(free) (metis_guard, sizeof (idxtype), p, Common) ;
++    CHOLMOD(free) (metis_guard, sizeof (idx_t), p, Common) ;
+     return (TRUE) ;
+ }
+ 
+@@ -210,7 +210,7 @@
+ )
+ {
+     Int *Ap, *Ai ;
+-    idxtype *Mp, *Mi, *Mnw, *Mew, *Mpart ;
++    idx_t *Mp, *Mi, *Mnw, *Mew, *Mpart ;
+     Int n, nleft, nright, j, p, csep, total_weight, lightest, nz ;
+     int Opt [8], nn, csp ;
+     size_t n1 ;
+@@ -259,7 +259,7 @@
+     /* ---------------------------------------------------------------------- */
+ 
+ #ifdef LONG
+-    if (sizeof (Int) > sizeof (idxtype) && MAX (n,nz) > INT_MAX / sizeof (int))
++    if (sizeof (Int) > sizeof (idx_t) && MAX (n,nz) > INT_MAX / sizeof (int))
+     {
+ 	/* CHOLMOD's matrix is too large for METIS */
+ 	return (EMPTY) ;
+@@ -282,34 +282,34 @@
+     DEBUG (for (j = 0 ; j < n ; j++) ASSERT (Anw [j] > 0)) ;
+ 
+     /* ---------------------------------------------------------------------- */
+-    /* copy Int to METIS idxtype, if necessary */
++    /* copy Int to METIS idx_t, if necessary */
+     /* ---------------------------------------------------------------------- */
+ 
+     DEBUG (for (j = 0 ; j < nz ; j++) ASSERT (Aew [j] > 0)) ;
+-    if (sizeof (Int) == sizeof (idxtype))
++    if (sizeof (Int) == sizeof (idx_t))
+     {
+ 	/* this is the typical case */
+-	Mi    = (idxtype *) Ai ;
+-	Mew   = (idxtype *) Aew ;
+-	Mp    = (idxtype *) Ap ;
+-	Mnw   = (idxtype *) Anw ;
+-	Mpart = (idxtype *) Partition ;
++	Mi    = (idx_t *) Ai ;
++	Mew   = (idx_t *) Aew ;
++	Mp    = (idx_t *) Ap ;
++	Mnw   = (idx_t *) Anw ;
++	Mpart = (idx_t *) Partition ;
+     }
+     else
+     {
+-	/* idxtype and Int differ; copy the graph into the METIS idxtype */
+-	Mi    = CHOLMOD(malloc) (nz, sizeof (idxtype), Common) ;
+-	Mew   = CHOLMOD(malloc) (nz, sizeof (idxtype), Common) ;
+-	Mp    = CHOLMOD(malloc) (n1, sizeof (idxtype), Common) ;
+-	Mnw   = CHOLMOD(malloc) (n,  sizeof (idxtype), Common) ;
+-	Mpart = CHOLMOD(malloc) (n,  sizeof (idxtype), Common) ;
++	/* idx_t and Int differ; copy the graph into the METIS idx_t */
++	Mi    = CHOLMOD(malloc) (nz, sizeof (idx_t), Common) ;
++	Mew   = CHOLMOD(malloc) (nz, sizeof (idx_t), Common) ;
++	Mp    = CHOLMOD(malloc) (n1, sizeof (idx_t), Common) ;
++	Mnw   = CHOLMOD(malloc) (n,  sizeof (idx_t), Common) ;
++	Mpart = CHOLMOD(malloc) (n,  sizeof (idx_t), Common) ;
+ 	if (Common->status < CHOLMOD_OK)
+ 	{
+-	    CHOLMOD(free) (nz, sizeof (idxtype), Mi,    Common) ;
+-	    CHOLMOD(free) (nz, sizeof (idxtype), Mew,   Common) ;
+-	    CHOLMOD(free) (n1, sizeof (idxtype), Mp,    Common) ;
+-	    CHOLMOD(free) (n,  sizeof (idxtype), Mnw,   Common) ;
+-	    CHOLMOD(free) (n,  sizeof (idxtype), Mpart, Common) ;
++	    CHOLMOD(free) (nz, sizeof (idx_t), Mi,    Common) ;
++	    CHOLMOD(free) (nz, sizeof (idx_t), Mew,   Common) ;
++	    CHOLMOD(free) (n1, sizeof (idx_t), Mp,    Common) ;
++	    CHOLMOD(free) (n,  sizeof (idx_t), Mnw,   Common) ;
++	    CHOLMOD(free) (n,  sizeof (idx_t), Mpart, Common) ;
+ 	    return (EMPTY) ;
+ 	}
+ 	for (p = 0 ; p < nz ; p++)
+@@ -337,13 +337,13 @@
+     if (!metis_memory_ok (n, nz, Common))
+     {
+ 	/* METIS might ask for too much memory and thus terminate the program */
+-	if (sizeof (Int) != sizeof (idxtype))
++	if (sizeof (Int) != sizeof (idx_t))
+ 	{
+-	    CHOLMOD(free) (nz, sizeof (idxtype), Mi,    Common) ;
+-	    CHOLMOD(free) (nz, sizeof (idxtype), Mew,   Common) ;
+-	    CHOLMOD(free) (n1, sizeof (idxtype), Mp,    Common) ;
+-	    CHOLMOD(free) (n,  sizeof (idxtype), Mnw,   Common) ;
+-	    CHOLMOD(free) (n,  sizeof (idxtype), Mpart, Common) ;
++	    CHOLMOD(free) (nz, sizeof (idx_t), Mi,    Common) ;
++	    CHOLMOD(free) (nz, sizeof (idx_t), Mew,   Common) ;
++	    CHOLMOD(free) (n1, sizeof (idx_t), Mp,    Common) ;
++	    CHOLMOD(free) (n,  sizeof (idx_t), Mnw,   Common) ;
++	    CHOLMOD(free) (n,  sizeof (idx_t), Mpart, Common) ;
+ 	}
+ 	return (EMPTY) ;
+     }
+@@ -369,27 +369,27 @@
+ #endif
+ 
+     nn = n ;
+-    METIS_NodeComputeSeparator (&nn, Mp, Mi, Mnw, Mew, Opt, &csp, Mpart) ;
++    METIS_ComputeVertexSeparator (&nn, Mp, Mi, Mnw, Opt, &csp, Mpart) ;
+     n = nn ;
+     csep = csp ;
+ 
+     PRINT1 (("METIS csep "ID"\n", csep)) ;
+ 
+     /* ---------------------------------------------------------------------- */
+-    /* copy the results back from idxtype, if required */
++    /* copy the results back from idx_t, if required */
+     /* ---------------------------------------------------------------------- */
+ 
+-    if (sizeof (Int) != sizeof (idxtype))
++    if (sizeof (Int) != sizeof (idx_t))
+     {
+ 	for (j = 0 ; j < n ; j++)
+ 	{
+ 	    Partition [j] = Mpart [j] ;
+ 	}
+-	CHOLMOD(free) (nz, sizeof (idxtype), Mi,    Common) ;
+-	CHOLMOD(free) (nz, sizeof (idxtype), Mew,   Common) ;
+-	CHOLMOD(free) (n1, sizeof (idxtype), Mp,    Common) ;
+-	CHOLMOD(free) (n,  sizeof (idxtype), Mnw,   Common) ;
+-	CHOLMOD(free) (n,  sizeof (idxtype), Mpart, Common) ;
++	CHOLMOD(free) (nz, sizeof (idx_t), Mi,    Common) ;
++	CHOLMOD(free) (nz, sizeof (idx_t), Mew,   Common) ;
++	CHOLMOD(free) (n1, sizeof (idx_t), Mp,    Common) ;
++	CHOLMOD(free) (n,  sizeof (idx_t), Mnw,   Common) ;
++	CHOLMOD(free) (n,  sizeof (idx_t), Mpart, Common) ;
+     }
+ 
+     /* ---------------------------------------------------------------------- */
+@@ -507,7 +507,7 @@
+ {
+     double d ;
+     Int *Iperm, *Iwork, *Bp, *Bi ;
+-    idxtype *Mp, *Mi, *Mperm, *Miperm ;
++    idx_t *Mp, *Mi, *Mperm, *Miperm ;
+     cholmod_sparse *B ;
+     Int i, j, n, nz, p, identity, uncol ;
+     int Opt [8], nn, zero = 0 ;
+@@ -600,7 +600,7 @@
+     /* ---------------------------------------------------------------------- */
+ 
+ #ifdef LONG
+-    if (sizeof (Int) > sizeof (idxtype) && MAX (n,nz) > INT_MAX / sizeof (int))
++    if (sizeof (Int) > sizeof (idx_t) && MAX (n,nz) > INT_MAX / sizeof (int))
+     {
+ 	/* CHOLMOD's matrix is too large for METIS */
+ 	CHOLMOD(free_sparse) (&B, Common) ;
+@@ -629,29 +629,29 @@
+     /* allocate the METIS input arrays, if needed */
+     /* ---------------------------------------------------------------------- */
+ 
+-    if (sizeof (Int) == sizeof (idxtype))
++    if (sizeof (Int) == sizeof (idx_t))
+     {
+ 	/* This is the typical case. */
+-	Miperm = (idxtype *) Iperm ;
+-	Mperm  = (idxtype *) Perm ;
+-	Mp     = (idxtype *) Bp ;
+-	Mi     = (idxtype *) Bi ;
++	Miperm = (idx_t *) Iperm ;
++	Mperm  = (idx_t *) Perm ;
++	Mp     = (idx_t *) Bp ;
++	Mi     = (idx_t *) Bi ;
+     }
+     else
+     {
+-	/* allocate graph for METIS only if Int and idxtype differ */
+-	Miperm = CHOLMOD(malloc) (n,  sizeof (idxtype), Common) ;
+-	Mperm  = CHOLMOD(malloc) (n,  sizeof (idxtype), Common) ;
+-	Mp     = CHOLMOD(malloc) (n1, sizeof (idxtype), Common) ;
+-	Mi     = CHOLMOD(malloc) (nz, sizeof (idxtype), Common) ;
++	/* allocate graph for METIS only if Int and idx_t differ */
++	Miperm = CHOLMOD(malloc) (n,  sizeof (idx_t), Common) ;
++	Mperm  = CHOLMOD(malloc) (n,  sizeof (idx_t), Common) ;
++	Mp     = CHOLMOD(malloc) (n1, sizeof (idx_t), Common) ;
++	Mi     = CHOLMOD(malloc) (nz, sizeof (idx_t), Common) ;
+ 	if (Common->status < CHOLMOD_OK)
+ 	{
+ 	    /* out of memory */
+ 	    CHOLMOD(free_sparse) (&B, Common) ;
+-	    CHOLMOD(free) (n,  sizeof (idxtype), Miperm, Common) ;
+-	    CHOLMOD(free) (n,  sizeof (idxtype), Mperm, Common) ;
+-	    CHOLMOD(free) (n1, sizeof (idxtype), Mp, Common) ;
+-	    CHOLMOD(free) (nz, sizeof (idxtype), Mi, Common) ;
++	    CHOLMOD(free) (n,  sizeof (idx_t), Miperm, Common) ;
++	    CHOLMOD(free) (n,  sizeof (idx_t), Mperm, Common) ;
++	    CHOLMOD(free) (n1, sizeof (idx_t), Mp, Common) ;
++	    CHOLMOD(free) (nz, sizeof (idx_t), Mi, Common) ;
+ 	    return (FALSE) ;
+ 	}
+ 	for (j = 0 ; j <= n ; j++)
+@@ -740,16 +740,16 @@
+     /* free the METIS input arrays */
+     /* ---------------------------------------------------------------------- */
+ 
+-    if (sizeof (Int) != sizeof (idxtype))
++    if (sizeof (Int) != sizeof (idx_t))
+     {
+ 	for (i = 0 ; i < n ; i++)
+ 	{
+ 	    Perm [i] = (Int) (Mperm [i]) ;
+ 	}
+-	CHOLMOD(free) (n,   sizeof (idxtype), Miperm, Common) ;
+-	CHOLMOD(free) (n,   sizeof (idxtype), Mperm, Common) ;
+-	CHOLMOD(free) (n+1, sizeof (idxtype), Mp, Common) ;
+-	CHOLMOD(free) (nz,  sizeof (idxtype), Mi, Common) ;
++	CHOLMOD(free) (n,   sizeof (idx_t), Miperm, Common) ;
++	CHOLMOD(free) (n,   sizeof (idx_t), Mperm, Common) ;
++	CHOLMOD(free) (n+1, sizeof (idx_t), Mp, Common) ;
++	CHOLMOD(free) (nz,  sizeof (idx_t), Mi, Common) ;
+     }
+ 
+     CHOLMOD(free_sparse) (&B, Common) ;

Modified: trunk/dports/math/SuiteSparse/files/patch-CHOLMOD_Lib_Makefile.diff
===================================================================
--- trunk/dports/math/SuiteSparse/files/patch-CHOLMOD_Lib_Makefile.diff	2013-10-28 14:05:24 UTC (rev 112625)
+++ trunk/dports/math/SuiteSparse/files/patch-CHOLMOD_Lib_Makefile.diff	2013-10-28 14:08:25 UTC (rev 112626)
@@ -1,16 +1,26 @@
---- CHOLMOD/Lib/Makefile.orig	2013-04-22 21:13:04.000000000 -0400
-+++ CHOLMOD/Lib/Makefile	2013-04-22 21:17:59.000000000 -0400
+--- CHOLMOD/Lib/Makefile.orig	2013-10-24 11:40:26.000000000 -0400
++++ CHOLMOD/Lib/Makefile	2013-10-24 12:18:47.000000000 -0400
 @@ -22,8 +22,7 @@
-                 # METIS, CAMD, and CCOLAMD are available
-                 LIB_WITH_PARTITION = $(METIS) ../../CCOLAMD/Lib/libccolamd.a \
-                     ../../CAMD/Lib/libcamd.a
--                I_WITH_PARTITION = -I$(METIS_PATH)/Lib \
--                    -I../../CCOLAMD/Include -I../../CAMD/Include
-+                I_WITH_PARTITION = -I$(METIS_PATH)/Lib
-                 CONFIG =
+             # CAMD and CCOLAMD are requested and available
+             LIB_WITH_PARTITION = \
+                         ../../CCOLAMD/Lib/libccolamd.a ../../CAMD/Lib/libcamd.a
+-            I_WITH_PARTITION = \
+-                        -I../../CCOLAMD/Include -I../../CAMD/Include
++            I_WITH_PARTITION =
+             CONFIG = -DNPARTITION
+             # check if METIS is requested and available
+             ifeq (,$(findstring -DNPARTITION, $(CHOLMOD_CONFIG)))
+@@ -32,8 +31,7 @@
+                     # METIS is available
+                     LIB_WITH_PARTITION = $(METIS) \
+                         ../../CCOLAMD/Lib/libccolamd.a ../../CAMD/Lib/libcamd.a
+-                    I_WITH_PARTITION = -I$(METIS_PATH)/Lib \
+-                        -I../../CCOLAMD/Include -I../../CAMD/Include
++                    I_WITH_PARTITION = -I$(METIS_PATH)/include
+                     CONFIG =
+                 endif
              endif
-         endif
-@@ -32,7 +31,8 @@
+@@ -44,7 +42,8 @@
  #-------------------------------------------------------------------------------
  
  I = -I../../AMD/Include -I../../AMD/Source -I../../COLAMD/Include \

Added: trunk/dports/math/SuiteSparse/files/patch-KLU-Include-klu_version.h.diff
===================================================================
--- trunk/dports/math/SuiteSparse/files/patch-KLU-Include-klu_version.h.diff	                        (rev 0)
+++ trunk/dports/math/SuiteSparse/files/patch-KLU-Include-klu_version.h.diff	2013-10-28 14:08:25 UTC (rev 112626)
@@ -0,0 +1,374 @@
+--- KLU/Include/klu_version.h.orig	2013-10-24 12:06:25.000000000 -0400
++++ KLU/Include/klu_version.h	2013-10-24 12:08:49.000000000 -0400
+@@ -327,8 +327,8 @@
+ 
+ typedef Double_Complex Unit ;
+ #define Entry Double_Complex
+-#define Real component [0]
+-#define Imag component [1]
++#define RealPart component [0]
++#define ImagPart component [1]
+ 
+ /* for flop counts */
+ #define MULTSUB_FLOPS   8.      /* c -= a*b */
+@@ -342,12 +342,12 @@
+ /* -------------------------------------------------------------------------- */
+ 
+ /* real part of c */
+-#define REAL(c) ((c).Real)
++#define REAL(c) ((c).RealPart)
+ 
+ /* -------------------------------------------------------------------------- */
+ 
+ /* imag part of c */
+-#define IMAG(c) ((c).Imag)
++#define IMAG(c) ((c).ImagPart)
+ 
+ /* -------------------------------------------------------------------------- */
+ 
+@@ -360,8 +360,8 @@
+ { \
+     if (split) \
+     { \
+-        (c).Real = (s1)[p] ; \
+-        (c).Imag = (s2)[p] ; \
++        (c).RealPart = (s1)[p] ; \
++        (c).ImagPart = (s2)[p] ; \
+     }  \
+     else \
+     { \
+@@ -372,15 +372,15 @@
+ /* -------------------------------------------------------------------------- */
+ #define CONJ(a, x) \
+ { \
+-    a.Real = x.Real ; \
+-    a.Imag = -x.Imag ; \
++    a.RealPart = x.RealPart ; \
++    a.ImagPart = -x.ImagPart ; \
+ }
+ 
+ /* c = 0 */
+ #define CLEAR(c) \
+ { \
+-    (c).Real = 0. ; \
+-    (c).Imag = 0. ; \
++    (c).RealPart = 0. ; \
++    (c).ImagPart = 0. ; \
+ }
+ 
+ /* -------------------------------------------------------------------------- */
+@@ -388,8 +388,8 @@
+ /* *p++ = 0 */
+ #define CLEAR_AND_INCREMENT(p) \
+ { \
+-    p->Real = 0. ; \
+-    p->Imag = 0. ; \
++    p->RealPart = 0. ; \
++    p->ImagPart = 0. ; \
+     p++ ; \
+ }
+ 
+@@ -397,34 +397,34 @@
+ 
+ /* True if a == 0 */
+ #define IS_ZERO(a) \
+-    (SCALAR_IS_ZERO ((a).Real) && SCALAR_IS_ZERO ((a).Imag))
++    (SCALAR_IS_ZERO ((a).RealPart) && SCALAR_IS_ZERO ((a).ImagPart))
+ 
+ /* -------------------------------------------------------------------------- */
+ 
+ /* True if a is NaN */
+ #define IS_NAN(a) \
+-    (SCALAR_IS_NAN ((a).Real) || SCALAR_IS_NAN ((a).Imag))
++    (SCALAR_IS_NAN ((a).RealPart) || SCALAR_IS_NAN ((a).ImagPart))
+ 
+ /* -------------------------------------------------------------------------- */
+ 
+ /* True if a != 0 */
+ #define IS_NONZERO(a) \
+-    (SCALAR_IS_NONZERO ((a).Real) || SCALAR_IS_NONZERO ((a).Imag))
++    (SCALAR_IS_NONZERO ((a).RealPart) || SCALAR_IS_NONZERO ((a).ImagPart))
+ 
+ /* -------------------------------------------------------------------------- */
+ 
+ /* a = c/s */
+ #define SCALE_DIV_ASSIGN(a,c,s) \
+ { \
+-    a.Real = c.Real / s ; \
+-    a.Imag = c.Imag / s ; \
++    a.RealPart = c.RealPart / s ; \
++    a.ImagPart = c.ImagPart / s ; \
+ }
+ 
+ /* c /= s */
+ #define SCALE_DIV(c,s) \
+ { \
+-    (c).Real /= (s) ; \
+-    (c).Imag /= (s) ; \
++    (c).RealPart /= (s) ; \
++    (c).ImagPart /= (s) ; \
+ }
+ 
+ /* -------------------------------------------------------------------------- */
+@@ -432,8 +432,8 @@
+ /* c *= s */
+ #define SCALE(c,s) \
+ { \
+-    (c).Real *= (s) ; \
+-    (c).Imag *= (s) ; \
++    (c).RealPart *= (s) ; \
++    (c).ImagPart *= (s) ; \
+ }
+ 
+ /* -------------------------------------------------------------------------- */
+@@ -441,8 +441,8 @@
+ /* c += a */
+ #define ASSEMBLE(c,a) \
+ { \
+-    (c).Real += (a).Real ; \
+-    (c).Imag += (a).Imag ; \
++    (c).RealPart += (a).RealPart ; \
++    (c).ImagPart += (a).ImagPart ; \
+ }
+ 
+ /* -------------------------------------------------------------------------- */
+@@ -450,8 +450,8 @@
+ /* c += *p++ */
+ #define ASSEMBLE_AND_INCREMENT(c,p) \
+ { \
+-    (c).Real += p->Real ; \
+-    (c).Imag += p->Imag ; \
++    (c).RealPart += p->RealPart ; \
++    (c).ImagPart += p->ImagPart ; \
+     p++ ; \
+ }
+ 
+@@ -460,8 +460,8 @@
+ /* c -= a */
+ #define DECREMENT(c,a) \
+ { \
+-    (c).Real -= (a).Real ; \
+-    (c).Imag -= (a).Imag ; \
++    (c).RealPart -= (a).RealPart ; \
++    (c).ImagPart -= (a).ImagPart ; \
+ }
+ 
+ /* -------------------------------------------------------------------------- */
+@@ -470,8 +470,8 @@
+ #define MULT(c,a,b) \
+ { \
+     ASSERT (&(c) != &(a) && &(c) != &(b)) ; \
+-    (c).Real = (a).Real * (b).Real - (a).Imag * (b).Imag ; \
+-    (c).Imag = (a).Imag * (b).Real + (a).Real * (b).Imag ; \
++    (c).RealPart = (a).RealPart * (b).RealPart - (a).ImagPart * (b).ImagPart ; \
++    (c).ImagPart = (a).ImagPart * (b).RealPart + (a).RealPart * (b).ImagPart ; \
+ }
+ 
+ /* -------------------------------------------------------------------------- */
+@@ -480,8 +480,8 @@
+ #define MULT_CONJ(c,a,b) \
+ { \
+     ASSERT (&(c) != &(a) && &(c) != &(b)) ; \
+-    (c).Real = (a).Real * (b).Real + (a).Imag * (b).Imag ; \
+-    (c).Imag = (a).Imag * (b).Real - (a).Real * (b).Imag ; \
++    (c).RealPart = (a).RealPart * (b).RealPart + (a).ImagPart * (b).ImagPart ; \
++    (c).ImagPart = (a).ImagPart * (b).RealPart - (a).RealPart * (b).ImagPart ; \
+ }
+ 
+ /* -------------------------------------------------------------------------- */
+@@ -490,8 +490,8 @@
+ #define MULT_SUB(c,a,b) \
+ { \
+     ASSERT (&(c) != &(a) && &(c) != &(b)) ; \
+-    (c).Real -= (a).Real * (b).Real - (a).Imag * (b).Imag ; \
+-    (c).Imag -= (a).Imag * (b).Real + (a).Real * (b).Imag ; \
++    (c).RealPart -= (a).RealPart * (b).RealPart - (a).ImagPart * (b).ImagPart ; \
++    (c).ImagPart -= (a).ImagPart * (b).RealPart + (a).RealPart * (b).ImagPart ; \
+ }
+ 
+ /* -------------------------------------------------------------------------- */
+@@ -500,8 +500,8 @@
+ #define MULT_SUB_CONJ(c,a,b) \
+ { \
+     ASSERT (&(c) != &(a) && &(c) != &(b)) ; \
+-    (c).Real -= (a).Real * (b).Real + (a).Imag * (b).Imag ; \
+-    (c).Imag -= (a).Imag * (b).Real - (a).Real * (b).Imag ; \
++    (c).RealPart -= (a).RealPart * (b).RealPart + (a).ImagPart * (b).ImagPart ; \
++    (c).ImagPart -= (a).ImagPart * (b).RealPart - (a).RealPart * (b).ImagPart ; \
+ }
+ 
+ /* -------------------------------------------------------------------------- */
+@@ -510,8 +510,8 @@
+ #ifdef MATHWORKS
+ #define DIV(c,a,b) \
+ { \
+-    (void) utDivideComplex ((a).Real, (a).Imag, (b).Real, (b).Imag, \
+-        &((c).Real), &((c).Imag)) ; \
++    (void) utDivideComplex ((a).RealPart, (a).ImagPart, (b).RealPart, (b).ImagPart, \
++        &((c).RealPart), &((c).ImagPart)) ; \
+ }
+ #else
+ /* This uses ACM Algo 116, by R. L. Smith, 1962. */
+@@ -520,23 +520,23 @@
+ #define DIV(c,a,b) \
+ { \
+     double r, den, ar, ai, br, bi ; \
+-    br = (b).Real ; \
+-    bi = (b).Imag ; \
+-    ar = (a).Real ; \
+-    ai = (a).Imag ; \
++    br = (b).RealPart ; \
++    bi = (b).ImagPart ; \
++    ar = (a).RealPart ; \
++    ai = (a).ImagPart ; \
+     if (SCALAR_ABS (br) >= SCALAR_ABS (bi)) \
+     { \
+         r = bi / br ; \
+         den = br + r * bi ; \
+-        (c).Real = (ar + ai * r) / den ; \
+-        (c).Imag = (ai - ar * r) / den ; \
++        (c).RealPart = (ar + ai * r) / den ; \
++        (c).ImagPart = (ai - ar * r) / den ; \
+     } \
+     else \
+     { \
+         r = br / bi ; \
+         den = r * br + bi ; \
+-        (c).Real = (ar * r + ai) / den ; \
+-        (c).Imag = (ai * r - ar) / den ; \
++        (c).RealPart = (ar * r + ai) / den ; \
++        (c).ImagPart = (ai * r - ar) / den ; \
+     } \
+ }
+ #endif
+@@ -550,21 +550,21 @@
+ #define RECIPROCAL(c) \
+ { \
+     double r, den, cr, ci ; \
+-    cr = (c).Real ; \
+-    ci = (c).Imag ; \
++    cr = (c).RealPart ; \
++    ci = (c).ImagPart ; \
+     if (SCALAR_ABS (cr) >= SCALAR_ABS (ci)) \
+     { \
+         r = ci / cr ; \
+         den = cr + r * ci ; \
+-        (c).Real = 1.0 / den ; \
+-        (c).Imag = - r / den ; \
++        (c).RealPart = 1.0 / den ; \
++        (c).ImagPart = - r / den ; \
+     } \
+     else \
+     { \
+         r = cr / ci ; \
+         den = r * cr + ci ; \
+-        (c).Real = r / den ; \
+-        (c).Imag = - 1.0 / den ; \
++        (c).RealPart = r / den ; \
++        (c).ImagPart = - 1.0 / den ; \
+     } \
+ }
+ 
+@@ -575,8 +575,8 @@
+ #ifdef MATHWORKS
+ #define DIV_CONJ(c,a,b) \
+ { \
+-    (void) utDivideComplex ((a).Real, (a).Imag, (b).Real, (-(b).Imag), \
+-        &((c).Real), &((c).Imag)) ; \
++    (void) utDivideComplex ((a).RealPart, (a).ImagPart, (b).RealPart, (-(b).ImagPart), \
++        &((c).RealPart), &((c).ImagPart)) ; \
+ }
+ #else
+ /* This uses ACM Algo 116, by R. L. Smith, 1962. */
+@@ -585,23 +585,23 @@
+ #define DIV_CONJ(c,a,b) \
+ { \
+     double r, den, ar, ai, br, bi ; \
+-    br = (b).Real ; \
+-    bi = (b).Imag ; \
+-    ar = (a).Real ; \
+-    ai = (a).Imag ; \
++    br = (b).RealPart ; \
++    bi = (b).ImagPart ; \
++    ar = (a).RealPart ; \
++    ai = (a).ImagPart ; \
+     if (SCALAR_ABS (br) >= SCALAR_ABS (bi)) \
+     { \
+         r = (-bi) / br ; \
+         den = br - r * bi ; \
+-        (c).Real = (ar + ai * r) / den ; \
+-        (c).Imag = (ai - ar * r) / den ; \
++        (c).RealPart = (ar + ai * r) / den ; \
++        (c).ImagPart = (ai - ar * r) / den ; \
+     } \
+     else \
+     { \
+         r = br / (-bi) ; \
+         den =  r * br - bi; \
+-        (c).Real = (ar * r + ai) / den ; \
+-        (c).Imag = (ai * r - ar) / den ; \
++        (c).RealPart = (ar * r + ai) / den ; \
++        (c).ImagPart = (ai * r - ar) / den ; \
+     } \
+ }
+ #endif
+@@ -611,7 +611,7 @@
+ /* approximate absolute value, s = |r|+|i| */
+ #define APPROX_ABS(s,a) \
+ { \
+-    (s) = SCALAR_ABS ((a).Real) + SCALAR_ABS ((a).Imag) ; \
++    (s) = SCALAR_ABS ((a).RealPart) + SCALAR_ABS ((a).ImagPart) ; \
+ }
+ 
+ /* -------------------------------------------------------------------------- */
+@@ -620,15 +620,15 @@
+ #ifdef MATHWORKS
+ #define ABS(s,a) \
+ { \
+-    (s) = utFdlibm_hypot ((a).Real, (a).Imag) ; \
++    (s) = utFdlibm_hypot ((a).RealPart, (a).ImagPart) ; \
+ }
+ #else
+ /* Ignore NaN case for the double relops ar>=ai and ar+ai==ar. */
+ #define ABS(s,a) \
+ { \
+     double r, ar, ai ; \
+-    ar = SCALAR_ABS ((a).Real) ; \
+-    ai = SCALAR_ABS ((a).Imag) ; \
++    ar = SCALAR_ABS ((a).RealPart) ; \
++    ai = SCALAR_ABS ((a).ImagPart) ; \
+     if (ar >= ai) \
+     { \
+         if (ar + ai == ar) \
+@@ -664,25 +664,25 @@
+ #else
+ #define PRINT_ENTRY(a) \
+ { \
+-    if (SCALAR_IS_NONZERO ((a).Real)) \
++    if (SCALAR_IS_NONZERO ((a).RealPart)) \
+     { \
+-        PRINTF ((" (%g", (a).Real)) ; \
++        PRINTF ((" (%g", (a).RealPart)) ; \
+     } \
+     else \
+     { \
+         PRINTF ((" (0")) ; \
+     } \
+-    if (SCALAR_IS_LTZERO ((a).Imag)) \
++    if (SCALAR_IS_LTZERO ((a).ImagPart)) \
+     { \
+-        PRINTF ((" - %gi)", -(a).Imag)) ; \
++        PRINTF ((" - %gi)", -(a).ImagPart)) ; \
+     } \
+-    else if (SCALAR_IS_ZERO ((a).Imag)) \
++    else if (SCALAR_IS_ZERO ((a).ImagPart)) \
+     { \
+         PRINTF ((" + 0i)")) ; \
+     } \
+     else \
+     { \
+-        PRINTF ((" + %gi)", (a).Imag)) ; \
++        PRINTF ((" + %gi)", (a).ImagPart)) ; \
+     } \
+ }
+ #endif

Added: trunk/dports/math/SuiteSparse/files/patch-SPQR-Demo-Makefile.diff
===================================================================
--- trunk/dports/math/SuiteSparse/files/patch-SPQR-Demo-Makefile.diff	                        (rev 0)
+++ trunk/dports/math/SuiteSparse/files/patch-SPQR-Demo-Makefile.diff	2013-10-28 14:08:25 UTC (rev 112626)
@@ -0,0 +1,12 @@
+--- SPQR/Demo/Makefile.orig	2013-10-24 12:27:42.000000000 -0400
++++ SPQR/Demo/Makefile	2013-10-24 12:27:57.000000000 -0400
+@@ -127,9 +127,6 @@
+ ../../CAMD/Lib/libcamd.a:
+ 	- ( cd ../../CAMD && $(MAKE) library )
+ 
+-$(METIS):
+-	( cd $(METIS_PATH) && $(MAKE) )
+-
+ library: $(CLIB)
+ 
+ purge: distclean

Added: trunk/dports/math/SuiteSparse/files/patch-SuiteSparce_config_Mac.mk.diff
===================================================================
--- trunk/dports/math/SuiteSparse/files/patch-SuiteSparce_config_Mac.mk.diff	                        (rev 0)
+++ trunk/dports/math/SuiteSparse/files/patch-SuiteSparce_config_Mac.mk.diff	2013-10-28 14:08:25 UTC (rev 112626)
@@ -0,0 +1,57 @@
+--- SuiteSparse_config/SuiteSparse_config_Mac.mk.orig	2013-10-24 11:47:48.000000000 -0400
++++ SuiteSparse_config/SuiteSparse_config_Mac.mk	2013-10-24 12:04:00.000000000 -0400
+@@ -84,8 +84,8 @@
+ # LIB = -lm
+ 
+ # For "make install"
+-INSTALL_LIB = /usr/local/lib
+-INSTALL_INCLUDE = /usr/local/include
++INSTALL_LIB = @DESTROOT@@PREFIX@/lib
++INSTALL_INCLUDE = @DESTROOT@@PREFIX@/include
+ 
+ # Which version of MAKE you are using (default is "make")
+ # MAKE = make
+@@ -108,8 +108,8 @@
+ # naming the BLAS and LAPACK library (*.a or *.so) files.
+ 
+ # This is probably slow ... it might connect to the Standard Reference BLAS:
+-BLAS = -lblas -lgfortran
+-LAPACK = -llapack
++# BLAS = -lblas -lgfortran
++# LAPACK = -llapack
+ 
+ # NOTE: this next option for the "Goto BLAS" has nothing to do with a "goto"
+ # statement.  Rather, the Goto BLAS is written by Dr. Kazushige Goto.
+@@ -164,8 +164,8 @@
+ # The path is relative to where it is used, in CHOLMOD/Lib, CHOLMOD/MATLAB, etc.
+ # You may wish to use an absolute path.  METIS is optional.  Compile
+ # CHOLMOD with -DNPARTITION if you do not wish to use METIS.
+-METIS_PATH = ../../metis-4.0
+-METIS = ../../metis-4.0/libmetis.a
++METIS_PATH = @METIS_PATH@
++METIS = @METIS@
+ 
+ #------------------------------------------------------------------------------
+ # UMFPACK configuration:
+@@ -225,7 +225,7 @@
+ # -DNSUNPERF	    for Solaris only.  If defined, do not use the Sun
+ #			Performance Library
+ 
+-CHOLMOD_CONFIG = $(GPU_CONFIG)
++CHOLMOD_CONFIG = @CHOLMOD_CONFIG@
+ 
+ # uncomment this line to compile CHOLMOD without METIS:
+ # CHOLMOD_CONFIG = -DNPARTITION
+@@ -313,9 +313,9 @@
+ # on my MacBook Air, and they work fine.
+ 
+   F77 = gfortran
+-  CF = $(CFLAGS) -O3 -fno-common -fexceptions -DNTIMER
+-  BLAS = -framework Accelerate
+-  LAPACK = -framework Accelerate
++  CF = @ARCHES@ $(CFLAGS) -O3 -fno-common -fexceptions -DNTIMER
++  BLAS = @BLAS_LAPACK@
++  LAPACK = @BLAS_LAPACK@
+   LIB = -lm
+ 
+ #------------------------------------------------------------------------------

Added: trunk/dports/math/SuiteSparse/files/patch-UMFPACK-Demo-Makefile.diff
===================================================================
--- trunk/dports/math/SuiteSparse/files/patch-UMFPACK-Demo-Makefile.diff	                        (rev 0)
+++ trunk/dports/math/SuiteSparse/files/patch-UMFPACK-Demo-Makefile.diff	2013-10-28 14:08:25 UTC (rev 112626)
@@ -0,0 +1,12 @@
+--- UMFPACK/Demo/Makefile.orig	2013-10-24 12:27:21.000000000 -0400
++++ UMFPACK/Demo/Makefile	2013-10-24 12:27:25.000000000 -0400
+@@ -80,9 +80,6 @@
+ ../../CAMD/Lib/libcamd.a:
+ 	- ( cd ../../CAMD && $(MAKE) library )
+ 
+-$(METIS):
+-	( cd $(METIS_PATH) && $(MAKE) )
+-
+ UMFPACK = ../Lib/libumfpack.a ../../AMD/Lib/libamd.a \
+     ../../SuiteSparse_config/libsuitesparseconfig.a \
+     $(LIB_WITH_CHOLMOD) $(LIB_WITH_PARTITION)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131028/c7426a4a/attachment-0001.html>


More information about the macports-changes mailing list