[packages/ParaView/Paraview-3.12: 3/3] fix building with boost >= 1.49
draenog
draenog at pld-linux.org
Mon Feb 17 07:58:12 CET 2014
commit 1891ff8dd120d7d9978be7e38035adcbe3469413
Author: Kacper Kornet <draenog at pld-linux.org>
Date: Mon Feb 17 06:55:34 2014 +0000
fix building with boost >= 1.49
ParaView-3.12.0-boost-1.48.0-bfs.patch | 23 +++++++++++++++++------
ParaView.spec | 3 +--
2 files changed, 18 insertions(+), 8 deletions(-)
---
diff --git a/ParaView.spec b/ParaView.spec
index 92f87e6..926d049 100644
--- a/ParaView.spec
+++ b/ParaView.spec
@@ -80,8 +80,7 @@ developing applications that use %{name}.
%prep
%setup -q
%patch0 -p1
-# We don't have boot 1.48 yet
-#%patch1 -p1
+%patch1 -p1
%patch2 -p1
%patch3 -p1
#Remove included hdf5 just to be sure
diff --git a/ParaView-3.12.0-boost-1.48.0-bfs.patch b/ParaView-3.12.0-boost-1.48.0-bfs.patch
index 5cc2217..43b4ea8 100644
--- a/ParaView-3.12.0-boost-1.48.0-bfs.patch
+++ b/ParaView-3.12.0-boost-1.48.0-bfs.patch
@@ -1,29 +1,40 @@
diff -up ParaView-3.12.0/VTK/Infovis/vtkBoostBreadthFirstSearchTree.cxx\~ ParaView-3.12.0/VTK/Infovis/vtkBoostBreadthFirstSearchTree.cxx
--- ParaView-3.12.0/VTK/Infovis/vtkBoostBreadthFirstSearchTree.cxx~ 2011-11-08 21:56:37.000000000 +0100
+++ ParaView-3.12.0/VTK/Infovis/vtkBoostBreadthFirstSearchTree.cxx 2011-12-06 01:11:42.487760688 +0100
-@@ -47,6 +47,15 @@ using namespace boost;
+@@ -47,6 +47,23 @@ using namespace boost;
vtkStandardNewMacro(vtkBoostBreadthFirstSearchTree);
++#if BOOST_VERSION >= 104800 // Boost 1.48.x
+namespace {
-+ vtkIdType unwrap_edge_id(vtkEdgeType const &e) {
++ vtkIdType unwrap_edge_id(vtkEdgeType const &e)
++ {
+ return e.Id;
+ }
-+ vtkIdType unwrap_edge_id(boost::detail::reverse_graph_edge_descriptor<vtkEdgeType> const &e) {
++ vtkIdType unwrap_edge_id(boost::detail::reverse_graph_edge_descriptor<vtkEdgeType> const &e)
++ {
++# if BOOST_VERSION == 104800
+ return e.underlying_desc.Id;
++# else
++ return e.underlying_descx.Id;
++# endif
+ }
+}
++#endif
+
// Redefine the bfs visitor, the only visitor we
// are using is the tree_edge visitor.
template <typename IdMap>
-@@ -95,7 +104,8 @@ public:
+@@ -95,7 +112,12 @@ public:
// Copy the vertex and edge data from the graph to the tree.
tree->GetVertexData()->CopyData(graph->GetVertexData(), v, tree_v);
-- tree->GetEdgeData()->CopyData(graph->GetEdgeData(), e.Id, tree_e.Id);
++#if BOOST_VERSION < 104800 // Boost 1.48.x
+ tree->GetEdgeData()->CopyData(graph->GetEdgeData(), e.Id, tree_e.Id);
++#else
+ tree->GetEdgeData()->CopyData(graph->GetEdgeData(),
-+ unwrap_edge_id(e), tree_e.Id);
++ unwrap_edge_id(e), tree_e.Id);
++#endif
}
private:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ParaView.git/commitdiff/1891ff8dd120d7d9978be7e38035adcbe3469413
More information about the pld-cvs-commit
mailing list