[115287] trunk/dports/math/metis
sean at macports.org
sean at macports.org
Mon Dec 30 11:52:12 PST 2013
Revision: 115287
https://trac.macports.org/changeset/115287
Author: sean at macports.org
Date: 2013-12-30 11:52:12 -0800 (Mon, 30 Dec 2013)
Log Message:
-----------
metis: use cmake port group
Modified Paths:
--------------
trunk/dports/math/metis/Portfile
Added Paths:
-----------
trunk/dports/math/metis/files/cmake64.patch
trunk/dports/math/metis/files/cmake_gklib_tls.patch
trunk/dports/math/metis/files/cmake_tls.patch
trunk/dports/math/metis/files/gkl.patch
trunk/dports/math/metis/files/missing_includes.patch
trunk/dports/math/metis/files/remove_home_dir.patch
trunk/dports/math/metis/files/sharedprefix.patch
Removed Paths:
-------------
trunk/dports/math/metis/files/patch-GKlib_GKlibSystem.cmake.diff
trunk/dports/math/metis/files/patch-Makefile-add-install-name-dir.diff
Modified: trunk/dports/math/metis/Portfile
===================================================================
--- trunk/dports/math/metis/Portfile 2013-12-30 19:52:05 UTC (rev 115286)
+++ trunk/dports/math/metis/Portfile 2013-12-30 19:52:12 UTC (rev 115287)
@@ -2,6 +2,7 @@
# $Id$
PortSystem 1.0
+PortGroup cmake 1.0
PortGroup conflicts_build 1.0
name metis
@@ -27,25 +28,22 @@
checksums rmd160 2c4a54bcd3179a609842cde1908dbd232a770495 \
sha256 76faebe03f6c963127dbb73c13eab58c9a3faeae48779f049066a21c087c5db2
-patchfiles patch-Makefile-add-install-name-dir.diff \
- patch-GKlib_GKlibSystem.cmake.diff
+patch.pre_args -p1
+patchfiles-append remove_home_dir.patch \
+ cmake64.patch \
+ sharedprefix.patch \
+ missing_includes.patch \
+ cmake_tls.patch \
+ gkl.patch \
+ cmake_gklib_tls.patch
# metis will pick up files in ${prefix}, unfortunately
conflicts_build metis
-# Metis uses a GNU make file to fire off a cmake command.
-# Used for configure, build, and install.
-depends_build port:cmake
+configure.args -DGKLIB_PATH=${worksrcpath}/GKlib \
+ -DSHARED=1 \
+ -DMETIS_USE_DOUBLEPRECISION=1
-configure.cmd make config
-configure.pre_args prefix=${prefix}
-configure.args shared=1
-configure.universal_args
-
-# "-w" which MacPorts base now adds to these by default causes problems here
-build.pre_args ${build.target}
-destroot.pre_args ${destroot.target}
-
post-destroot {
# Move metis.h to include/metis/metis.h
xinstall -d -m 755 ${destroot}${prefix}/include/metis
Added: trunk/dports/math/metis/files/cmake64.patch
===================================================================
--- trunk/dports/math/metis/files/cmake64.patch (rev 0)
+++ trunk/dports/math/metis/files/cmake64.patch 2013-12-30 19:52:12 UTC (rev 115287)
@@ -0,0 +1,871 @@
+# HG changeset patch
+# User Sean Farley <sean at mcs.anl.gov>
+# Date 1332269669 18000
+# Tue Mar 20 13:54:29 2012 -0500
+# Node ID aed7f236f05776012de66d24f7abf7b0395e7a97
+# Parent bc20de47ec7e09494907774a7988b5948ce8e22a
+cmake: add a configure option for 64 bit integers
+
+diff -r bc20de47ec7e -r aed7f236f057 BUILD.txt
+--- a/BUILD.txt Tue Mar 20 13:54:29 2012 -0500
++++ b/BUILD.txt Tue Mar 20 13:54:29 2012 -0500
+@@ -15,14 +15,16 @@ example:
+ $ make config shared=1 cc=gcc-4.2
+
+ would configure metis to be built as a shared library using GCC 4.2.
+
+ Common configuration options are:
+- cc=[compiler] - The C compiler to use [default is determined by CMake]
+- shared=1 - Build a shared library instead of a static one
+- [off by default]
+- prefix=[PATH] - Set the installation prefix [/usr/local/ by default]
++ cc=[compiler] - The C compiler to use [default is determined by CMake]
++ shared=1 - Build a shared library instead of a static one
++ [off by default]
++ prefix=[PATH] - Set the installation prefix [/usr/local/ by default]
++ longindex=1 - Build with idx_t = int64_t
++ doubleprecision=1 - Build with real_t = double
+
+ Advanced debugging related options:
+ gdb=1 - Build with support for GDB [off by default]
+ debug=1 - Enable debugging support [off by default]
+ assert=1 - Enable asserts [off by default]
+diff -r bc20de47ec7e -r aed7f236f057 Install.txt
+--- a/Install.txt Tue Mar 20 13:54:29 2012 -0500
++++ b/Install.txt Tue Mar 20 13:54:29 2012 -0500
+@@ -1,25 +1,16 @@
+
+ These are some preliminary instructions for the 5.0 release of METIS.
+
+-1. You need to have a C compiler that supports the C99 standard.
++1. You need to have a C compiler that supports the C99 standard.
+ Gcc works just fine, but I have not tested it on many other architectures
+ (any feedback/patches for different architectures are welcomed)
+-
++
+ 2. You need to have GNU make and CMake 2.8 (http://www.cmake.org/) installed.
+
+-3. Edit the file include/metis.h and specify the width (32 or 64 bits) of the
+- elementary data type used in METIS. This is controled by the IDXTYPEWIDTH
+- constant.
++3. At the top of Metis' directory execute 'make' and follow the instructions.
+
+- For now, on a 32 bit architecture you can only specify a width of 32,
+- whereas for a 64 bit architecture you can specify a width of either
+- 32 or 64 bits.
+-
+-
+-4. At the top of Metis' directory execute 'make' and follow the instructions.
+-
+ make
+
+-5. To build on windows using Visual Studio follow the instructions in the
++4. To build on windows using Visual Studio follow the instructions in the
+ file BUILD-Windows.txt.
+
+diff -r bc20de47ec7e -r aed7f236f057 Makefile
+--- a/Makefile Tue Mar 20 13:54:29 2012 -0500
++++ b/Makefile Tue Mar 20 13:54:29 2012 -0500
+@@ -1,16 +1,18 @@
+ # Configuration options.
+-gdb = not-set
+-assert = not-set
+-assert2 = not-set
+-debug = not-set
+-gprof = not-set
+-openmp = not-set
+-prefix = not-set
+-gklib_path = not-set
+-shared = not-set
+-cc = not-set
++gdb = not-set
++assert = not-set
++assert2 = not-set
++debug = not-set
++gprof = not-set
++openmp = not-set
++prefix = not-set
++gklib_path = not-set
++shared = not-set
++cc = not-set
++longindex = not-set
++doubleprecision = not-set
+
+
+ # Basically proxies everything to the builddir cmake.
+
+ cputype = $(shell uname -m | sed "s/\\ /_/g")
+@@ -49,10 +51,16 @@ ifneq ($(shared), not-set)
+ CONFIG_FLAGS += -DSHARED=1
+ endif
+ ifneq ($(cc), not-set)
+ CONFIG_FLAGS += -DCMAKE_C_COMPILER=$(cc)
+ endif
++ifneq ($(longindex), not-set)
++ CONFIG_FLAGS += -DMETIS_USE_LONGINDEX=$(longindex)
++endif
++ifneq ($(doubleprecision), not-set)
++ CONFIG_FLAGS += -DMETIS_USE_DOUBLEPRECISION=$(doubleprecision)
++endif
+
+ VERNUM=5.1.0
+ PKGNAME=metis-$(VERNUM)
+
+ define run-config
+diff -r bc20de47ec7e -r aed7f236f057 include/CMakeLists.txt
+--- a/include/CMakeLists.txt Tue Mar 20 13:54:29 2012 -0500
++++ b/include/CMakeLists.txt Tue Mar 20 13:54:29 2012 -0500
+@@ -1,3 +1,6 @@
+ if(METIS_INSTALL)
+- install(FILES metis.h DESTINATION include)
++ option (METIS_USE_LONGINDEX "Compile METIS with long ints (64bit integers)" OFF)
++ option (METIS_USE_DOUBLEPRECISION "Compile METIS with double precision (double)" OFF)
++ configure_file (metis.h.in metis.h)
++ install(FILES "${PROJECT_BINARY_DIR}/include/metis.h" DESTINATION include)
+ endif()
+diff -r bc20de47ec7e -r aed7f236f057 include/metis.h
+--- a/include/metis.h Tue Mar 20 13:54:29 2012 -0500
++++ /dev/null Thu Jan 01 00:00:00 1970 +0000
+@@ -1,350 +0,0 @@
+-/*!
+-\file metis.h
+-\brief This file contains function prototypes and constant definitions for METIS
+- *
+-\author George
+-\date Started 8/9/02
+-\version\verbatim $Id$\endverbatim
+-*/
+-
+-#ifndef _METIS_H_
+-#define _METIS_H_
+-
+-/****************************************************************************
+-* A set of defines that can be modified by the user
+-*****************************************************************************/
+-
+-/*--------------------------------------------------------------------------
+- Specifies the width of the elementary data type that will hold information
+- about vertices and their adjacency lists.
+-
+- Possible values:
+- 32 : Use 32 bit signed integers
+- 64 : Use 64 bit signed integers
+-
+- A width of 64 should be specified if the number of vertices or the total
+- number of edges in the graph exceed the limits of a 32 bit signed integer
+- i.e., 2^31-1.
+- Proper use of 64 bit integers requires that the c99 standard datatypes
+- int32_t and int64_t are supported by the compiler.
+- GCC does provides these definitions in stdint.h, but it may require some
+- modifications on other architectures.
+---------------------------------------------------------------------------*/
+-#define IDXTYPEWIDTH 32
+-
+-
+-/*--------------------------------------------------------------------------
+- Specifies the data type that will hold floating-point style information.
+-
+- Possible values:
+- 32 : single precission floating point (float)
+- 64 : double precission floating point (double)
+---------------------------------------------------------------------------*/
+-#define REALTYPEWIDTH 32
+-
+-
+-
+-/****************************************************************************
+-* In principle, nothing needs to be changed beyond this point, unless the
+-* int32_t and int64_t cannot be found in the normal places.
+-*****************************************************************************/
+-
+-/* Uniform definitions for various compilers */
+-#if defined(_MSC_VER)
+- #define COMPILER_MSC
+-#endif
+-#if defined(__ICC)
+- #define COMPILER_ICC
+-#endif
+-#if defined(__GNUC__)
+- #define COMPILER_GCC
+-#endif
+-
+-/* Include c99 int definitions and need constants. When building the library,
+- * these are already defined by GKlib; hence the test for _GKLIB_H_ */
+-#ifndef _GKLIB_H_
+-#ifdef COMPILER_MSC
+-#include <limits.h>
+-
+-typedef __int32 int32_t;
+-typedef __int64 int64_t;
+-#define PRId32 "I32d"
+-#define PRId64 "I64d"
+-#define SCNd32 "ld"
+-#define SCNd64 "I64d"
+-#define INT32_MIN ((int32_t)_I32_MIN)
+-#define INT32_MAX _I32_MAX
+-#define INT64_MIN ((int64_t)_I64_MIN)
+-#define INT64_MAX _I64_MAX
+-#else
+-#include <inttypes.h>
+-#endif
+-#endif
+-
+-
+-/*------------------------------------------------------------------------
+-* Setup the basic datatypes
+-*-------------------------------------------------------------------------*/
+-#if IDXTYPEWIDTH == 32
+- typedef int32_t idx_t;
+-
+- #define IDX_MAX INT32_MAX
+- #define IDX_MIN INT32_MIN
+-
+- #define SCIDX SCNd32
+- #define PRIDX PRId32
+-
+- #define strtoidx strtol
+- #define iabs abs
+-#elif IDXTYPEWIDTH == 64
+- typedef int64_t idx_t;
+-
+- #define IDX_MAX INT64_MAX
+- #define IDX_MIN INT64_MIN
+-
+- #define SCIDX SCNd64
+- #define PRIDX PRId64
+-
+-#ifdef COMPILER_MSC
+- #define strtoidx _strtoi64
+-#else
+- #define strtoidx strtoll
+-#endif
+- #define iabs labs
+-#else
+- #error "Incorrect user-supplied value fo IDXTYPEWIDTH"
+-#endif
+-
+-
+-#if REALTYPEWIDTH == 32
+- typedef float real_t;
+-
+- #define SCREAL "f"
+- #define PRREAL "f"
+- #define REAL_MAX FLT_MAX
+- #define REAL_MIN FLT_MIN
+- #define REAL_EPSILON FLT_EPSILON
+-
+- #define rabs fabsf
+- #define REALEQ(x,y) ((rabs((x)-(y)) <= FLT_EPSILON))
+-
+-#ifdef COMPILER_MSC
+- #define strtoreal (float)strtod
+-#else
+- #define strtoreal strtof
+-#endif
+-#elif REALTYPEWIDTH == 64
+- typedef double real_t;
+-
+- #define SCREAL "lf"
+- #define PRREAL "lf"
+- #define REAL_MAX DBL_MAX
+- #define REAL_MIN DBL_MIN
+- #define REAL_EPSILON DBL_EPSILON
+-
+- #define rabs fabs
+- #define REALEQ(x,y) ((rabs((x)-(y)) <= DBL_EPSILON))
+-
+- #define strtoreal strtod
+-#else
+- #error "Incorrect user-supplied value for REALTYPEWIDTH"
+-#endif
+-
+-
+-/*------------------------------------------------------------------------
+-* Constant definitions
+-*-------------------------------------------------------------------------*/
+-/* Metis's version number */
+-#define METIS_VER_MAJOR 5
+-#define METIS_VER_MINOR 1
+-#define METIS_VER_SUBMINOR 0
+-
+-/* The maximum length of the options[] array */
+-#define METIS_NOPTIONS 40
+-
+-
+-
+-/*------------------------------------------------------------------------
+-* Function prototypes
+-*-------------------------------------------------------------------------*/
+-
+-#ifdef _WINDLL
+-#define METIS_API(type) __declspec(dllexport) type __cdecl
+-#elif defined(__cdecl)
+-#define METIS_API(type) type __cdecl
+-#else
+-#define METIS_API(type) type
+-#endif
+-
+-
+-
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+-
+-METIS_API(int) METIS_PartGraphRecursive(idx_t *nvtxs, idx_t *ncon, idx_t *xadj,
+- idx_t *adjncy, idx_t *vwgt, idx_t *vsize, idx_t *adjwgt,
+- idx_t *nparts, real_t *tpwgts, real_t *ubvec, idx_t *options,
+- idx_t *edgecut, idx_t *part);
+-
+-METIS_API(int) METIS_PartGraphKway(idx_t *nvtxs, idx_t *ncon, idx_t *xadj,
+- idx_t *adjncy, idx_t *vwgt, idx_t *vsize, idx_t *adjwgt,
+- idx_t *nparts, real_t *tpwgts, real_t *ubvec, idx_t *options,
+- idx_t *edgecut, idx_t *part);
+-
+-METIS_API(int) METIS_MeshToDual(idx_t *ne, idx_t *nn, idx_t *eptr, idx_t *eind,
+- idx_t *ncommon, idx_t *numflag, idx_t **r_xadj, idx_t **r_adjncy);
+-
+-METIS_API(int) METIS_MeshToNodal(idx_t *ne, idx_t *nn, idx_t *eptr, idx_t *eind,
+- idx_t *numflag, idx_t **r_xadj, idx_t **r_adjncy);
+-
+-METIS_API(int) METIS_PartMeshNodal(idx_t *ne, idx_t *nn, idx_t *eptr, idx_t *eind,
+- idx_t *vwgt, idx_t *vsize, idx_t *nparts, real_t *tpwgts,
+- idx_t *options, idx_t *objval, idx_t *epart, idx_t *npart);
+-
+-METIS_API(int) METIS_PartMeshDual(idx_t *ne, idx_t *nn, idx_t *eptr, idx_t *eind,
+- idx_t *vwgt, idx_t *vsize, idx_t *ncommon, idx_t *nparts,
+- real_t *tpwgts, idx_t *options, idx_t *objval, idx_t *epart,
+- idx_t *npart);
+-
+-METIS_API(int) METIS_NodeND(idx_t *nvtxs, idx_t *xadj, idx_t *adjncy, idx_t *vwgt,
+- idx_t *options, idx_t *perm, idx_t *iperm);
+-
+-METIS_API(int) METIS_Free(void *ptr);
+-
+-METIS_API(int) METIS_SetDefaultOptions(idx_t *options);
+-
+-
+-/* These functions are used by ParMETIS */
+-
+-METIS_API(int) METIS_NodeNDP(idx_t nvtxs, idx_t *xadj, idx_t *adjncy, idx_t *vwgt,
+- idx_t npes, idx_t *options, idx_t *perm, idx_t *iperm,
+- idx_t *sizes);
+-
+-METIS_API(int) METIS_ComputeVertexSeparator(idx_t *nvtxs, idx_t *xadj, idx_t *adjncy,
+- idx_t *vwgt, idx_t *options, idx_t *sepsize, idx_t *part);
+-
+-METIS_API(int) METIS_NodeRefine(idx_t nvtxs, idx_t *xadj, idx_t *vwgt, idx_t *adjncy,
+- idx_t *where, idx_t *hmarker, real_t ubfactor);
+-
+-
+-#ifdef __cplusplus
+-}
+-#endif
+-
+-
+-
+-/*------------------------------------------------------------------------
+-* Enum type definitions
+-*-------------------------------------------------------------------------*/
+-/*! Return codes */
+-typedef enum {
+- METIS_OK = 1, /*!< Returned normally */
+- METIS_ERROR_INPUT = -2, /*!< Returned due to erroneous inputs and/or options */
+- METIS_ERROR_MEMORY = -3, /*!< Returned due to insufficient memory */
+- METIS_ERROR = -4 /*!< Some other errors */
+-} rstatus_et;
+-
+-
+-/*! Operation type codes */
+-typedef enum {
+- METIS_OP_PMETIS,
+- METIS_OP_KMETIS,
+- METIS_OP_OMETIS
+-} moptype_et;
+-
+-
+-/*! Options codes (i.e., options[]) */
+-typedef enum {
+- METIS_OPTION_PTYPE,
+- METIS_OPTION_OBJTYPE,
+- METIS_OPTION_CTYPE,
+- METIS_OPTION_IPTYPE,
+- METIS_OPTION_RTYPE,
+- METIS_OPTION_DBGLVL,
+- METIS_OPTION_NITER,
+- METIS_OPTION_NCUTS,
+- METIS_OPTION_SEED,
+- METIS_OPTION_NO2HOP,
+- METIS_OPTION_MINCONN,
+- METIS_OPTION_CONTIG,
+- METIS_OPTION_COMPRESS,
+- METIS_OPTION_CCORDER,
+- METIS_OPTION_PFACTOR,
+- METIS_OPTION_NSEPS,
+- METIS_OPTION_UFACTOR,
+- METIS_OPTION_NUMBERING,
+-
+- /* Used for command-line parameter purposes */
+- METIS_OPTION_HELP,
+- METIS_OPTION_TPWGTS,
+- METIS_OPTION_NCOMMON,
+- METIS_OPTION_NOOUTPUT,
+- METIS_OPTION_BALANCE,
+- METIS_OPTION_GTYPE,
+- METIS_OPTION_UBVEC
+-} moptions_et;
+-
+-
+-/*! Partitioning Schemes */
+-typedef enum {
+- METIS_PTYPE_RB,
+- METIS_PTYPE_KWAY
+-} mptype_et;
+-
+-/*! Graph types for meshes */
+-typedef enum {
+- METIS_GTYPE_DUAL,
+- METIS_GTYPE_NODAL
+-} mgtype_et;
+-
+-/*! Coarsening Schemes */
+-typedef enum {
+- METIS_CTYPE_RM,
+- METIS_CTYPE_SHEM
+-} mctype_et;
+-
+-/*! Initial partitioning schemes */
+-typedef enum {
+- METIS_IPTYPE_GROW,
+- METIS_IPTYPE_RANDOM,
+- METIS_IPTYPE_EDGE,
+- METIS_IPTYPE_NODE,
+- METIS_IPTYPE_METISRB
+-} miptype_et;
+-
+-
+-/*! Refinement schemes */
+-typedef enum {
+- METIS_RTYPE_FM,
+- METIS_RTYPE_GREEDY,
+- METIS_RTYPE_SEP2SIDED,
+- METIS_RTYPE_SEP1SIDED
+-} mrtype_et;
+-
+-
+-/*! Debug Levels */
+-typedef enum {
+- METIS_DBG_INFO = 1, /*!< Shows various diagnostic messages */
+- METIS_DBG_TIME = 2, /*!< Perform timing analysis */
+- METIS_DBG_COARSEN = 4, /*!< Show the coarsening progress */
+- METIS_DBG_REFINE = 8, /*!< Show the refinement progress */
+- METIS_DBG_IPART = 16, /*!< Show info on initial partitioning */
+- METIS_DBG_MOVEINFO = 32, /*!< Show info on vertex moves during refinement */
+- METIS_DBG_SEPINFO = 64, /*!< Show info on vertex moves during sep refinement */
+- METIS_DBG_CONNINFO = 128, /*!< Show info on minimization of subdomain connectivity */
+- METIS_DBG_CONTIGINFO = 256, /*!< Show info on elimination of connected components */
+- METIS_DBG_MEMORY = 2048, /*!< Show info related to wspace allocation */
+-} mdbglvl_et;
+-
+-
+-/* Types of objectives */
+-typedef enum {
+- METIS_OBJTYPE_CUT,
+- METIS_OBJTYPE_VOL,
+- METIS_OBJTYPE_NODE
+-} mobjtype_et;
+-
+-
+-
+-#endif /* _METIS_H_ */
+diff -r bc20de47ec7e -r aed7f236f057 include/metis.h.in
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/metis.h.in Tue Mar 20 13:54:29 2012 -0500
+@@ -0,0 +1,364 @@
++/*!
++\file metis.h
++\brief This file contains function prototypes and constant definitions for METIS
++ *
++\author George
++\date Started 8/9/02
++\version\verbatim $Id$\endverbatim
++*/
++
++#ifndef _METIS_H_
++#define _METIS_H_
++
++/****************************************************************************
++* A set of defines that can be modified by the user
++*****************************************************************************/
++
++/*--------------------------------------------------------------------------
++ Specifies the width of the elementary data type that will hold information
++ about vertices and their adjacency lists.
++
++ Possible values:
++ 32 : Use 32 bit signed integers
++ 64 : Use 64 bit signed integers
++
++ A width of 64 should be specified if the number of vertices or the total
++ number of edges in the graph exceed the limits of a 32 bit signed integer
++ i.e., 2^31-1.
++ Proper use of 64 bit integers requires that the c99 standard datatypes
++ int32_t and int64_t are supported by the compiler.
++ GCC does provides these definitions in stdint.h, but it may require some
++ modifications on other architectures.
++--------------------------------------------------------------------------*/
++
++#cmakedefine METIS_USE_LONGINDEX
++
++#ifdef METIS_USE_LONGINDEX
++#define IDXTYPEWIDTH 64
++#else
++#define IDXTYPEWIDTH 32
++#endif
++
++
++/*--------------------------------------------------------------------------
++ Specifies the data type that will hold floating-point style information.
++
++ Possible values:
++ 32 : single precission floating point (float)
++ 64 : double precission floating point (double)
++--------------------------------------------------------------------------*/
++
++#cmakedefine METIS_USE_DOUBLEPRECISION
++
++#ifdef METIS_USE_DOUBLEPRECISION
++#define REALTYPEWIDTH 64
++#else
++#define REALTYPEWIDTH 32
++#endif
++
++
++
++/****************************************************************************
++* In principle, nothing needs to be changed beyond this point, unless the
++* int32_t and int64_t cannot be found in the normal places.
++*****************************************************************************/
++
++/* Uniform definitions for various compilers */
++#if defined(_MSC_VER)
++ #define COMPILER_MSC
++#endif
++#if defined(__ICC)
++ #define COMPILER_ICC
++#endif
++#if defined(__GNUC__)
++ #define COMPILER_GCC
++#endif
++
++/* Include c99 int definitions and need constants. When building the library,
++ * these are already defined by GKlib; hence the test for _GKLIB_H_ */
++#ifndef _GKLIB_H_
++#ifdef COMPILER_MSC
++#include <limits.h>
++
++typedef __int32 int32_t;
++typedef __int64 int64_t;
++#define PRId32 "I32d"
++#define PRId64 "I64d"
++#define SCNd32 "ld"
++#define SCNd64 "I64d"
++#define INT32_MIN ((int32_t)_I32_MIN)
++#define INT32_MAX _I32_MAX
++#define INT64_MIN ((int64_t)_I64_MIN)
++#define INT64_MAX _I64_MAX
++#else
++#include <inttypes.h>
++#endif
++#endif
++
++
++/*------------------------------------------------------------------------
++* Setup the basic datatypes
++*-------------------------------------------------------------------------*/
++#if IDXTYPEWIDTH == 32
++ typedef int32_t idx_t;
++
++ #define IDX_MAX INT32_MAX
++ #define IDX_MIN INT32_MIN
++
++ #define SCIDX SCNd32
++ #define PRIDX PRId32
++
++ #define strtoidx strtol
++ #define iabs abs
++#elif IDXTYPEWIDTH == 64
++ typedef int64_t idx_t;
++
++ #define IDX_MAX INT64_MAX
++ #define IDX_MIN INT64_MIN
++
++ #define SCIDX SCNd64
++ #define PRIDX PRId64
++
++#ifdef COMPILER_MSC
++ #define strtoidx _strtoi64
++#else
++ #define strtoidx strtoll
++#endif
++ #define iabs labs
++#else
++ #error "Incorrect user-supplied value fo IDXTYPEWIDTH"
++#endif
++
++
++#if REALTYPEWIDTH == 32
++ typedef float real_t;
++
++ #define SCREAL "f"
++ #define PRREAL "f"
++ #define REAL_MAX FLT_MAX
++ #define REAL_MIN FLT_MIN
++ #define REAL_EPSILON FLT_EPSILON
++
++ #define rabs fabsf
++ #define REALEQ(x,y) ((rabs((x)-(y)) <= FLT_EPSILON))
++
++#ifdef COMPILER_MSC
++ #define strtoreal (float)strtod
++#else
++ #define strtoreal strtof
++#endif
++#elif REALTYPEWIDTH == 64
++ typedef double real_t;
++
++ #define SCREAL "lf"
++ #define PRREAL "lf"
++ #define REAL_MAX DBL_MAX
++ #define REAL_MIN DBL_MIN
++ #define REAL_EPSILON DBL_EPSILON
++
++ #define rabs fabs
++ #define REALEQ(x,y) ((rabs((x)-(y)) <= DBL_EPSILON))
++
++ #define strtoreal strtod
++#else
++ #error "Incorrect user-supplied value for REALTYPEWIDTH"
++#endif
++
++
++/*------------------------------------------------------------------------
++* Constant definitions
++*-------------------------------------------------------------------------*/
++/* Metis's version number */
++#define METIS_VER_MAJOR 5
++#define METIS_VER_MINOR 1
++#define METIS_VER_SUBMINOR 0
++
++/* The maximum length of the options[] array */
++#define METIS_NOPTIONS 40
++
++
++
++/*------------------------------------------------------------------------
++* Function prototypes
++*-------------------------------------------------------------------------*/
++
++#ifdef _WINDLL
++#define METIS_API(type) __declspec(dllexport) type __cdecl
++#elif defined(__cdecl)
++#define METIS_API(type) type __cdecl
++#else
++#define METIS_API(type) type
++#endif
++
++
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++METIS_API(int) METIS_PartGraphRecursive(idx_t *nvtxs, idx_t *ncon, idx_t *xadj,
++ idx_t *adjncy, idx_t *vwgt, idx_t *vsize, idx_t *adjwgt,
++ idx_t *nparts, real_t *tpwgts, real_t *ubvec, idx_t *options,
++ idx_t *edgecut, idx_t *part);
++
++METIS_API(int) METIS_PartGraphKway(idx_t *nvtxs, idx_t *ncon, idx_t *xadj,
++ idx_t *adjncy, idx_t *vwgt, idx_t *vsize, idx_t *adjwgt,
++ idx_t *nparts, real_t *tpwgts, real_t *ubvec, idx_t *options,
++ idx_t *edgecut, idx_t *part);
++
++METIS_API(int) METIS_MeshToDual(idx_t *ne, idx_t *nn, idx_t *eptr, idx_t *eind,
++ idx_t *ncommon, idx_t *numflag, idx_t **r_xadj, idx_t **r_adjncy);
++
++METIS_API(int) METIS_MeshToNodal(idx_t *ne, idx_t *nn, idx_t *eptr, idx_t *eind,
++ idx_t *numflag, idx_t **r_xadj, idx_t **r_adjncy);
++
++METIS_API(int) METIS_PartMeshNodal(idx_t *ne, idx_t *nn, idx_t *eptr, idx_t *eind,
++ idx_t *vwgt, idx_t *vsize, idx_t *nparts, real_t *tpwgts,
++ idx_t *options, idx_t *objval, idx_t *epart, idx_t *npart);
++
++METIS_API(int) METIS_PartMeshDual(idx_t *ne, idx_t *nn, idx_t *eptr, idx_t *eind,
++ idx_t *vwgt, idx_t *vsize, idx_t *ncommon, idx_t *nparts,
++ real_t *tpwgts, idx_t *options, idx_t *objval, idx_t *epart,
++ idx_t *npart);
++
++METIS_API(int) METIS_NodeND(idx_t *nvtxs, idx_t *xadj, idx_t *adjncy, idx_t *vwgt,
++ idx_t *options, idx_t *perm, idx_t *iperm);
++
++METIS_API(int) METIS_Free(void *ptr);
++
++METIS_API(int) METIS_SetDefaultOptions(idx_t *options);
++
++
++/* These functions are used by ParMETIS */
++
++METIS_API(int) METIS_NodeNDP(idx_t nvtxs, idx_t *xadj, idx_t *adjncy, idx_t *vwgt,
++ idx_t npes, idx_t *options, idx_t *perm, idx_t *iperm,
++ idx_t *sizes);
++
++METIS_API(int) METIS_ComputeVertexSeparator(idx_t *nvtxs, idx_t *xadj, idx_t *adjncy,
++ idx_t *vwgt, idx_t *options, idx_t *sepsize, idx_t *part);
++
++METIS_API(int) METIS_NodeRefine(idx_t nvtxs, idx_t *xadj, idx_t *vwgt, idx_t *adjncy,
++ idx_t *where, idx_t *hmarker, real_t ubfactor);
++
++
++#ifdef __cplusplus
++}
++#endif
++
++
++
++/*------------------------------------------------------------------------
++* Enum type definitions
++*-------------------------------------------------------------------------*/
++/*! Return codes */
++typedef enum {
++ METIS_OK = 1, /*!< Returned normally */
++ METIS_ERROR_INPUT = -2, /*!< Returned due to erroneous inputs and/or options */
++ METIS_ERROR_MEMORY = -3, /*!< Returned due to insufficient memory */
++ METIS_ERROR = -4 /*!< Some other errors */
++} rstatus_et;
++
++
++/*! Operation type codes */
++typedef enum {
++ METIS_OP_PMETIS,
++ METIS_OP_KMETIS,
++ METIS_OP_OMETIS
++} moptype_et;
++
++
++/*! Options codes (i.e., options[]) */
++typedef enum {
++ METIS_OPTION_PTYPE,
++ METIS_OPTION_OBJTYPE,
++ METIS_OPTION_CTYPE,
++ METIS_OPTION_IPTYPE,
++ METIS_OPTION_RTYPE,
++ METIS_OPTION_DBGLVL,
++ METIS_OPTION_NITER,
++ METIS_OPTION_NCUTS,
++ METIS_OPTION_SEED,
++ METIS_OPTION_NO2HOP,
++ METIS_OPTION_MINCONN,
++ METIS_OPTION_CONTIG,
++ METIS_OPTION_COMPRESS,
++ METIS_OPTION_CCORDER,
++ METIS_OPTION_PFACTOR,
++ METIS_OPTION_NSEPS,
++ METIS_OPTION_UFACTOR,
++ METIS_OPTION_NUMBERING,
++
++ /* Used for command-line parameter purposes */
++ METIS_OPTION_HELP,
++ METIS_OPTION_TPWGTS,
++ METIS_OPTION_NCOMMON,
++ METIS_OPTION_NOOUTPUT,
++ METIS_OPTION_BALANCE,
++ METIS_OPTION_GTYPE,
++ METIS_OPTION_UBVEC
++} moptions_et;
++
++
++/*! Partitioning Schemes */
++typedef enum {
++ METIS_PTYPE_RB,
++ METIS_PTYPE_KWAY
++} mptype_et;
++
++/*! Graph types for meshes */
++typedef enum {
++ METIS_GTYPE_DUAL,
++ METIS_GTYPE_NODAL
++} mgtype_et;
++
++/*! Coarsening Schemes */
++typedef enum {
++ METIS_CTYPE_RM,
++ METIS_CTYPE_SHEM
++} mctype_et;
++
++/*! Initial partitioning schemes */
++typedef enum {
++ METIS_IPTYPE_GROW,
++ METIS_IPTYPE_RANDOM,
++ METIS_IPTYPE_EDGE,
++ METIS_IPTYPE_NODE,
++ METIS_IPTYPE_METISRB
++} miptype_et;
++
++
++/*! Refinement schemes */
++typedef enum {
++ METIS_RTYPE_FM,
++ METIS_RTYPE_GREEDY,
++ METIS_RTYPE_SEP2SIDED,
++ METIS_RTYPE_SEP1SIDED
++} mrtype_et;
++
++
++/*! Debug Levels */
++typedef enum {
++ METIS_DBG_INFO = 1, /*!< Shows various diagnostic messages */
++ METIS_DBG_TIME = 2, /*!< Perform timing analysis */
++ METIS_DBG_COARSEN = 4, /*!< Show the coarsening progress */
++ METIS_DBG_REFINE = 8, /*!< Show the refinement progress */
++ METIS_DBG_IPART = 16, /*!< Show info on initial partitioning */
++ METIS_DBG_MOVEINFO = 32, /*!< Show info on vertex moves during refinement */
++ METIS_DBG_SEPINFO = 64, /*!< Show info on vertex moves during sep refinement */
++ METIS_DBG_CONNINFO = 128, /*!< Show info on minimization of subdomain connectivity */
++ METIS_DBG_CONTIGINFO = 256, /*!< Show info on elimination of connected components */
++ METIS_DBG_MEMORY = 2048, /*!< Show info related to wspace allocation */
++} mdbglvl_et;
++
++
++/* Types of objectives */
++typedef enum {
++ METIS_OBJTYPE_CUT,
++ METIS_OBJTYPE_VOL,
++ METIS_OBJTYPE_NODE
++} mobjtype_et;
++
++
++
++#endif /* _METIS_H_ */
+diff -r bc20de47ec7e -r aed7f236f057 libmetis/CMakeLists.txt
+--- a/libmetis/CMakeLists.txt Tue Mar 20 13:54:29 2012 -0500
++++ b/libmetis/CMakeLists.txt Tue Mar 20 13:54:29 2012 -0500
+@@ -1,7 +1,8 @@
+ # Add this directory for internal users.
+ include_directories(.)
++include_directories ("${PROJECT_BINARY_DIR}/include")
+ # Find sources.
+ file(GLOB metis_sources *.c)
+ # Build libmetis.
+ add_library(metis ${METIS_LIBRARY_TYPE} ${GKlib_sources} ${metis_sources})
+ if(UNIX)
+diff -r bc20de47ec7e -r aed7f236f057 programs/CMakeLists.txt
+--- a/programs/CMakeLists.txt Tue Mar 20 13:54:29 2012 -0500
++++ b/programs/CMakeLists.txt Tue Mar 20 13:54:29 2012 -0500
+@@ -1,7 +1,8 @@
+ # These programs use internal metis data structures.
+ include_directories(../libmetis)
++include_directories("${PROJECT_BINARY_DIR}/include")
+ # Build program.
+ add_executable(gpmetis gpmetis.c cmdline_gpmetis.c io.c stat.c)
+ add_executable(ndmetis ndmetis.c cmdline_ndmetis.c io.c smbfactor.c)
+ add_executable(mpmetis mpmetis.c cmdline_mpmetis.c io.c stat.c)
+ add_executable(m2gmetis m2gmetis.c cmdline_m2gmetis.c io.c)
Added: trunk/dports/math/metis/files/cmake_gklib_tls.patch
===================================================================
--- trunk/dports/math/metis/files/cmake_gklib_tls.patch (rev 0)
+++ trunk/dports/math/metis/files/cmake_gklib_tls.patch 2013-12-30 19:52:12 UTC (rev 115287)
@@ -0,0 +1,19 @@
+# HG changeset patch
+# User Sean Farley <sean at mcs.anl.gov>
+# Date 1332269671 18000
+# Tue Mar 20 13:54:31 2012 -0500
+# Node ID decbfb90b77a671e935547dd6916ee077c94f8f1
+# Parent 42725dc9dd51805b60b432882ed6b24b82ed60c0
+cmake: update 'install' target to also install gklib_tls.h
+
+diff -r 42725dc9dd51 -r decbfb90b77a include/CMakeLists.txt
+--- a/include/CMakeLists.txt Tue Mar 20 13:54:30 2012 -0500
++++ b/include/CMakeLists.txt Tue Mar 20 13:54:31 2012 -0500
+@@ -1,6 +1,7 @@
+ if(METIS_INSTALL)
+ option (METIS_USE_LONGINDEX "Compile METIS with long ints (64bit integers)" OFF)
+ option (METIS_USE_DOUBLEPRECISION "Compile METIS with double precision (double)" OFF)
+ configure_file (metis.h.in metis.h)
+ install(FILES "${PROJECT_BINARY_DIR}/include/metis.h" DESTINATION include)
++ install(FILES "${PROJECT_BINARY_DIR}/include/gklib_tls.h" DESTINATION include)
+ endif()
Added: trunk/dports/math/metis/files/cmake_tls.patch
===================================================================
--- trunk/dports/math/metis/files/cmake_tls.patch (rev 0)
+++ trunk/dports/math/metis/files/cmake_tls.patch 2013-12-30 19:52:12 UTC (rev 115287)
@@ -0,0 +1,37 @@
+# HG changeset patch
+# User Sean Farley <sean at mcs.anl.gov>
+# Date 1332269670 18000
+# Tue Mar 20 13:54:30 2012 -0500
+# Node ID b2df50e909699a8bdea4feaa083a4d16343a2796
+# Parent 00f36f7c4dddc0637f81015c1213bc4a3b6c9e93
+make: add a cflags variable to pass to cmake
+
+diff -r 00f36f7c4ddd -r b2df50e90969 Makefile
+--- a/Makefile Tue Mar 20 13:54:31 2012 -0500
++++ b/Makefile Tue Mar 20 13:54:30 2012 -0500
+@@ -7,10 +7,11 @@ gprof = not-set
+ openmp = not-set
+ prefix = not-set
+ gklib_path = not-set
+ shared = not-set
+ cc = not-set
++cflags = not-set
+ longindex = not-set
+ doubleprecision = not-set
+
+
+ # Basically proxies everything to the builddir cmake.
+@@ -51,10 +52,13 @@ ifneq ($(shared), not-set)
+ CONFIG_FLAGS += -DSHARED=1
+ endif
+ ifneq ($(cc), not-set)
+ CONFIG_FLAGS += -DCMAKE_C_COMPILER=$(cc)
+ endif
++ifneq ($(cflags), not-set)
++ CONFIG_FLAGS += -DCMAKE_C_FLAGS:STRING="$(cflags)"
++endif
+ ifneq ($(longindex), not-set)
+ CONFIG_FLAGS += -DMETIS_USE_LONGINDEX=$(longindex)
+ endif
+ ifneq ($(doubleprecision), not-set)
+ CONFIG_FLAGS += -DMETIS_USE_DOUBLEPRECISION=$(doubleprecision)
Added: trunk/dports/math/metis/files/gkl.patch
===================================================================
--- trunk/dports/math/metis/files/gkl.patch (rev 0)
+++ trunk/dports/math/metis/files/gkl.patch 2013-12-30 19:52:12 UTC (rev 115287)
@@ -0,0 +1,218 @@
+diff -r 919706ae3202 GKlib/GKlibSystem.cmake
+--- a/GKlib/GKlibSystem.cmake Sat Dec 28 13:05:35 2013 -0600
++++ b/GKlib/GKlibSystem.cmake Sat Dec 28 15:53:05 2013 -0600
+@@ -1,8 +1,9 @@
+ # Helper modules.
+ include(CheckFunctionExists)
+ include(CheckIncludeFile)
++include(CheckCSourceRuns)
+
+ # Setup options.
+ option(GDB "enable use of GDB" OFF)
+ option(ASSERT "turn asserts on" OFF)
+ option(ASSERT2 "additional assertions" OFF)
+@@ -31,14 +32,11 @@ if(CMAKE_COMPILER_IS_GNUCC)
+ set(GKlib_COPTIONS "${GKlib_COPTIONS} -std=c99 -fno-strict-aliasing")
+ if(NOT MINGW)
+ set(GKlib_COPTIONS "${GKlib_COPTIONS} -fPIC")
+ endif(NOT MINGW)
+ # GCC warnings.
+- set(GKlib_COPTIONS "${GKlib_COPTIONS} -Wall -pedantic -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unknown-pragmas")
+-elseif(${CMAKE_C_COMPILER_ID} MATCHES "Sun")
+-# Sun insists on -xc99.
+- set(GKlib_COPTIONS "${GKlib_COPTIONS} -xc99")
++ set(GKlib_COPTIONS "${GKlib_COPTIONS} -Wall -pedantic -Wno-unused-variable -Wno-unknown-pragmas")
+ endif(CMAKE_COMPILER_IS_GNUCC)
+
+ # Find OpenMP if it is requested.
+ if(OPENMP)
+ include(FindOpenMP)
+@@ -98,30 +96,24 @@ endif(HAVE_EXECINFO_H)
+ check_function_exists(getline HAVE_GETLINE)
+ if(HAVE_GETLINE)
+ set(GKlib_COPTIONS "${GKlib_COPTIONS} -DHAVE_GETLINE")
+ endif(HAVE_GETLINE)
+
++set(GKlib_TLS "")
++# Custom check for TLS.
++foreach(tls_name "__thread" "__declspec(thread)")
++ check_c_source_runs("${tls_name} int x; int main() {x=0; return x;}" HAVE${tls_name})
++ if(HAVE${tls_name})
++ set(GKlib_TLS "${tls_name}")
++ message(STATUS "checking for ${tls_name} thread-local storage - found")
++ break()
++ else()
++ message(STATUS "checking for ${tls_name} thread-local storage - not found")
++ endif(HAVE${tls_name})
++endforeach()
+
+-# Custom check for TLS.
+-if(MSVC)
+- set(GKlib_COPTIONS "${GKlib_COPTIONS} -D__thread=__declspec(thread)")
+-else()
+- # This if checks if that value is cached or not.
+- if("${HAVE_THREADLOCALSTORAGE}" MATCHES "^${HAVE_THREADLOCALSTORAGE}$")
+- try_compile(HAVE_THREADLOCALSTORAGE
+- ${CMAKE_BINARY_DIR}
+- ${GKLIB_PATH}/conf/check_thread_storage.c)
+- if(HAVE_THREADLOCALSTORAGE)
+- message(STATUS "checking for thread-local storage - found")
+- else()
+- message(STATUS "checking for thread-local storage - not found")
+- endif()
+- endif()
+- if(NOT HAVE_THREADLOCALSTORAGE)
+- set(GKlib_COPTIONS "${GKlib_COPTIONS} -D__thread=")
+- endif()
+-endif()
++configure_file(${GKLIB_PATH}/gklib_tls.h.in include/gklib_tls.h)
+
+ # Finally set the official C flags.
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GKlib_COPTIONS} ${GKlib_COPTS}")
+
+ # Find GKlib sources.
+diff -r 919706ae3202 GKlib/conf/check_thread_storage.c
+--- a/GKlib/conf/check_thread_storage.c Sat Dec 28 13:05:35 2013 -0600
++++ /dev/null Thu Jan 01 00:00:00 1970 +0000
+@@ -1,5 +0,0 @@
+-extern __thread int x;
+-
+-int main(int argc, char **argv) {
+- return 0;
+-}
+diff -r 919706ae3202 GKlib/error.c
+--- a/GKlib/error.c Sat Dec 28 13:05:35 2013 -0600
++++ b/GKlib/error.c Sat Dec 28 15:53:05 2013 -0600
+@@ -17,21 +17,21 @@ This file contains functions dealing wit
+
+
+ /* These are the jmp_buf for the graceful exit in case of severe errors.
+ Multiple buffers are defined to allow for recursive invokation. */
+ #define MAX_JBUFS 128
+-__thread int gk_cur_jbufs=-1;
+-__thread jmp_buf gk_jbufs[MAX_JBUFS];
+-__thread jmp_buf gk_jbuf;
++metis__thread int gk_cur_jbufs=-1;
++metis__thread jmp_buf gk_jbufs[MAX_JBUFS];
++metis__thread jmp_buf gk_jbuf;
+
+ typedef void (*gksighandler_t)(int);
+
+ /* These are the holders of the old singal handlers for the trapped signals */
+-static __thread gksighandler_t old_SIGMEM_handler; /* Custom signal */
+-static __thread gksighandler_t old_SIGERR_handler; /* Custom signal */
+-static __thread gksighandler_t old_SIGMEM_handlers[MAX_JBUFS]; /* Custom signal */
+-static __thread gksighandler_t old_SIGERR_handlers[MAX_JBUFS]; /* Custom signal */
++static metis__thread gksighandler_t old_SIGMEM_handler; /* Custom signal */
++static metis__thread gksighandler_t old_SIGERR_handler; /* Custom signal */
++static metis__thread gksighandler_t old_SIGMEM_handlers[MAX_JBUFS]; /* Custom signal */
++static metis__thread gksighandler_t old_SIGERR_handlers[MAX_JBUFS]; /* Custom signal */
+
+ /* The following is used to control if the gk_errexit() will actually abort or not.
+ There is always a single copy of this variable */
+ static int gk_exit_on_error = 1;
+
+@@ -176,11 +176,11 @@ char *gk_strerror(int errnum)
+ {
+ #if defined(WIN32) || defined(__MINGW32__)
+ return strerror(errnum);
+ #else
+ #ifndef SUNOS
+- static __thread char buf[1024];
++ static metis__thread char buf[1024];
+
+ strerror_r(errnum, buf, 1024);
+
+ buf[1023] = '\0';
+ return buf;
+diff -r 919706ae3202 GKlib/gk_arch.h
+--- a/GKlib/gk_arch.h Sat Dec 28 13:05:35 2013 -0600
++++ b/GKlib/gk_arch.h Sat Dec 28 15:53:05 2013 -0600
+@@ -11,22 +11,10 @@
+ #define _GK_ARCH_H_
+
+ /*************************************************************************
+ * Architecture-specific differences in header files
+ **************************************************************************/
+-#ifdef LINUX
+-#if !defined(__USE_XOPEN)
+-#define __USE_XOPEN
+-#endif
+-#if !defined(_XOPEN_SOURCE)
+-#define _XOPEN_SOURCE 600
+-#endif
+-#if !defined(__USE_XOPEN2K)
+-#define __USE_XOPEN2K
+-#endif
+-#endif
+-
+
+ #ifdef HAVE_EXECINFO_H
+ #include <execinfo.h>
+ #endif
+
+diff -r 919706ae3202 GKlib/gk_externs.h
+--- a/GKlib/gk_externs.h Sat Dec 28 13:05:35 2013 -0600
++++ b/GKlib/gk_externs.h Sat Dec 28 15:53:05 2013 -0600
+@@ -12,14 +12,19 @@
+
+
+ /*************************************************************************
+ * Extern variable definition. Hopefully, the __thread makes them thread-safe.
+ **************************************************************************/
++
++/* include the definition of metis__thread; it is assumed that
++ gklib_tls.h will be installed 'globally' i.e. into $PREFIX */
++#include <gklib_tls.h>
++
+ #ifndef _GK_ERROR_C_
+ /* declared in error.c */
+-extern __thread int gk_cur_jbufs;
+-extern __thread jmp_buf gk_jbufs[];
+-extern __thread jmp_buf gk_jbuf;
++extern metis__thread int gk_cur_jbufs;
++extern metis__thread jmp_buf gk_jbufs[];
++extern metis__thread jmp_buf gk_jbuf;
+
+ #endif
+
+ #endif
+diff -r 919706ae3202 GKlib/gklib_tls.h.in
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/GKlib/gklib_tls.h.in Sat Dec 28 15:53:05 2013 -0600
+@@ -0,0 +1,3 @@
++#ifndef metis__thread
++#define metis__thread @GKlib_TLS@
++#endif
+diff -r 919706ae3202 GKlib/memory.c
+--- a/GKlib/memory.c Sat Dec 28 13:05:35 2013 -0600
++++ b/GKlib/memory.c Sat Dec 28 15:53:05 2013 -0600
+@@ -14,11 +14,11 @@ can be used to define other memory alloc
+
+
+ #include <GKlib.h>
+
+ /* This is for the global mcore that tracks all heap allocations */
+-static __thread gk_mcore_t *gkmcore = NULL;
++static metis__thread gk_mcore_t *gkmcore = NULL;
+
+
+ /*************************************************************************/
+ /*! Define the set of memory allocation routines for each data type */
+ /**************************************************************************/
+diff -r 919706ae3202 GKlib/string.c
+--- a/GKlib/string.c Sat Dec 28 13:05:35 2013 -0600
++++ b/GKlib/string.c Sat Dec 28 15:53:05 2013 -0600
+@@ -480,11 +480,11 @@ char *gk_time2str(time_t time)
+ return datestr;
+ }
+
+
+
+-#if !defined(WIN32) && !defined(__MINGW32__)
++#if !defined(WIN32) && !defined(__MINGW32__) && defined(_XOPEN_SOURCE)
+ /************************************************************************/
+ /*! \brief Converts a date/time string into its equivalent time_t value
+
+ This function takes date and/or time specification and converts it in
+ the equivalent time_t representation. The conversion is done using the
Added: trunk/dports/math/metis/files/missing_includes.patch
===================================================================
--- trunk/dports/math/metis/files/missing_includes.patch (rev 0)
+++ trunk/dports/math/metis/files/missing_includes.patch 2013-12-30 19:52:12 UTC (rev 115287)
@@ -0,0 +1,20 @@
+# HG changeset patch
+# User Sean Farley <sean at mcs.anl.gov>
+# Date 1332269671 18000
+# Tue Mar 20 13:54:31 2012 -0500
+# Node ID b95c0c2e1d8bf8e3273f7d45e856f0c0127d998e
+# Parent 88049269953c67c3fdcc4309bf901508a875f0dc
+cmake: add gklib headers to install into include
+
+diff -r 88049269953c -r b95c0c2e1d8b libmetis/CMakeLists.txt
+--- a/libmetis/CMakeLists.txt Tue Mar 20 13:54:29 2012 -0500
++++ b/libmetis/CMakeLists.txt Tue Mar 20 13:54:31 2012 -0500
+@@ -12,6 +12,8 @@ endif()
+ if(METIS_INSTALL)
+ install(TARGETS metis
+ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION lib
+ ARCHIVE DESTINATION lib)
++ install(FILES gklib_defs.h DESTINATION include)
++ install(FILES gklib_rename.h DESTINATION include)
+ endif()
Deleted: trunk/dports/math/metis/files/patch-GKlib_GKlibSystem.cmake.diff
===================================================================
--- trunk/dports/math/metis/files/patch-GKlib_GKlibSystem.cmake.diff 2013-12-30 19:52:05 UTC (rev 115286)
+++ trunk/dports/math/metis/files/patch-GKlib_GKlibSystem.cmake.diff 2013-12-30 19:52:12 UTC (rev 115287)
@@ -1,11 +0,0 @@
---- GKlib/GKlibSystem.cmake.orig 2013-04-12 21:25:00.000000000 -0400
-+++ GKlib/GKlibSystem.cmake 2013-04-12 21:25:18.000000000 -0400
-@@ -33,7 +33,7 @@
- set(GKlib_COPTIONS "${GKlib_COPTIONS} -fPIC")
- endif(NOT MINGW)
- # GCC warnings.
-- set(GKlib_COPTIONS "${GKlib_COPTIONS} -Wall -pedantic -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unknown-pragmas")
-+ set(GKlib_COPTIONS "${GKlib_COPTIONS} -Wall -pedantic -Wno-unused-variable -Wno-unknown-pragmas")
- elseif(${CMAKE_C_COMPILER_ID} MATCHES "Sun")
- # Sun insists on -xc99.
- set(GKlib_COPTIONS "${GKlib_COPTIONS} -xc99")
Deleted: trunk/dports/math/metis/files/patch-Makefile-add-install-name-dir.diff
===================================================================
--- trunk/dports/math/metis/files/patch-Makefile-add-install-name-dir.diff 2013-12-30 19:52:05 UTC (rev 115286)
+++ trunk/dports/math/metis/files/patch-Makefile-add-install-name-dir.diff 2013-12-30 19:52:12 UTC (rev 115287)
@@ -1,10 +0,0 @@
---- Makefile.orig 2012-07-01 14:00:37.000000000 +0200
-+++ Makefile 2012-07-01 14:01:14.000000000 +0200
-@@ -44,6 +44,7 @@
- endif
- ifneq ($(prefix), not-set)
- CONFIG_FLAGS += -DCMAKE_INSTALL_PREFIX=$(prefix)
-+ CONFIG_FLAGS += -DCMAKE_INSTALL_NAME_DIR=$(prefix)/lib
- endif
- ifneq ($(shared), not-set)
- CONFIG_FLAGS += -DSHARED=1
Added: trunk/dports/math/metis/files/remove_home_dir.patch
===================================================================
--- trunk/dports/math/metis/files/remove_home_dir.patch (rev 0)
+++ trunk/dports/math/metis/files/remove_home_dir.patch 2013-12-30 19:52:12 UTC (rev 115287)
@@ -0,0 +1,20 @@
+# HG changeset patch
+# User Sean Farley <sean at mcs.anl.gov>
+# Date 1332269669 18000
+# Tue Mar 20 13:54:29 2012 -0500
+# Node ID bc20de47ec7e09494907774a7988b5948ce8e22a
+# Parent a85282f9ca5f07f4d20bdaf4f9f79726fd1235ee
+cmake: remove developer's home directory from source
+
+diff -r a85282f9ca5f -r bc20de47ec7e programs/CMakeLists.txt
+--- a/programs/CMakeLists.txt Mon Apr 08 16:49:34 2013 +0000
++++ b/programs/CMakeLists.txt Tue Mar 20 13:54:29 2012 -0500
+@@ -1,8 +1,7 @@
+ # These programs use internal metis data structures.
+ include_directories(../libmetis)
+-link_directories(/home/karypis/local/lib)
+ # Build program.
+ add_executable(gpmetis gpmetis.c cmdline_gpmetis.c io.c stat.c)
+ add_executable(ndmetis ndmetis.c cmdline_ndmetis.c io.c smbfactor.c)
+ add_executable(mpmetis mpmetis.c cmdline_mpmetis.c io.c stat.c)
+ add_executable(m2gmetis m2gmetis.c cmdline_m2gmetis.c io.c)
Added: trunk/dports/math/metis/files/sharedprefix.patch
===================================================================
--- trunk/dports/math/metis/files/sharedprefix.patch (rev 0)
+++ trunk/dports/math/metis/files/sharedprefix.patch 2013-12-30 19:52:12 UTC (rev 115287)
@@ -0,0 +1,23 @@
+# HG changeset patch
+# User Sean Farley <sean at mcs.anl.gov>
+# Date 1332269669 18000
+# Tue Mar 20 13:54:29 2012 -0500
+# Node ID 88049269953c67c3fdcc4309bf901508a875f0dc
+# Parent aed7f236f05776012de66d24f7abf7b0395e7a97
+cmake: added install_name for shared prefix builds
+
+diff -r aed7f236f057 -r 88049269953c CMakeLists.txt
+--- a/CMakeLists.txt Tue Mar 20 13:54:29 2012 -0500
++++ b/CMakeLists.txt Tue Mar 20 13:54:29 2012 -0500
+@@ -11,10 +11,11 @@ else()
+ endif()
+
+ # Configure libmetis library.
+ if(SHARED)
+ set(METIS_LIBRARY_TYPE SHARED)
++ set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
+ else()
+ set(METIS_LIBRARY_TYPE STATIC)
+ endif(SHARED)
+
+ include(${GKLIB_PATH}/GKlibSystem.cmake)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20131230/54a1c0af/attachment-0001.html>
More information about the macports-changes
mailing list