From 8259eb295342ad52f0814b9a36612275ec3dfb14424784605e8daf6dfb5ff535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Sun, 8 Apr 2012 13:38:48 +0000 Subject: [PATCH] - Fix compilation with boost 1.49 and enable boost again OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=30 --- vtk-boost149.patch | 39 +++++++++++++++++++++++++++++++++++++++ vtk.changes | 5 +++++ vtk.spec | 20 ++++++++++---------- 3 files changed, 54 insertions(+), 10 deletions(-) create mode 100644 vtk-boost149.patch diff --git a/vtk-boost149.patch b/vtk-boost149.patch new file mode 100644 index 0000000..ce3b41f --- /dev/null +++ b/vtk-boost149.patch @@ -0,0 +1,39 @@ +Index: VTK/Infovis/vtkBoostBreadthFirstSearchTree.cxx +=================================================================== +--- VTK.orig/Infovis/vtkBoostBreadthFirstSearchTree.cxx ++++ VTK/Infovis/vtkBoostBreadthFirstSearchTree.cxx +@@ -47,6 +47,21 @@ using namespace boost; + vtkStandardNewMacro(vtkBoostBreadthFirstSearchTree); + + ++#if BOOST_VERSION >= 104800 // Boost 1.48.x ++namespace { ++ vtkIdType unwrap_edge_id(vtkEdgeType const &e) { ++ return e.Id; ++ } ++ vtkIdType unwrap_edge_id(boost::detail::reverse_graph_edge_descriptor 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 +@@ -95,7 +110,12 @@ public: + + // Copy the vertex and edge data from the graph to the tree. + tree->GetVertexData()->CopyData(graph->GetVertexData(), v, tree_v); ++#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); ++#endif + } + + private: diff --git a/vtk.changes b/vtk.changes index 71ba8b6..50365de 100644 --- a/vtk.changes +++ b/vtk.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Apr 8 11:22:34 UTC 2012 - idonmez@suse.com + +- Fix compilation with boost 1.49 and enable boost again + ------------------------------------------------------------------- Tue Mar 27 14:15:13 UTC 2012 - toddrme2178@gmail.com diff --git a/vtk.spec b/vtk.spec index bcced99..d3c559e 100644 --- a/vtk.spec +++ b/vtk.spec @@ -15,16 +15,17 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: vtk Version: 5.8.0 -Release: 1 +Release: 0 # This is a variant BSD license, a cross between BSD and ZLIB. # For all intents, it has the same rights and restrictions as BSD. # http://fedoraproject.org/wiki/Licensing/BSD#VTKBSDVariant -License: BSD-3-Clause Summary: The Visualization Toolkit - A high level 3D visualization library -Url: http://vtk.org/ +License: BSD-3-Clause Group: Productivity/Scientific/Other +Url: http://vtk.org/ Source: http://www.vtk.org/files/release/5.8/%{name}-%{version}.tar.gz # PATCH-FIX-UPSTREAM vtk-pythondestdir.patch --badshah400@gmail.com Correct installation destination for python libraries Patch0: vtk-pythondestdir.patch @@ -35,6 +36,8 @@ Patch1: vtk-system.patch Patch2: vtk-sqldatabaseschema.patch # patch to fix the soname for libVTKnetcdf_cxx Patch3: vtk-soversion2.patch +# PATCH-FIX-UPSTREAM vtk-boost149.patch idoenmez@suse.de -- Fix compilation with boost 1.49 +Patch4: vtk-boost149.patch BuildRequires: Mesa-devel BuildRequires: MesaGLw-devel BuildRequires: boost-devel @@ -85,8 +88,6 @@ Summary: VTK header files for building C++ code Group: Development/Libraries/Other Requires: %{name} = %{version} Requires: %{name}-java = %{version} -Requires: python-%{name} = %{version} -Requires: python-%{name}-qt = %{version} Requires: %{name}-qt = %{version} Requires: %{name}-tcl = %{version} Requires: Mesa-devel @@ -99,6 +100,8 @@ Requires: libqt4-devel Requires: libtheora-devel Requires: libtiff-devel Requires: postgresql-devel +Requires: python-%{name} = %{version} +Requires: python-%{name}-qt = %{version} %description devel VTK is an open-source software system for image processing, 3D @@ -143,8 +146,8 @@ This package provides python bindings for VTK. Summary: Qt Python VTK widget Group: System/Libraries Requires: %{name} = %{version} -Requires: python-%{name} = %{version} Requires: %{name}-qt = %{version} +Requires: python-%{name} = %{version} Requires: python-qt4 %{py_requires} @@ -223,6 +226,7 @@ This package provides a few testing programs for VTK %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # Replace relative path ../../../VTKData with %%{_datadir}/%%{name}data-%%{version} # otherwise it will break on symlinks. @@ -266,12 +270,8 @@ cmake . \ -DVTK_WRAP_PYTHON:BOOL=ON \ -DVTK_WRAP_PYTHON_SIP:BOOL=ON \ -DVTK_WRAP_TCL:BOOL=ON \ -%if 0%{?suse_version} <= 1210 -DVTK_USE_BOOST:BOOL=ON \ -DVTK_USE_TEXT_ANALYSIS:BOOL=ON -%endif -# VTK boost libraries broken for boost 1.49+: http://vtk.org/Bug/view.php?id=12988 -# VTK_USE_TEXT_ANALYSIS depends on VTK_USE_BOOST make %{?_smp_mflags}