summaryrefslogtreecommitdiff
path: root/math/chaco
diff options
context:
space:
mode:
Diffstat (limited to 'math/chaco')
-rw-r--r--math/chaco/Makefile38
-rw-r--r--math/chaco/distinfo3
-rw-r--r--math/chaco/files/patch-Makefile41
-rw-r--r--math/chaco/files/patch-main+user_params.c11
-rw-r--r--math/chaco/files/patch-util+seconds.c10
-rw-r--r--math/chaco/files/patch-util+smalloc.c11
-rw-r--r--math/chaco/pkg-descr22
-rw-r--r--math/chaco/pkg-plist16
8 files changed, 152 insertions, 0 deletions
diff --git a/math/chaco/Makefile b/math/chaco/Makefile
new file mode 100644
index 000000000000..1018fb79c2fc
--- /dev/null
+++ b/math/chaco/Makefile
@@ -0,0 +1,38 @@
+# New ports collection makefile for: Chaco
+# Date created: 26 April 2006
+# Whom: Pedro Giffuni <giffunip@asme.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= chaco
+PORTVERSION= 2.2
+CATEGORIES= math
+MASTER_SITES= http://www.cs.sandia.gov/downloads/papers/bahendr/ \
+ http://bsd1.csme.ru/myports/ \
+ http://bsd2.csme.ru/myports/ \
+ http://bsd3.csme.ru/myports/
+DISTNAME= Chaco-${PORTVERSION}
+
+MAINTAINER= giffunip@asme.org
+COMMENT= Software for Partitioning Graphs
+
+WRKSRC= ${WRKDIR}/${DISTNAME}/code
+ALL_TARGET=
+
+do-configure:
+ @${REINPLACE_CMD} -e 's+@CFLAGS@+${CFLAGS}+g' ${WRKSRC}/Makefile
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKDIR}/${DISTNAME}/exec/chaco ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/exec/libchaco.a ${PREFIX}/lib
+.ifndef NOPORTDOCS
+ @${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/doc/*.ps ${DOCSDIR}
+ ${GZIP_CMD} ${DOCSDIR}/*.ps
+ @${MKDIR} ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/exec/*.graph ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/exec/*.coords ${EXAMPLESDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/math/chaco/distinfo b/math/chaco/distinfo
new file mode 100644
index 000000000000..81aef4bef3e1
--- /dev/null
+++ b/math/chaco/distinfo
@@ -0,0 +1,3 @@
+MD5 (Chaco-2.2.tar.gz) = fa38544d73ab780fc1912cb417577fc9
+SHA256 (Chaco-2.2.tar.gz) = e7c1ab187b2dbd4b682da3dbb99097143b773f6b68b39be989442c176e9bcee1
+SIZE (Chaco-2.2.tar.gz) = 854988
diff --git a/math/chaco/files/patch-Makefile b/math/chaco/files/patch-Makefile
new file mode 100644
index 000000000000..5f7bd7630476
--- /dev/null
+++ b/math/chaco/files/patch-Makefile
@@ -0,0 +1,41 @@
+--- Makefile.orig Thu Oct 2 12:23:22 1997
++++ Makefile Mon May 1 22:19:06 2006
+@@ -1,11 +1,13 @@
+ DEST_DIR = ../exec
+ DEST= ${DEST_DIR}/chaco
+-CC = gcc
++CC ?= cc
+ IFLAG = -Imain
+-CFLAGS = -O2
+-OFLAGS = -O2
++CFLAGS = @CFLAGS@
++OFLAGS += -O2
+
+-FILES.c= main/user_params.c main/interface.c main/main.c \
++main_file= main/main.c
++
++libFILES.c= main/user_params.c main/interface.c \
+ submain/balance.c submain/divide.c submain/submain.c \
+ input/input_assign.c \
+ input/check_input.c input/input.c input/input_geom.c \
+@@ -87,11 +89,20 @@
+ util/update.c util/vecout.c util/vecran.c \
+ util/vecscale.c
+
++FILES.c= $(libFILES.c) $(main_file)
++
+ FILES.o= $(FILES.c:.c=.o)
+
++libFILES.o= $(libFILES.c:.c=.o)
++
++all: ${DEST} ${DEST_DIR}/libchaco.a
+
+ ${DEST}: ${FILES.o} Makefile
+ ${CC} ${OFLAGS} ${FILES.o} -lm -o ${DEST}
++
++${DEST_DIR}/libchaco.a: ${libFILES.o} Makefile
++ ar r ${DEST_DIR}/libchaco.a ${libFILES.o}
++ ranlib ${DEST_DIR}/libchaco.a
+
+ lint:
+ lint ${IFLAG} ${FILES.c} -lm
diff --git a/math/chaco/files/patch-main+user_params.c b/math/chaco/files/patch-main+user_params.c
new file mode 100644
index 000000000000..895c84b4be68
--- /dev/null
+++ b/math/chaco/files/patch-main+user_params.c
@@ -0,0 +1,11 @@
+--- main/user_params.c.orig Sun Apr 27 14:04:34 1997
++++ main/user_params.c Mon May 1 22:17:29 2006
+@@ -98,7 +98,7 @@
+ long RANDOM_SEED = 7654321L; /* Seed for random number generator */
+ int NSQRTS = 1000; /* # square roots to precompute if coarsening */
+ int MAKE_VWGTS = FALSE; /* Make vtx weights degrees+1? (TRUE/FALSE) */
+-int FREE_GRAPH = TRUE; /* Free input graph data? (TRUE/FALSE) */
++int FREE_GRAPH = FALSE; /* Free input graph data? (TRUE/FALSE) */
+ char *PARAMS_FILENAME = "User_Params"; /* File of parameter changes */
+
+
diff --git a/math/chaco/files/patch-util+seconds.c b/math/chaco/files/patch-util+seconds.c
new file mode 100644
index 000000000000..965e1fe1324e
--- /dev/null
+++ b/math/chaco/files/patch-util+seconds.c
@@ -0,0 +1,10 @@
+--- util/seconds.c.orig Mon May 1 16:41:39 2006
++++ util/seconds.c Mon May 1 16:42:30 2006
+@@ -2,6 +2,7 @@
+ * at Sandia National Laboratories under US Department of Energy *
+ * contract DE-AC04-76DP00789 and is copyrighted by Sandia Corporation. */
+
++#include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
+
diff --git a/math/chaco/files/patch-util+smalloc.c b/math/chaco/files/patch-util+smalloc.c
new file mode 100644
index 000000000000..475415428159
--- /dev/null
+++ b/math/chaco/files/patch-util+smalloc.c
@@ -0,0 +1,11 @@
+--- util/smalloc.c.orig Thu Apr 13 21:02:05 2006
++++ util/smalloc.c Thu Apr 13 21:02:47 2006
+@@ -3,7 +3,7 @@
+ * contract DE-AC04-76DP00789 and is copyrighted by Sandia Corporation. */
+
+ #include <stdio.h>
+-#include <malloc.h>
++#include <stdlib.h>
+
+ static int nmalloc = 0; /* number of calls to malloc */
+ static int nfree = 0; /* number of calls to free */
diff --git a/math/chaco/pkg-descr b/math/chaco/pkg-descr
new file mode 100644
index 000000000000..29e481b8f3c5
--- /dev/null
+++ b/math/chaco/pkg-descr
@@ -0,0 +1,22 @@
+Before a calculation can be performed on a parallel computer, it must first be
+decomposed into tasks which are assigned to different processors. Efficient use
+of the machine requires that each processor have about the same amount of work
+to do and that the quantity of interprocessor communication is kept small.
+Finding an optimal decomposition is provably hard, but due to its practical
+importance, a great deal of effort has been devoted to developing heuristics
+for this problem.
+The decomposition problem can be addressed in terms of graph partitioning. Rob
+Leland and I have developed a variety of algorithms for graph partitioning and
+implemented them into a package we call Chaco. The code is being used at most
+of the major parallel computing centers around the world to simplify the
+development of parallel applications, and to ensure that high performance is
+obtained. Chaco has contributed to a wide variety of computational studies
+including investigation of the molecular structure of liquid crystals,
+evaluating the design of a chemical vapor deposition reactor and modeling
+automobile collisions.
+
+WWW: http://www.cs.sandia.gov/~bahendr/chaco.html
+___
+Bruce Hendrickson
+
+Note: this port includes a patch provided by Walter Landry for use within MBDyn
diff --git a/math/chaco/pkg-plist b/math/chaco/pkg-plist
new file mode 100644
index 000000000000..1b3f72a019df
--- /dev/null
+++ b/math/chaco/pkg-plist
@@ -0,0 +1,16 @@
+bin/chaco
+lib/libchaco.a
+%%PORTDOCS%%%%DOCSDIR%%/Empirical.ps.gz
+%%PORTDOCS%%%%DOCSDIR%%/Multilevel.ps.gz
+%%PORTDOCS%%%%DOCSDIR%%/Spectral_Overview.ps.gz
+%%PORTDOCS%%%%DOCSDIR%%/Spectral_Theory.ps.gz
+%%PORTDOCS%%%%DOCSDIR%%/Term_Prop.ps.gz
+%%PORTDOCS%%%%DOCSDIR%%/Users_Guide.ps.gz
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+%%PORTDOCS%%%%EXAMPLESDIR%%/film.coords
+%%PORTDOCS%%%%EXAMPLESDIR%%/film.graph
+%%PORTDOCS%%%%EXAMPLESDIR%%/grid20x20.coords
+%%PORTDOCS%%%%EXAMPLESDIR%%/grid20x20.graph
+%%PORTDOCS%%%%EXAMPLESDIR%%/hammond.coords
+%%PORTDOCS%%%%EXAMPLESDIR%%/hammond.graph
+%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%