You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sci-libs/metis/files/metis-5.0_pre2-autotools.patch

163 lines
5.1 KiB

--- configure.ac 1970-01-01 01:00:00.000000000 +0100
+++ 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,
+ [AC_HELP_STRING([--enable-openmp],
+ [compile with openmp])],
+ [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_LIBS=-openmp
+ else
+ OMP_CFLAGS=-fopenmp
+ OMP_LIBS=-lgomp
+ fi
+fi
+
+AC_ARG_ENABLE(pcre,
+ [AC_HELP_STRING([--enable-pcre],
+ [Enable PCRE regex support])],
+ [enable_pcre=$enableval],
+ [enable_pcre="yes"])
+AC_MSG_RESULT($enable_pcre)
+if test x$enable_pcre = xyes; then
+ AC_PATH_PROGS(PCRE_CONFIG, pcre-config, no)
+ if test "$PCRE_CONFIG" = "no"; then
+ AC_MSG_ERROR(Unable to find pcre-config in path for PCRE support)
+ else
+ AC_CHECK_HEADERS(pcre.h)
+ PCRE="yes"
+ PCRE_CPPFLAGS=-D__WITHPCRE__
+ PCRE_LIBS=-lpcre
+ fi
+fi
+
+AC_CONFIG_FILES([
+ Makefile
+ metis.pc
+ GKlib/trunk/Makefile
+ libmetis/Makefile
+ programs/Makefile
+ test/Makefile])
+AC_OUTPUT
--- 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)
+
+noinst_LTLIBRARIES = libgklib.la
+noinst_HEADERS = GKlib.h
+
+libgklib_la_SOURCES = \
+ b64.c \
+ blas.c \
+ dfkvkselect.c \
+ dlmalloc.c \
+ error.c \
+ fs.c \
+ getopt.c \
+ htable.c \
+ io.c \
+ memory.c \
+ omp.c \
+ pdb.c \
+ seq.c \
+ sort.c \
+ string.c \
+ timers.c \
+ tokenizer.c \
+ util.c
+libgklib_la_LIBADD = $(OMP_LDFLAGS) $(PCRE_LDFLAGS)
--- ./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
+
+lib_LTLIBRARIES = libmetis.la
+libmetis_la_SOURCES= \
+ balance.c bucketsort.c ccgraph.c checkgraph.c cmetis.c \
+ coarsen.c compress.c debug.c estmem.c fm.c fortran.c \
+ frename.c graph.c initpart.c kfmetis.c kmetis.c kvmetis.c \
+ kwayfm.c kwayrefine.c kwayvolfm.c kwayvolrefine.c match.c \
+ mbalance.c mbalance2.c mcoarsen.c memory.c mesh.c meshpart.c \
+ mfm.c mfm2.c mincover.c minitpart.c minitpart2.c mkmetis.c \
+ mkwayfmh.c mkwayrefine.c mmatch.c mmd.c mpmetis.c mrefine.c \
+ mrefine2.c mrkmetis.c mutil.c myqsort.c ometis.c parmetis.c \
+ 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
+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