# Conditional build
%bcond_without java # Java wrappers
%bcond_without ffmpeg # FFMPEG .avi saving support
-%bcond_with doc # do not build and package doxygen documentation
+%bcond_without doc # doxygen documentation
%bcond_with OSMesa # build with OSMesa (https://bugzilla.redhat.com/show_bug.cgi?id=744434)
-%bcond_with system_gl2ps # use system gl2ps (VTK currently is carrying local modifications to gl2ps)
+%bcond_with system_gl2ps # use system gl2ps (VTK currently is carrying local modifications to gl2ps, incl. gl2psTextOptColorBL function)
Summary: Toolkit for 3D computer graphics, image processing, and visualization
Summary(pl.UTF-8): Zestaw narzędzi do trójwymiarowej grafiki, przetwarzania obrazu i wizualizacji
Name: vtk
Version: 8.2.0
-Release: 3
+Release: 6
License: BSD
Group: Libraries
#Source0Download: https://vtk.org/download/
Patch5: link.patch
Patch6: system-pugixml.patch
Patch7: freetype.patch
+Patch8: %{name}-doc.patch
URL: https://vtk.org/
%{?with_OSMesa:BuildRequires: Mesa-libOSMesa-devel}
BuildRequires: OpenGL-GLX-devel
BuildRequires: fontconfig-devel
BuildRequires: freetype-devel >= 2
BuildRequires: gdal-devel
-%{?with_system_gl2ps:BuildRequires: gl2ps-devel >= 1.3.8}
+%{?with_system_gl2ps:BuildRequires: gl2ps-devel >= 1.4.0}
BuildRequires: glew-devel
BuildRequires: gnuplot
BuildRequires: graphviz
BuildConflicts: libXNVCtrl-devel
Obsoletes: vtk-tcl < 8.2.0-1
Obsoletes: vtk-tcl-devel < 8.2.0-1
-%{?with_system_gl2ps:Requires: gl2ps >= 1.3.8}
+%{?with_system_gl2ps:Requires: gl2ps >= 1.4.0}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define skip_post_check_so lib.*Python.*\.so.*
Summary: Data files for VTK
Summary(pl.UTF-8): Pliki danych dla VTK
Group: Development/Libraries
-%{?noarchpackage}
+BuildArch: noarch
%description data
This package contains all the data from the VTKData repository. These
%patch5 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
# Replace relative path ../../../VTKData with destination filesystem path
grep -Erl '(\.\./)+VTKData' Examples | xargs \
- %{__perl} -pi -e 's,(\.\./)+VTKData,%{_datadir}/vtk-8.1,g'
+ %{__perl} -pi -e 's,(\.\./)+VTKData,%{_datadir}/vtk-8.2,g'
# Save an unbuilt copy of the Example's sources for %doc
mkdir vtk-examples
%cmake .. \
$ccache \
-Wno-dev \
- %{cmake_on_off doc DBUILD_DOCUMENTATION} \
+ %{cmake_on_off doc BUILD_DOCUMENTATION} \
-DBUILD_EXAMPLES:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_TESTING:BOOL=ON \
-DCMAKE_SKIP_RPATH:BOOL=ON \
+ -DDOXYGEN_GENERATE_HTMLHELP=OFF \
-DOPENGL_INCLUDE_PATH:PATH=%{_includedir}/GL \
-DPYTHON_INCLUDE_PATH:PATH=%{py3_incdir} \
-DPYTHON_LIBRARY:FILEPATH=%{_libdir}/libpython%{py3_ver}.so \
# TODO: -DModule_vtkRenderingParallelLIC:BOOL=ON (BR: MPI)
%{__make}
-%{?with_doc:%{__make} DoxygenDoc}
+
+%if %{with doc}
+%{__make} DoxygenDoc
+%endif
%install
rm -rf $RPM_BUILD_ROOT
echo %{_libdir}/vtk > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/vtk-%{_arch}.conf
for f in $(cd build/ExternalData/Testing ; find Data -type l); do
- install -Dp build/ExternalData/Testing/$f $RPM_BUILD_ROOT%{_datadir}/vtk-8.1/$f
+ install -Dp build/ExternalData/Testing/$f $RPM_BUILD_ROOT%{_datadir}/vtk-8.2/$f
done
+# proprietary font, even not used; invalid UTF-8 in signature returned by libmagic)
+# (commented out in Views/Infovis/Testing/Cxx/TestQtLabelStrategy.cxx)
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/vtk-8.2/Data/Infovis/DaveDS_-_Sketchy.ttf
+
# Install examples
for f in \
AmbientSpheres \
%files data
%defattr(644,root,root,755)
-%dir %{_datadir}/vtk-8.1
-%{_datadir}/vtk-8.1/Data
+%dir %{_datadir}/vtk-8.2
+%{_datadir}/vtk-8.2/Data