- Fix compilation with boost 1.49 and enable boost again
OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=30
This commit is contained in:
parent
25be06f83b
commit
8259eb2953
39
vtk-boost149.patch
Normal file
39
vtk-boost149.patch
Normal file
@ -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<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 +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:
|
@ -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
|
||||
|
||||
|
20
vtk.spec
20
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}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user