[88507] trunk/dports/math/SuiteSparse

eborisch at macports.org eborisch at macports.org
Tue Jan 3 10:52:16 PST 2012


Revision: 88507
          http://trac.macports.org/changeset/88507
Author:   eborisch at macports.org
Date:     2012-01-03 10:52:16 -0800 (Tue, 03 Jan 2012)
Log Message:
-----------
SuiteSparse: Upgrade to 3.7.0; Move metis (optional dep, non-distributable) into variant; Add modeline

Modified Paths:
--------------
    trunk/dports/math/SuiteSparse/Portfile

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

Modified: trunk/dports/math/SuiteSparse/Portfile
===================================================================
--- trunk/dports/math/SuiteSparse/Portfile	2012-01-03 17:38:11 UTC (rev 88506)
+++ trunk/dports/math/SuiteSparse/Portfile	2012-01-03 18:52:16 UTC (rev 88507)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
 # $Id$
 
 PortSystem 1.0
@@ -3,6 +4,5 @@
 
 name		SuiteSparse
-version     3.4.0
-revision	2
+version     3.7.0
 categories	math science
 license     GPL-2+ LGPL-2.1+
@@ -19,8 +19,6 @@
 distname	SuiteSparse-$version
 worksrcdir	${name}
 
-depends_build	port:metis
-
 use_parallel_build	no
 
 # cflags recommended for Macs in ${worksrcpath}/UFconfig/UFconfig.mk
@@ -29,11 +27,12 @@
 use_configure	no
 build.target
 
-checksums           md5     e59dcabc9173b1ba1b3659ae147006b8 \
-                    sha1    6de027d48a573659b40ddf57c10e32b39ab034c6 \
-                    rmd160  77ff7376691d2bc8581de6ae89f246cb289b2708
+checksums           md5     e7579ba6ab4265b751753649cb63664d \
+                    sha1    a1f57cb7f6bbea5d33911c6ca6acd77ba7dfa117 \
+                    rmd160  981f8645000ab880d1208a6a543dc4c0d2ae8e4c
 
-patchfiles		makefiles.patch
+patchfiles          makefiles.patch \
+                    UFconfig_UFconfig.mk-patch
 
 variant universal {}
 if {[variant_isset universal]} {
@@ -41,20 +40,27 @@
 } else {
     append configure.cflags " " ${configure.cc_archflags}
 }
+
+variant metis description { Use METIS (not distributable) } {
+    depends_build         port:metis
+    patchfiles-delete     UFconfig_UFconfig.mk-patch
+}
+
 post-patch {
-	# Metis is included with SuiteSparse, but we want to use
-	#   the MacPorts version
-	
-	# -I$(METIS_PATH)/Lib -> -I$(METIS_PATH)/include
-	reinplace \
-		"s|-I\$(METIS_PATH)/Lib|-I\$(METIS_PATH)/include|g" \
-		${worksrcpath}/CHOLMOD/Lib/Makefile
-	
-	# #include "metis.h" -> #include <metis/metis.h>
-	reinplace \
-		"s|#include \"metis.h\"|#include <metis/metis.h>|g" \
-		${worksrcpath}/CHOLMOD/Partition/cholmod_metis.c
-	
+    if {[variant_isset metis]} {
+        # Use the MacPorts version rather than extracting copy in source dir
+
+        # -I$(METIS_PATH)/Lib -> -I$(METIS_PATH)/include
+        reinplace \
+            "s|-I\$(METIS_PATH)/Lib|-I\$(METIS_PATH)/include|g" \
+            ${worksrcpath}/CHOLMOD/Lib/Makefile
+
+        # #include "metis.h" -> #include <metis/metis.h>
+        reinplace \
+            "s|#include \"metis.h\"|#include <metis/metis.h>|g" \
+            ${worksrcpath}/CHOLMOD/Partition/cholmod_metis.c
+    }
+
 	# 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" \
@@ -95,13 +101,16 @@
 	reinplace -E \
 		"s|^LAPACK = .*$|LAPACK = -framework Accelerate|g" \
 		${worksrcpath}/UFconfig/UFconfig.mk
-	reinplace -E \
-		"s|^METIS_PATH = .*$|METIS_PATH = ${prefix}|g" \
-		${worksrcpath}/UFconfig/UFconfig.mk
-	reinplace -E \
-		"s|^METIS = .*$|METIS = ${prefix}/lib/libmetis.a|g" \
-		${worksrcpath}/UFconfig/UFconfig.mk
-        reinplace "s|(CC)|(CC) \$(CFLAGS)|" ${worksrcpath}/CXSparse/Demo/Makefile
+    reinplace "s|(CC)|(CC) \$(CFLAGS)|" ${worksrcpath}/CXSparse/Demo/Makefile
+
+    if {[variant_isset metis]} {
+        reinplace -E \
+            "s|^METIS_PATH = .*$|METIS_PATH = ${prefix}|g" \
+            ${worksrcpath}/UFconfig/UFconfig.mk
+        reinplace -E \
+            "s|^METIS = .*$|METIS = ${prefix}/lib/libmetis.a|g" \
+            ${worksrcpath}/UFconfig/UFconfig.mk
+    }
 }
 
 destroot	{
@@ -126,3 +135,4 @@
 
 livecheck.type	regex
 livecheck.regex	${name}-(\\d+(\\.\\d+)*)${extract.suffix}
+

Added: trunk/dports/math/SuiteSparse/files/UFconfig_UFconfig.mk-patch
===================================================================
--- trunk/dports/math/SuiteSparse/files/UFconfig_UFconfig.mk-patch	                        (rev 0)
+++ trunk/dports/math/SuiteSparse/files/UFconfig_UFconfig.mk-patch	2012-01-03 18:52:16 UTC (rev 88507)
@@ -0,0 +1,24 @@
+--- UFconfig/UFconfig.mk.orig	2012-01-03 12:39:38.000000000 -0600
++++ UFconfig/UFconfig.mk	2012-01-03 12:41:54.000000000 -0600
+@@ -211,10 +211,10 @@
+ # -DNSUNPERF	    for Solaris only.  If defined, do not use the Sun
+ #			Performance Library
+ 
+-CHOLMOD_CONFIG =
++# CHOLMOD_CONFIG =
+ 
+ # uncomment this line to compile CHOLMOD without METIS:
+-# CHOLMOD_CONFIG = -DNPARTITION
++CHOLMOD_CONFIG = -DNPARTITION
+ 
+ #------------------------------------------------------------------------------
+ # SuiteSparseQR configuration:
+@@ -228,7 +228,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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120103/dd0b1c50/attachment.html>


More information about the macports-changes mailing list