From c59700567bc550db3ccfd36c6827fc7dafe65a8c Mon Sep 17 00:00:00 2001 From: Ben Woods Date: Thu, 1 Mar 2018 12:09:48 +0000 Subject: [PATCH] math/ogdf: unbreak build with Clang 6 (C++14 by default) The bundled version of CoinMP required the same patches as those applied to the port math/coinmp, so the patches were copied from there. Submitted by: jbeich (via commit r458136) Reported by: antoine (via bug 224669) --- math/ogdf/Makefile | 1 + .../files/patch-include_coin_CglLandPUtils.hpp | 17 +++++++++++++++++ math/ogdf/files/patch-src_coin_Clp_ClpModel.cpp | 15 +++++++++++++++ ...ch-src_coin_OsiClp_OsiClpSolverInterface.cpp | 15 +++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 math/ogdf/files/patch-include_coin_CglLandPUtils.hpp create mode 100644 math/ogdf/files/patch-src_coin_Clp_ClpModel.cpp create mode 100644 math/ogdf/files/patch-src_coin_OsiClp_OsiClpSolverInterface.cpp diff --git a/math/ogdf/Makefile b/math/ogdf/Makefile index 33791557f437..4dfe3296b871 100644 --- a/math/ogdf/Makefile +++ b/math/ogdf/Makefile @@ -3,6 +3,7 @@ PORTNAME= ogdf PORTVERSION= 2015.05 +PORTREVISION= 1 CATEGORIES= math MASTER_SITES= http://www.ogdf.net/lib/exe/fetch.php/tech: DISTNAME= ${PORTNAME}.v${PORTVERSION} diff --git a/math/ogdf/files/patch-include_coin_CglLandPUtils.hpp b/math/ogdf/files/patch-include_coin_CglLandPUtils.hpp new file mode 100644 index 000000000000..3a27da33a5bb --- /dev/null +++ b/math/ogdf/files/patch-include_coin_CglLandPUtils.hpp @@ -0,0 +1,17 @@ +In file included from CglLandPSimplex.cpp:11: +In file included from ./CglLandPSimplex.hpp:31: +./CglLandPUtils.hpp:88:25: error: reinterpret_cast from 'nullptr_t' to 'OsiRowCut *' is not allowed + cuts_.resize(i, reinterpret_cast (NULL)); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +--- include/coin/CglLandPUtils.hpp.orig 2015-05-29 15:36:11 UTC ++++ include/coin/CglLandPUtils.hpp +@@ -85,7 +85,7 @@ struct Cuts + /** resize vector.*/ + void resize(unsigned int i) + { +- cuts_.resize(i, reinterpret_cast (NULL)); ++ cuts_.resize(i, static_cast (NULL)); + } + private: + /** Stores the number of cuts.*/ diff --git a/math/ogdf/files/patch-src_coin_Clp_ClpModel.cpp b/math/ogdf/files/patch-src_coin_Clp_ClpModel.cpp new file mode 100644 index 000000000000..0e979f79517d --- /dev/null +++ b/math/ogdf/files/patch-src_coin_Clp_ClpModel.cpp @@ -0,0 +1,15 @@ +ClpModel.cpp:3848:24: error: reinterpret_cast from 'nullptr_t' to 'const char *' is not allowed + reinterpret_cast (NULL) /*integrality*/, + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +--- src/coin/Clp/ClpModel.cpp.orig 2015-05-29 15:36:41 UTC ++++ src/coin/Clp/ClpModel.cpp +@@ -3619,7 +3619,7 @@ ClpModel::writeMps(const char *filename, + writer.setMpsData(*(matrix_->getPackedMatrix()), COIN_DBL_MAX, + getColLower(), getColUpper(), + objective, +- reinterpret_cast (NULL) /*integrality*/, ++ static_cast (NULL) /*integrality*/, + getRowLower(), getRowUpper(), + columnNames, rowNames); + // Pass in array saying if each variable integer diff --git a/math/ogdf/files/patch-src_coin_OsiClp_OsiClpSolverInterface.cpp b/math/ogdf/files/patch-src_coin_OsiClp_OsiClpSolverInterface.cpp new file mode 100644 index 000000000000..0659737b62d0 --- /dev/null +++ b/math/ogdf/files/patch-src_coin_OsiClp_OsiClpSolverInterface.cpp @@ -0,0 +1,15 @@ +OsiClpSolverInterface.cpp:1451:50: error: reinterpret_cast from 'nullptr_t' to 'int *' is not allowed + messagesPointer->setDetailMessages(100,10000,reinterpret_cast (NULL)); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +--- src/coin/OsiClp/OsiClpSolverInterface.cpp.orig 2015-05-29 15:36:45 UTC ++++ src/coin/OsiClp/OsiClpSolverInterface.cpp +@@ -1422,7 +1422,7 @@ OsiClpSolverInterface::setupForRepeatedUse(int senseOf + if (stopPrinting) { + CoinMessages * messagesPointer = modelPtr_->messagesPointer(); + // won't even build messages +- messagesPointer->setDetailMessages(100,10000,reinterpret_cast (NULL)); ++ messagesPointer->setDetailMessages(100,10000,static_cast (NULL)); + } + #endif + }