+#
+# Conditional build:
+%bcond_with system_protobuf # build with system protobuf library
+#
Summary: Parallel visualization application
Name: ParaView
Version: 4.0.1
-Release: 2
+Release: 12
License: BSD
Group: Applications/Engineering
URL: http://www.paraview.org/
Patch2: %{name}-system-Protobuf.patch
Patch3: %{name}-system-netcdf.patch
Patch4: disable-broken-tests.patch
+Patch5: protobuf.patch
BuildRequires: Mesa-libOSMesa-devel
BuildRequires: QtDesigner-devel
BuildRequires: QtHelp-devel
BuildRequires: doxygen
BuildRequires: expat-devel
BuildRequires: freetype-devel
+BuildRequires: gl2ps-devel
BuildRequires: gnuplot
BuildRequires: graphviz
BuildRequires: hdf5-devel
BuildRequires: netcdf-devel
BuildRequires: netcdf-cxx-devel
BuildRequires: openssl-devel
-BuildRequires: protobuf-devel
+%{?with_system_protobuf:BuildRequires: protobuf-devel}
BuildRequires: python-devel
BuildRequires: qt4-build
BuildRequires: readline-devel
%define skip_post_check_so lib.*Python.*\.so.*
+# avoid provide clash with vtk.spec
+%define _noautoprov libvtk.*\.so.* vtk.*\.so.*
+%define _noautoreq libvtk.*\.so.* vtk.*\.so.*
+
%description
ParaView is an application designed with the need to visualize large
data sets in mind. The goals of the ParaView project include the
%setup -q -n %{name}-v%{version}-source
%patch0 -p0
%patch1 -p1
-%patch2 -p1
%patch3 -p0
%patch4 -p1
+
+%if %{with system_protobuf}
+%patch2 -p1
+%patch5 -p1
#Remove included thirdparty sources just to be sure
for x in protobuf ; do
rm -r ThirdParty/$x/vtk$x
done
+%endif
+
for x in expat freetype gl2ps hdf5 jpeg libxml2 netcdf oggtheora png sqlite tiff zlib ; do
rm -r VTK/ThirdParty/$x/vtk$x
done
-DVTK_USE_OGGTHEORA_ENCODER:BOOL=ON \
-DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \
+ -DFREETYPE_INCLUDE_DIRS=%{_includedir}/freetype2 \
-DVTK_USE_SYSTEM_HDF5:BOOL=ON \
-DVTK_USE_SYSTEM_HDF5=ON \
-DHDF5_HL_LIBRARY:FILEPATH=%{_libdir}/libhdf5_hl.so \
-DVTK_USE_SYSTEM_LIBRARIES:BOOL=ON \
-DVTK_USE_SYSTEM_LIBRARIES=ON \
-DVTK_USE_SYSTEM_PNG:BOOL=ON \
+ -DVTK_USE_SYSTEM_PROTOBUF:BOOL=%{?with_system_protobuf:ON}%{!?with_system_protobuf:OFF} \
-DVTK_USE_SYSTEM_TIFF:BOOL=ON \
-DVTK_USE_SYSTEM_ZLIB:BOOL=ON \
-DVTK_CUSTOM_LIBRARY_SUFFIX="" \