summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2008-03-27 19:04:35 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2008-03-27 19:04:35 +0000
commit8decafda37fa98ea37644654f7c8a8f24388803d (patch)
treed3abe2daa8601ce8daa72e0b5651235fca8394b4 /sci-libs/metis
parentInitial import. Thankss Oliver Borm for his work and everyone else in bug #49... (diff)
downloadgentoo-2-8decafda37fa98ea37644654f7c8a8f24388803d.tar.gz
gentoo-2-8decafda37fa98ea37644654f7c8a8f24388803d.tar.bz2
gentoo-2-8decafda37fa98ea37644654f7c8a8f24388803d.zip
Added pkg-config files in patch, removed slot, added blocking for parmetis. See bug #49953. Removed incompatible versions.
(Portage version: 2.1.4.4)
Diffstat (limited to 'sci-libs/metis')
-rw-r--r--sci-libs/metis/ChangeLog11
-rw-r--r--sci-libs/metis/files/metis-4.0.1-autotools.patch58
-rw-r--r--sci-libs/metis/files/metis-5.0_pre2-autotools.patch528
-rw-r--r--sci-libs/metis/metis-4.0.1-r1.ebuild (renamed from sci-libs/metis/metis-4.0.1.ebuild)6
-rw-r--r--sci-libs/metis/metis-5.0_pre2-r1.ebuild (renamed from sci-libs/metis/metis-5.0_pre2.ebuild)7
5 files changed, 135 insertions, 475 deletions
diff --git a/sci-libs/metis/ChangeLog b/sci-libs/metis/ChangeLog
index 579eb82312b8..cc01adf3811c 100644
--- a/sci-libs/metis/ChangeLog
+++ b/sci-libs/metis/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sci-libs/metis
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/metis/ChangeLog,v 1.1 2008/02/05 17:55:29 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/metis/ChangeLog,v 1.2 2008/03/27 19:04:34 bicatali Exp $
+
+*metis-5.0_pre2-r1 (27 Mar 2008)
+*metis-4.0.1-r1 (27 Mar 2008)
+
+ 27 Mar 2008; Sébastien Fabbro <bicatali@gentoo.org>
+ files/metis-4.0.1-autotools.patch, files/metis-5.0_pre2-autotools.patch,
+ +metis-4.0.1-r1.ebuild, +metis-5.0_pre2-r1.ebuild:
+ Added pkg-config files in patch, removed slot, added blocking for
+ parmetis. See bug #49953
*metis-5.0_pre2 (05 Feb 2008)
*metis-4.0.1 (05 Feb 2008)
diff --git a/sci-libs/metis/files/metis-4.0.1-autotools.patch b/sci-libs/metis/files/metis-4.0.1-autotools.patch
index 4b2c7f9b1e88..11453cdf8889 100644
--- a/sci-libs/metis/files/metis-4.0.1-autotools.patch
+++ b/sci-libs/metis/files/metis-4.0.1-autotools.patch
@@ -1,18 +1,44 @@
--- configure.ac 1970-01-01 01:00:00.000000000 +0100
-+++ configure.ac 2008-01-30 21:47:22.597386731 +0000
-@@ -0,0 +1,9 @@
++++ configure.ac 2008-03-25 10:05:57.090715324 +0000
+@@ -0,0 +1,14 @@
+# -*- Autoconf -*-
+AC_PREREQ(2.59)
-+AC_INIT(metis,4.0.1,karypis@cs.umn.edu)
++AC_INIT(metis, 4.0.1, karypis@cs.umn.edu)
+AM_INIT_AUTOMAKE([foreign])
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+AC_CHECK_LIB(m, sqrt)
-+AC_CONFIG_FILES([Makefile Lib/Makefile Programs/Makefile Test/Makefile])
++AC_CONFIG_FILES([
++ Makefile
++ metis.pc
++ Lib/Makefile
++ Programs/Makefile\
++ Test/Makefile])
+AC_OUTPUT
---- ./Lib/Makefile.am 1970-01-01 01:00:00.000000000 +0100
-+++ ./Lib/Makefile.am 2008-01-31 15:03:42.814421420 +0000
-@@ -0,0 +1,16 @@
+--- metis.pc.in 1970-01-01 01:00:00.000000000 +0100
++++ metis.pc.in 2008-02-15 14:45:09.378997263 +0000
+@@ -0,0 +1,10 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: METIS
++Description: Software for partioning unstructured graphes and meshes
++Version: @VERSION@
++Libs: -L${libdir} -lmetis
++Cflags: -I${includedir}
+--- Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ Makefile.am 2008-02-15 14:46:16.578826763 +0000
+@@ -0,0 +1,5 @@
++SUBDIRS = Lib Programs Test
++EXTRA_DIST = CHANGES VERSION metis.pc.in
++
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = metis.pc
+--- Lib/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ Lib/Makefile.am 2008-03-25 10:06:10.719491984 +0000
+@@ -0,0 +1,15 @@
+include_HEADERS = defs.h macros.h metis.h proto.h rename.h struct.h
+pkgincludedir = $(includedir)/metis
+lib_LTLIBRARIES = libmetis.la
@@ -27,10 +53,9 @@
+ mrefine.c mutil.c mfm.c mkmetis.c mkwayrefine.c mkwayfmh.c \
+ mrefine2.c minitpart2.c mbalance2.c mfm2.c \
+ kvmetis.c kwayvolrefine.c kwayvolfm.c subdomains.c
-+libmetis_la_LIBADD = -lm
-+libmetis_la_LDFLAGS = -no-undefined -version-info 4:0:0
---- ./Programs/Makefile.am 1970-01-01 01:00:00.000000000 +0100
-+++ ./Programs/Makefile.am 2008-01-31 12:00:14.981124649 +0000
++libmetis_la_LDFLAGS = -no-undefined -version-info 4:0:0
+--- Programs/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ Programs/Makefile.am 2008-01-31 12:00:14.981124649 +0000
@@ -0,0 +1,15 @@
+AM_CPPFLAGS = -I$(top_srcdir)/Lib
+LDADD = $(top_builddir)/Lib/libmetis.la -lm
@@ -47,8 +72,8 @@
+partdmesh_SOURCES = partdmesh.c io.c
+partnmesh_SOURCES = partnmesh.c io.c
+graphchk_SOURCES = graphchk.c io.c
---- ./Test/Makefile.am 1970-01-01 01:00:00.000000000 +0100
-+++ ./Test/Makefile.am 2008-01-31 12:37:59.532517099 +0000
+--- Test/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ Test/Makefile.am 2008-01-31 12:37:59.532517099 +0000
@@ -0,0 +1,7 @@
+AM_CPPFLAGS = -I$(top_srcdir)/Lib
+LDADD = $(top_builddir)/Lib/libmetis.la -lm
@@ -57,10 +82,3 @@
+
+check-local: $(check_PROGRAMS)
+ - ./mtest ../Graphs/4elt.graph
---- ./Makefile.am 1970-01-01 01:00:00.000000000 +0100
-+++ ./Makefile.am 2008-01-30 21:15:58.990578962 +0000
-@@ -0,0 +1,4 @@
-+SUBDIRS = Lib Programs Test
-+EXTRA_DIST = CHANGES
-+
-+
diff --git a/sci-libs/metis/files/metis-5.0_pre2-autotools.patch b/sci-libs/metis/files/metis-5.0_pre2-autotools.patch
index 8bbce5d0db1b..64d7ecd9ab16 100644
--- a/sci-libs/metis/files/metis-5.0_pre2-autotools.patch
+++ b/sci-libs/metis/files/metis-5.0_pre2-autotools.patch
@@ -1,12 +1,13 @@
--- configure.ac 1970-01-01 01:00:00.000000000 +0100
-+++ configure.ac 2007-09-24 15:12:11.917289395 +0100
-@@ -0,0 +1,54 @@
++++ configure.ac 2008-03-25 11:07:24.560995022 +0000
+@@ -0,0 +1,53 @@
++# -*- Autoconf -*-
++AC_PREREQ(2.59)
+AC_INIT([metis], [5.0pre2], [metis@cs.umn.edu], [metis])
+AM_INIT_AUTOMAKE([foreign])
+
+AC_PROG_MAKE_SET
+AC_PROG_LIBTOOL
-+
+AC_CHECK_LIB(m, [sqrt, pow, log])
+
+AC_ARG_ENABLE(openmp,
@@ -15,20 +16,18 @@
+ [enable_openmp=$enableval],
+ [enable_openmp="yes"])
+AC_MSG_RESULT($enable_openmp)
-+
+if test x$enable_openmp = xyes; then
+ AC_CHECK_HEADERS(omp.h)
+ OMP_CPPFLAGS=-D__OPENMP__
+ if test x$CC = xicc; then
+ OMP_CFLAGS="-openmp -openmp-report2"
-+ OMP_LDFLAGS=-openmp
++ OMP_LIBS=-openmp
+ else
+ OMP_CFLAGS=-fopenmp
-+ OMP_LDFLAGS=-lgomp
++ OMP_LIBS=-lgomp
+ fi
+fi
+
-+# very basic pcre check
+AC_ARG_ENABLE(pcre,
+ [AC_HELP_STRING([--enable-pcre],
+ [Enable PCRE regex support])],
@@ -43,26 +42,68 @@
+ AC_CHECK_HEADERS(pcre.h)
+ PCRE="yes"
+ PCRE_CPPFLAGS=-D__WITHPCRE__
-+ PCRE_LDFLAGS=-lpcre
++ PCRE_LIBS=-lpcre
+ fi
+fi
+
-+AC_CONFIG_FILES( \
-+ Makefile \
-+ GKlib/trunk/Makefile \
-+ libmetis/Makefile \
-+ programs/Makefile \
-+ test/Makefile
-+)
++AC_CONFIG_FILES([
++ Makefile
++ metis.pc
++ GKlib/trunk/Makefile
++ libmetis/Makefile
++ programs/Makefile
++ test/Makefile])
+AC_OUTPUT
---- Makefile.am 1970-01-01 01:00:00.000000000 +0100
-+++ Makefile.am 2007-09-24 15:12:11.921289623 +0100
-@@ -0,0 +1,3 @@
-+SUBDIRS = GKlib/trunk libmetis programs test
-+EXTRA_DIST = CHANGES.v4 CHANGES.v5
-+include_HEADERS = include/metis.h
---- GKlib/trunk/Makefile.am 1970-01-01 01:00:00.000000000 +0100
-+++ GKlib/trunk/Makefile.am 2007-09-24 15:12:11.949291219 +0100
+--- metis.pc.in 1970-01-01 01:00:00.000000000 +0100
++++ metis.pc.in 2008-03-25 11:07:04.387845420 +0000
+@@ -0,0 +1,10 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: METIS
++Description: Software for partioning unstructured graphes and meshes
++Version: @VERSION@
++Libs: -L${libdir} -lmetis
++Cflags: -I${includedir}
+--- ./test/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ ./test/Makefile.am 2008-03-25 11:07:04.387845420 +0000
+@@ -0,0 +1,10 @@
++AM_CPPFLAGS = \
++ -I$(top_srcdir)/include \
++ -I$(top_srcdir)/libmetis \
++ -I$(top_srcdir)/programs \
++ -I$(top_srcdir)/GKlib/trunk \
++ -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64
++
++check_PROGRAMS = mtest
++mtest_SOURCES = mtest.c $(top_srcdir)/programs/io.c
++mtest_LDADD = $(top_builddir)/libmetis/libmetis.la
+--- ./programs/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ ./programs/Makefile.am 2008-03-25 11:07:04.387845420 +0000
+@@ -0,0 +1,19 @@
++AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/GKlib/trunk -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64
++bin_PROGRAMS = cmetis graphchk kfmetis kmetis mesh2dual mesh2nodal metis \
++ oemetis onmetis partdmesh partnmesh pmetis
++
++# Differing from upstream, a lot of these get smbfactor.c as we need
++# ComputeFillIn2, which is referenced in proto.h <- metisbin.h
++LDADD = $(top_builddir)/libmetis/libmetis.la
++cmetis_SOURCES = cmetis.c io.c cmdline_cmetis.c
++graphchk_SOURCES = graphchk.c io.c
++kfmetis_SOURCES = kfmetis.c io.c cmdline_kfmetis.c
++kmetis_SOURCES = kmetis.c io.c
++mesh2dual_SOURCES = mesh2dual.c io.c
++mesh2nodal_SOURCES = mesh2nodal.c io.c
++metis_SOURCES = metis.c io.c
++oemetis_SOURCES = oemetis.c io.c
++onmetis_SOURCES = onmetis.c io.c
++partdmesh_SOURCES = partdmesh.c io.c
++partnmesh_SOURCES = partnmesh.c io.c
++pmetis_SOURCES = pmetis.c io.c cmdline_pmetis.c
+--- ./GKlib/trunk/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ ./GKlib/trunk/Makefile.am 2008-03-25 11:07:04.387845420 +0000
@@ -0,0 +1,26 @@
+AM_CPPFLAGS = -DLINUX -D_FILE_OFFSET_BITS=6 $(PCRE_CPPFLAGS) $(OMP_CPPFLAGS)
+AM_CFLAGS = -std=c99 $(OMP_CFLAGS)
@@ -90,398 +131,14 @@
+ tokenizer.c \
+ util.c
+libgklib_la_LIBADD = $(OMP_LDFLAGS) $(PCRE_LDFLAGS)
---- libmetis/smbfactor.c 1970-01-01 01:00:00.000000000 +0100
-+++ libmetis/smbfactor.c 2007-09-24 15:12:11.949291219 +0100
-@@ -0,0 +1,385 @@
-+/*
-+ * Copyright 1997, Regents of the University of Minnesota
-+ *
-+ * smbfactor.c
-+ *
-+ * This file performs the symbolic factorization of a matrix
-+ *
-+ * Started 8/1/97
-+ * George
-+ *
-+ * $Id: metis-5.0_pre2-autotools.patch,v 1.1 2008/02/05 17:55:30 bicatali Exp $
-+ *
-+ */
-+
-+#include <metislib.h>
-+
-+
-+/*************************************************************************
-+* This function sets up data structures for fill-in computations
-+**************************************************************************/
-+void ComputeFillIn(GraphType *graph, idxtype *iperm)
-+{
-+ idxtype i, j, k, nvtxs, maxlnz, maxsub;
-+ idxtype *xadj, *adjncy;
-+ idxtype *perm, *xlnz, *xnzsub, *nzsub;
-+ double opc;
-+
-+/*
-+ mprintf("\nSymbolic factorization... --------------------------------------------\n");
-+*/
-+
-+ nvtxs = graph->nvtxs;
-+ xadj = graph->xadj;
-+ adjncy = graph->adjncy;
-+
-+ maxsub = 4*xadj[nvtxs];
-+
-+ /* Relabel the vertices so that it starts from 1 */
-+ k = xadj[nvtxs];
-+ for (i=0; i<k; i++)
-+ adjncy[i]++;
-+ for (i=0; i<nvtxs+1; i++)
-+ xadj[i]++;
-+
-+ /* Allocate the required memory */
-+ perm = idxmalloc(nvtxs+1, "ComputeFillIn: perm");
-+ xlnz = idxmalloc(nvtxs+1, "ComputeFillIn: xlnz");
-+ xnzsub = idxmalloc(nvtxs+1, "ComputeFillIn: xnzsub");
-+ nzsub = idxmalloc(maxsub, "ComputeFillIn: nzsub");
-+
-+ /* Construct perm from iperm and change the numbering of iperm */
-+ for (i=0; i<nvtxs; i++)
-+ perm[iperm[i]] = i;
-+ for (i=0; i<nvtxs; i++) {
-+ iperm[i]++;
-+ perm[i]++;
-+ }
-+
-+ /*
-+ * Call sparspak routine.
-+ */
-+ if (smbfct(nvtxs, xadj, adjncy, perm, iperm, xlnz, &maxlnz, xnzsub, nzsub, &maxsub)) {
-+ gk_free((void **)&nzsub, LTERM);
-+
-+ maxsub = 4*maxsub;
-+ nzsub = idxmalloc(maxsub, "ComputeFillIn: nzsub");
-+ if (smbfct(nvtxs, xadj, adjncy, perm, iperm, xlnz, &maxlnz, xnzsub, nzsub, &maxsub))
-+ errexit("MAXSUB is too small!");
-+ }
-+
-+ opc = 0;
-+ for (i=0; i<nvtxs; i++)
-+ xlnz[i]--;
-+ for (i=0; i<nvtxs; i++)
-+ opc += (xlnz[i+1]-xlnz[i])*(xlnz[i+1]-xlnz[i]) - (xlnz[i+1]-xlnz[i]);
-+
-+ mprintf(" Nonzeros: %D, \tOperation Count: %6.4le\n", maxlnz, opc);
-+
-+
-+ gk_free((void **)&perm, &xlnz, &xnzsub, &nzsub, LTERM);
-+
-+
-+ /* Relabel the vertices so that it starts from 0 */
-+ for (i=0; i<nvtxs; i++)
-+ iperm[i]--;
-+ for (i=0; i<nvtxs+1; i++)
-+ xadj[i]--;
-+ k = xadj[nvtxs];
-+ for (i=0; i<k; i++)
-+ adjncy[i]--;
-+
-+}
-+
-+
-+
-+/*************************************************************************
-+* This function sets up data structures for fill-in computations
-+**************************************************************************/
-+idxtype ComputeFillIn2(GraphType *graph, idxtype *iperm)
-+{
-+ idxtype i, j, k, nvtxs, maxlnz, maxsub;
-+ idxtype *xadj, *adjncy;
-+ idxtype *perm, *xlnz, *xnzsub, *nzsub;
-+ double opc;
-+
-+ nvtxs = graph->nvtxs;
-+ xadj = graph->xadj;
-+ adjncy = graph->adjncy;
-+
-+ maxsub = 4*xadj[nvtxs];
-+
-+ /* Relabel the vertices so that it starts from 1 */
-+ k = xadj[nvtxs];
-+ for (i=0; i<k; i++)
-+ adjncy[i]++;
-+ for (i=0; i<nvtxs+1; i++)
-+ xadj[i]++;
-+
-+ /* Allocate the required memory */
-+ perm = idxmalloc(nvtxs+1, "ComputeFillIn: perm");
-+ xlnz = idxmalloc(nvtxs+1, "ComputeFillIn: xlnz");
-+ xnzsub = idxmalloc(nvtxs+1, "ComputeFillIn: xnzsub");
-+ nzsub = idxmalloc(maxsub, "ComputeFillIn: nzsub");
-+
-+ /* Construct perm from iperm and change the numbering of iperm */
-+ for (i=0; i<nvtxs; i++)
-+ perm[iperm[i]] = i;
-+ for (i=0; i<nvtxs; i++) {
-+ iperm[i]++;
-+ perm[i]++;
-+ }
-+
-+ /*
-+ * Call sparspak routine.
-+ */
-+ if (smbfct(nvtxs, xadj, adjncy, perm, iperm, xlnz, &maxlnz, xnzsub, nzsub, &maxsub)) {
-+ gk_free((void **)&nzsub, LTERM);
-+
-+ maxsub = 4*maxsub;
-+ nzsub = idxmalloc(maxsub, "ComputeFillIn: nzsub");
-+ if (smbfct(nvtxs, xadj, adjncy, perm, iperm, xlnz, &maxlnz, xnzsub, nzsub, &maxsub))
-+ errexit("MAXSUB is too small!");
-+ }
-+
-+ opc = 0;
-+ for (i=0; i<nvtxs; i++)
-+ xlnz[i]--;
-+ for (i=0; i<nvtxs; i++)
-+ opc += (xlnz[i+1]-xlnz[i])*(xlnz[i+1]-xlnz[i]) - (xlnz[i+1]-xlnz[i]);
-+
-+
-+ gk_free((void **)&perm, &xlnz, &xnzsub, &nzsub, LTERM);
-+
-+
-+ /* Relabel the vertices so that it starts from 0 */
-+ for (i=0; i<nvtxs; i++)
-+ iperm[i]--;
-+ for (i=0; i<nvtxs+1; i++)
-+ xadj[i]--;
-+ k = xadj[nvtxs];
-+ for (i=0; i<k; i++)
-+ adjncy[i]--;
-+
-+ return maxlnz;
-+
-+}
-+
-+
-+/*****************************************************************
-+********** SMBFCT ..... SYMBOLIC FACTORIZATION *********
-+******************************************************************
-+* PURPOSE - THIS ROUTINE PERFORMS SYMBOLIC FACTORIZATION
-+* ON A PERMUTED LINEAR SYSTEM AND IT ALSO SETS UP THE
-+* COMPRESSED DATA STRUCTURE FOR THE SYSTEM.
-+*
-+* INPUT PARAMETERS -
-+* NEQNS - NUMBER OF EQUATIONS.
-+* (XADJ, ADJNCY) - THE ADJACENCY STRUCTURE.
-+* (PERM, INVP) - THE PERMUTATION VECTOR AND ITS INVERSE.
-+*
-+* UPDATED PARAMETERS -
-+* MAXSUB - SIZE OF THE SUBSCRIPT ARRAY NZSUB. ON RETURN,
-+* IT CONTAINS THE NUMBER OF SUBSCRIPTS USED
-+*
-+* OUTPUT PARAMETERS -
-+* XLNZ - INDEX INTO THE NONZERO STORAGE VECTOR LNZ.
-+* (XNZSUB, NZSUB) - THE COMPRESSED SUBSCRIPT VECTORS.
-+* MAXLNZ - THE NUMBER OF NONZEROS FOUND.
-+*
-+*******************************************************************/
-+idxtype smbfct(idxtype neqns, idxtype *xadj, idxtype *adjncy, idxtype *perm, idxtype *invp,
-+ idxtype *xlnz, idxtype *maxlnz, idxtype *xnzsub, idxtype *nzsub, idxtype *maxsub)
-+{
-+ /* Local variables */
-+ idxtype node, rchm, mrgk, lmax, i, j, k, m, nabor, nzbeg, nzend;
-+ idxtype kxsub, jstop, jstrt, mrkflg, inz, knz, flag;
-+ idxtype *mrglnk, *marker, *rchlnk;
-+
-+ rchlnk = idxmalloc(neqns+1, "smbfct: rchlnk");
-+ marker = idxsmalloc(neqns+1, 0, "smbfct: marker");
-+ mrglnk = idxsmalloc(neqns+1, 0, "smbfct: mgrlnk");
-+
-+ /* Parameter adjustments */
-+ --marker;
-+ --mrglnk;
-+ --rchlnk;
-+ --nzsub;
-+ --xnzsub;
-+ --xlnz;
-+ --invp;
-+ --perm;
-+ --adjncy;
-+ --xadj;
-+
-+ /* Function Body */
-+ flag = 0;
-+ nzbeg = 1;
-+ nzend = 0;
-+ xlnz[1] = 1;
-+
-+ /* FOR EACH COLUMN KNZ COUNTS THE NUMBER OF NONZEROS IN COLUMN K ACCUMULATED IN RCHLNK. */
-+ for (k = 1; k <= neqns; ++k) {
-+ knz = 0;
-+ mrgk = mrglnk[k];
-+ mrkflg = 0;
-+ marker[k] = k;
-+ if (mrgk != 0)
-+ marker[k] = marker[mrgk];
-+ xnzsub[k] = nzend;
-+ node = perm[k];
-+
-+ if (xadj[node] >= xadj[node+1]) {
-+ xlnz[k+1] = xlnz[k];
-+ continue;
-+ }
-+
-+ /* USE RCHLNK TO LINK THROUGH THE STRUCTURE OF A(*,K) BELOW DIAGONAL */
-+ rchlnk[k] = neqns+1;
-+ for (j=xadj[node]; j<xadj[node+1]; j++) {
-+ nabor = invp[adjncy[j]];
-+ if (nabor <= k)
-+ continue;
-+ rchm = k;
-+
-+ do {
-+ m = rchm;
-+ rchm = rchlnk[m];
-+ } while (rchm <= nabor);
-+
-+ knz++;
-+ rchlnk[m] = nabor;
-+ rchlnk[nabor] = rchm;
-+ if (marker[nabor] != marker[k])
-+ mrkflg = 1;
-+ }
-+
-+ /* TEST FOR MASS SYMBOLIC ELIMINATION */
-+ lmax = 0;
-+ if (mrkflg != 0 || mrgk == 0 || mrglnk[mrgk] != 0)
-+ goto L350;
-+ xnzsub[k] = xnzsub[mrgk] + 1;
-+ knz = xlnz[mrgk + 1] - (xlnz[mrgk] + 1);
-+ goto L1400;
-+
-+
-+ /* LINK THROUGH EACH COLUMN I THAT AFFECTS L(*,K) */
-+L350:
-+ i = k;
-+ while ((i = mrglnk[i]) != 0) {
-+ inz = xlnz[i+1] - (xlnz[i]+1);
-+ jstrt = xnzsub[i] + 1;
-+ jstop = xnzsub[i] + inz;
-+
-+ if (inz > lmax) {
-+ lmax = inz;
-+ xnzsub[k] = jstrt;
-+ }
-+
-+ /* MERGE STRUCTURE OF L(*,I) IN NZSUB INTO RCHLNK. */
-+ rchm = k;
-+ for (j = jstrt; j <= jstop; ++j) {
-+ nabor = nzsub[j];
-+ do {
-+ m = rchm;
-+ rchm = rchlnk[m];
-+ } while (rchm < nabor);
-+
-+ if (rchm != nabor) {
-+ knz++;
-+ rchlnk[m] = nabor;
-+ rchlnk[nabor] = rchm;
-+ rchm = nabor;
-+ }
-+ }
-+ }
-+
-+ /* CHECK IF SUBSCRIPTS DUPLICATE THOSE OF ANOTHER COLUMN */
-+ if (knz == lmax)
-+ goto L1400;
-+
-+ /* OR IF TAIL OF K-1ST COLUMN MATCHES HEAD OF KTH */
-+ if (nzbeg > nzend)
-+ goto L1200;
-+
-+ i = rchlnk[k];
-+ for (jstrt = nzbeg; jstrt <= nzend; ++jstrt) {
-+ if (nzsub[jstrt] < i)
-+ continue;
-+
-+ if (nzsub[jstrt] == i)
-+ goto L1000;
-+ else
-+ goto L1200;
-+ }
-+ goto L1200;
-+
-+L1000:
-+ xnzsub[k] = jstrt;
-+ for (j = jstrt; j <= nzend; ++j) {
-+ if (nzsub[j] != i)
-+ goto L1200;
-+
-+ i = rchlnk[i];
-+ if (i > neqns)
-+ goto L1400;
-+ }
-+ nzend = jstrt - 1;
-+
-+ /* COPY THE STRUCTURE OF L(*,K) FROM RCHLNK TO THE DATA STRUCTURE (XNZSUB, NZSUB) */
-+L1200:
-+ nzbeg = nzend + 1;
-+ nzend += knz;
-+
-+ if (nzend > *maxsub) {
-+ flag = 1; /* Out of memory */
-+ break;
-+ }
-+
-+ i = k;
-+ for (j=nzbeg; j<=nzend; ++j) {
-+ i = rchlnk[i];
-+ nzsub[j] = i;
-+ marker[i] = k;
-+ }
-+ xnzsub[k] = nzbeg;
-+ marker[k] = k;
-+
-+ /*
-+ * UPDATE THE VECTOR MRGLNK. NOTE COLUMN L(*,K) JUST FOUND
-+ * IS REQUIRED TO DETERMINE COLUMN L(*,J), WHERE
-+ * L(J,K) IS THE FIRST NONZERO IN L(*,K) BELOW DIAGONAL.
-+ */
-+L1400:
-+ if (knz > 1) {
-+ kxsub = xnzsub[k];
-+ i = nzsub[kxsub];
-+ mrglnk[k] = mrglnk[i];
-+ mrglnk[i] = k;
-+ }
-+
-+ xlnz[k + 1] = xlnz[k] + knz;
-+ }
-+
-+ if (flag == 0) {
-+ *maxlnz = xlnz[neqns] - 1;
-+ *maxsub = xnzsub[neqns];
-+ xnzsub[neqns + 1] = xnzsub[neqns];
-+ }
-+
-+ marker++;
-+ mrglnk++;
-+ rchlnk++;
-+ nzsub++;
-+ xnzsub++;
-+ xlnz++;
-+ invp++;
-+ perm++;
-+ adjncy++;
-+ xadj++;
-+ gk_free((void **)&rchlnk, &mrglnk, &marker, LTERM);
-+
-+ return flag;
-+
-+}
+--- ./libmetis/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ ./libmetis/Makefile.am 2008-03-25 11:07:04.387845420 +0000
+@@ -0,0 +1,20 @@
++AM_CPPFLAGS = \
++ -I$(top_srcdir)/include \
++ -I$(top_srcdir)/GKlib/trunk \
++ -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64
+
---- libmetis/Makefile.am 1970-01-01 01:00:00.000000000 +0100
-+++ libmetis/Makefile.am 2007-09-24 15:12:11.933290307 +0100
-@@ -0,0 +1,16 @@
-+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/GKlib/trunk -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64
+lib_LTLIBRARIES = libmetis.la
+libmetis_la_SOURCES= \
+ balance.c bucketsort.c ccgraph.c checkgraph.c cmetis.c \
@@ -495,40 +152,11 @@
+ pmetis.c pqueue.c refine.c rkmetis.c separator.c sfm.c \
+ srefine.c stat.c streamio.c subdomains.c timing.c util.c \
+ smbfactor.c
-+
+libmetis_la_LIBADD = $(top_builddir)/GKlib/trunk/libgklib.la
---- programs/Makefile.am 1970-01-01 01:00:00.000000000 +0100
-+++ programs/Makefile.am 2007-09-24 15:12:11.933290307 +0100
-@@ -0,0 +1,19 @@
-+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/GKlib/trunk -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64
-+bin_PROGRAMS = cmetis graphchk kfmetis kmetis mesh2dual mesh2nodal metis \
-+ oemetis onmetis partdmesh partnmesh pmetis
-+
-+# Differing from upstream, a lot of these get smbfactor.c as we need
-+# ComputeFillIn2, which is referenced in proto.h <- metisbin.h
-+LDADD = $(top_builddir)/libmetis/libmetis.la
-+cmetis_SOURCES = cmetis.c io.c cmdline_cmetis.c
-+graphchk_SOURCES = graphchk.c io.c
-+kfmetis_SOURCES = kfmetis.c io.c cmdline_kfmetis.c
-+kmetis_SOURCES = kmetis.c io.c
-+mesh2dual_SOURCES = mesh2dual.c io.c
-+mesh2nodal_SOURCES = mesh2nodal.c io.c
-+metis_SOURCES = metis.c io.c
-+oemetis_SOURCES = oemetis.c io.c
-+onmetis_SOURCES = onmetis.c io.c
-+partdmesh_SOURCES = partdmesh.c io.c
-+partnmesh_SOURCES = partnmesh.c io.c
-+pmetis_SOURCES = pmetis.c io.c cmdline_pmetis.c
---- test/Makefile.am 1970-01-01 01:00:00.000000000 +0100
-+++ test/Makefile.am 2007-09-24 15:45:23.683980202 +0100
-@@ -0,0 +1,10 @@
-+AM_CPPFLAGS = \
-+ -I$(top_srcdir)/include \
-+ -I$(top_srcdir)/libmetis \
-+ -I$(top_srcdir)/programs \
-+ -I$(top_srcdir)/GKlib/trunk \
-+ -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64
-+
-+check_PROGRAMS = mtest
-+mtest_SOURCES = mtest.c $(top_srcdir)/programs/io.c
-+mtest_LDADD = $(top_builddir)/libmetis/libmetis.la
++libmetis_la_LDFLAGS = -no-undefined -version-info 5:0:0
+--- ./Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ ./Makefile.am 2008-03-25 11:07:04.387845420 +0000
+@@ -0,0 +1,3 @@
++SUBDIRS = GKlib/trunk libmetis programs test
++EXTRA_DIST = CHANGES.v4 CHANGES.v5
++include_HEADERS = include/metis.h
diff --git a/sci-libs/metis/metis-4.0.1.ebuild b/sci-libs/metis/metis-4.0.1-r1.ebuild
index 3b9dc41a69d6..9675c450dd04 100644
--- a/sci-libs/metis/metis-4.0.1.ebuild
+++ b/sci-libs/metis/metis-4.0.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/metis/metis-4.0.1.ebuild,v 1.1 2008/02/05 17:55:29 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/metis/metis-4.0.1-r1.ebuild,v 1.1 2008/03/27 19:04:34 bicatali Exp $
inherit autotools eutils
@@ -13,9 +13,11 @@ KEYWORDS="~amd64 ~x86"
LICENSE="free-noncomm"
IUSE="doc"
-SLOT="4"
+SLOT="0"
DEPEND=""
+RDEPEND="!sci-libs/parmetis"
+
S="${WORKDIR}/${MYP}"
src_unpack() {
diff --git a/sci-libs/metis/metis-5.0_pre2.ebuild b/sci-libs/metis/metis-5.0_pre2-r1.ebuild
index 47aa743d8df6..cf1dadaa56e1 100644
--- a/sci-libs/metis/metis-5.0_pre2.ebuild
+++ b/sci-libs/metis/metis-5.0_pre2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/metis/metis-5.0_pre2.ebuild,v 1.2 2008/02/05 22:27:24 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/metis/metis-5.0_pre2-r1.ebuild,v 1.1 2008/03/27 19:04:34 bicatali Exp $
inherit autotools eutils
@@ -14,11 +14,14 @@ KEYWORDS="~amd64 ~x86"
LICENSE="free-noncomm"
IUSE="pcre openmp int64 threads"
-SLOT="5"
+SLOT="0"
DEPEND="pcre? ( dev-libs/libpcre )
openmp? ( || ( >=sys-devel/gcc-4.2 >=dev-lang/icc-9 ) )"
+RDEPEND="${DEPEND}
+ !sci-libs/parmetis"
+
S="${WORKDIR}/metis-${MY_PV}"
pkg_setup() {