2011-04-20 10:24:25 +02:00
#
2013-07-13 14:13:29 +02:00
# spec file for package paraview
2011-04-20 10:24:25 +02:00
#
2020-01-31 18:14:50 +01:00
# Copyright (c) 2020 SUSE LLC
2011-04-20 10:24:25 +02:00
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2018-12-05 14:55:34 +01:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2011-04-20 10:24:25 +02:00
#
2018-12-03 20:11:01 +01:00
2020-02-27 12:57:31 +01:00
%define major_ver 5.8
%define shlib libparaview5_8
2019-08-17 12:28:33 +02:00
2020-01-31 18:14:50 +01:00
%if 0%{?suse_version} <= 1500
%bcond_with pugixml
%else
%bcond_without pugixml
%endif
# Need unrelased version > 1.4.0 with e.g. gl2psTextOptColorBL
%bcond_with gl2ps
# Need patched version with HPDF_SHADING
%bcond_with haru
2020-02-27 12:57:31 +01:00
%define __builder ninja
2011-04-20 10:24:25 +02:00
Name : paraview
2020-08-06 21:56:28 +02:00
Version : 5.8.1
2013-07-13 14:13:29 +02:00
Release : 0
2011-04-20 10:24:25 +02:00
Summary : Data analysis and visualization application
2013-07-13 14:13:29 +02:00
License : BSD-3-Clause
2011-04-20 10:24:25 +02:00
Group : Productivity/Scientific/Physics
2020-01-31 18:14:50 +01:00
URL : https://www.paraview.org
2019-08-17 12:28:33 +02:00
Source0 : https://www.paraview.org/files/v%{major_ver} /ParaView-v%{version} .tar.xz
2014-09-11 11:08:53 +02:00
Source1 : %{name} -rpmlintrc
2019-08-17 12:28:33 +02:00
# CAUTION: GettingStarted may or may not be updated with each minor version
2020-08-06 21:56:28 +02:00
Source2 : https://www.paraview.org/files/v%{major_ver} /ParaViewGettingStarted-%{version} .pdf
2019-08-17 12:28:33 +02:00
Source3 : https://www.paraview.org/files/v%{major_ver} /ParaViewGuide-%{version} .pdf
2014-09-11 10:57:03 +02:00
# PATCH-FIX-UPSTREAM paraview-desktop-entry-fix.patch badshah400@gmail.com -- Fix desktop menu entry by inserting proper required categories
Patch1 : paraview-desktop-entry-fix.patch
2020-04-10 22:59:43 +02:00
# PATCH-FIX-UPSTREAM fix-3d48a287-support-new-api-cgio_read_data_type.patch -- Add support for new API cgio_read_***data***_type
Patch2 : fix-3d48a287-support-new-api-cgio_read_data_type.patch
2020-05-11 16:26:57 +02:00
# PATCH-FIX-OPENSUSE fix-libharu-missing-m.patch -- missing libraries for linking (gh#libharu/libharu#213)
2018-08-17 13:12:42 +02:00
Patch8 : fix-libharu-missing-m.patch
2020-05-11 16:26:57 +02:00
# PATCH-FIX-OPENSUSE bundled_exodusii_add_missing_libpthread.patch stefan.bruens@rwth-aachen.de -- Add missing libm for linking (updated to upstream patch, see https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6865)
2020-01-31 18:14:50 +01:00
Patch10 : bundled_exodusii_add_missing_libpthread.patch
2020-12-06 20:15:20 +01:00
# PATCH-FIX-UPSTREAM paraview-vtkFreeTypeTools-internal-macro.patch badshah400@gmail.com -- vtkFreeTypeTools: avoid using an internal macro; patch taken from upstream vtk git and rebased to apply with -p1
Patch11 : paraview-vtkFreeTypeTools-internal-macro.patch
2011-04-20 10:24:25 +02:00
BuildRequires : Mesa-devel
2020-01-31 18:14:50 +01:00
BuildRequires : cgns-devel
2020-05-06 13:11:02 +02:00
BuildRequires : cmake >= 3.13
2020-02-11 01:33:43 +01:00
BuildRequires : desktop-file-utils
2020-01-31 18:14:50 +01:00
BuildRequires : double-conversion-devel
2011-04-20 10:24:25 +02:00
BuildRequires : doxygen
2020-02-11 01:33:43 +01:00
BuildRequires : exodusii-devel
2020-01-31 18:14:50 +01:00
BuildRequires : fdupes
2020-02-11 01:33:43 +01:00
BuildRequires : gcc-c++
BuildRequires : gcc-fortran
2011-04-20 10:24:25 +02:00
BuildRequires : gnuplot
BuildRequires : graphviz
2020-01-31 18:14:50 +01:00
BuildRequires : hdf5-devel
BuildRequires : libboost_graph-devel
BuildRequires : libboost_headers-devel
2020-02-27 12:57:31 +01:00
%if %{with gl2ps}
BuildRequires : gl2ps-devel
%endif
2020-01-31 18:14:50 +01:00
%if %{with haru}
BuildRequires : libharu-devel > 2.3.0
%endif
BuildRequires : libnetcdf_c++-devel
2020-02-27 12:57:31 +01:00
BuildRequires : ninja
2020-02-11 01:33:43 +01:00
BuildRequires : python3-Sphinx
BuildRequires : python3-Twisted
BuildRequires : python3-devel
BuildRequires : python3-matplotlib
BuildRequires : python3-qt5-devel
2018-12-03 20:11:01 +01:00
BuildRequires : readline-devel
2020-02-11 01:33:43 +01:00
BuildRequires : utfcpp-devel
2018-12-03 20:11:01 +01:00
BuildRequires : wget
2016-12-03 14:07:03 +01:00
BuildRequires : pkgconfig(Qt5Core)
BuildRequires : pkgconfig(Qt5Gui)
BuildRequires : pkgconfig(Qt5Help)
BuildRequires : pkgconfig(Qt5Network)
BuildRequires : pkgconfig(Qt5PrintSupport)
2020-01-31 18:14:50 +01:00
BuildRequires : pkgconfig(Qt5WebEngine)
2016-12-03 14:07:03 +01:00
BuildRequires : pkgconfig(Qt5Widgets)
BuildRequires : pkgconfig(Qt5X11Extras)
BuildRequires : pkgconfig(Qt5Xml)
2020-01-31 18:14:50 +01:00
BuildRequires : pkgconfig(eigen3) >= 2.91.0
2020-02-11 01:33:43 +01:00
BuildRequires : pkgconfig(expat)
2020-01-31 18:14:50 +01:00
BuildRequires : pkgconfig(freetype2)
BuildRequires : pkgconfig(glew)
BuildRequires : pkgconfig(jsoncpp) >= 0.7.0
2020-02-11 01:33:43 +01:00
BuildRequires : pkgconfig(libjpeg)
2020-01-31 18:14:50 +01:00
BuildRequires : pkgconfig(liblz4) >= 1.7.3
BuildRequires : pkgconfig(libpng)
2020-02-11 01:33:43 +01:00
BuildRequires : pkgconfig(libpqxx)
BuildRequires : pkgconfig(libtiff-4)
2020-01-31 18:14:50 +01:00
BuildRequires : pkgconfig(netcdf)
BuildRequires : pkgconfig(ogg)
2020-02-11 01:33:43 +01:00
BuildRequires : pkgconfig(openssl)
2020-01-31 18:14:50 +01:00
BuildRequires : pkgconfig(protobuf) >= 2.6.0
%if %{with pugixml}
BuildRequires : pkgconfig(pugixml)
%endif
BuildRequires : pkgconfig(theora)
BuildRequires : pkgconfig(xt)
2020-02-11 01:33:43 +01:00
BuildRequires : pkgconfig(zlib)
Recommends: %{name} -plugins
2011-04-20 10:24:25 +02:00
Requires : gnuplot
Requires : graphviz
2020-02-11 01:33:43 +01:00
Requires(post) : /sbin/ldconfig
Requires(postun) : /sbin/ldconfig
2020-08-06 21:56:28 +02:00
# Disable on aarch64 since GLES isn't supported for bundled vtk but is needed for paraview
ExcludeArch : aarch64
2020-02-11 01:33:43 +01:00
BuildRoot : %{_tmppath} /%{name} -%{version} -build
2011-04-20 10:24:25 +02:00
%description
2018-12-05 14:55:34 +01:00
ParaView is a data analysis and visualization application for
visualizing large data sets.
2011-04-20 10:24:25 +02:00
2018-12-03 20:11:01 +01:00
ParaView runs on distributed and shared memory systems alike. It uses VTK
(the Visualization Toolkit) as the data processing and rendering engine.
Data exploration can be done interactively in 3D or programmatically using
batch processing.
2011-04-20 10:24:25 +02:00
NOTE: The version in this package has NOT been compiled with MPI support.
2020-02-11 01:33:43 +01:00
%package -n %{shlib}
Summary : Shared libraries for Paraview
Group : Productivity/Scientific/Physics
%description -n %{shlib}
This package provides the shared libraries for paraview.
2018-12-03 20:11:01 +01:00
%package devel
Summary : Headers for building ParaView plugins or embedding Catalyst
Group : Development/Libraries/Other
2020-02-11 01:33:43 +01:00
Requires : %{shlib} = %{version}
2020-02-27 12:57:31 +01:00
Requires : cmake >= 3.3
Requires : glibc-devel
Requires : libboost_thread-devel
2018-12-03 20:11:01 +01:00
%description devel
This package contains headers and libraries required to build plugins
for ParaView or to embed ParaView Catalyst in a simulation program.
2020-02-11 01:33:43 +01:00
%package -n python3-paraview
Summary : Python bindings for Paraview
Group : Productivity/Scientific/Physics
Requires : python3
Requires : python3-Twisted
2020-02-27 12:57:31 +01:00
Requires : python3-matplotlib
Requires : python3-numpy
2020-02-11 01:33:43 +01:00
Requires : python3-qt5
2020-05-06 13:03:26 +02:00
%package devel-static
Summary : Static libraries for Paraview, needed to building plugins
Group : Productivity/Scientific/Physics
Requires : %{name} -devel = %{version}
%description devel-static
This package contains the static libraries for Paraview, needed, for
example, to build plugins for paraview.
2020-02-11 01:33:43 +01:00
%description -n python3-paraview
This package provides the python(3) bindings and modules for paraview.
%package plugins
Summary : Plugins for paraview
Group : Productivity/Scientific/Physics
Requires : %{name} = %{version}
%description plugins
This package provides the paraview plugins bundled with the upstream release.
2011-04-20 10:24:25 +02:00
%prep
2020-02-11 01:33:43 +01:00
%autosetup -p1 -n ParaView-v%{version}
# FIX env BASED HASHBANG
2020-02-27 12:57:31 +01:00
sed -Ei " 1 { s | # ! / u s r / b i n / e n v p y t h o n 3 | # ! / u s r / b i n / p y t h o n 3 | } " Clients/CommandLineExecutables/paraview-config
2011-04-20 10:24:25 +02:00
%build
2019-09-20 23:39:59 +02:00
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
2020-02-11 01:33:43 +01:00
%cmake -DCMAKE_INSTALL_LIBDIR=%{_lib} \
-DCMAKE_INSTALL_DOCDIR=%{_docdir} /%{name} \
-DPARAVIEW_BUILD_SHARED_LIBS:BOOL=ON \
2020-07-17 23:33:45 +02:00
%if 0%{?suse_version} <= 1500
2020-02-11 01:33:43 +01:00
-DCMAKE_SKIP_RPATH:BOOL=OFF \
2020-07-17 23:33:45 +02:00
-DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \
%endif
2020-02-11 01:33:43 +01:00
-DPARAVIEW_USE_VTKM:BOOL=OFF \
2020-02-27 12:57:31 +01:00
-DPARAVIEW_USE_QT:BOOL=ON \
-DPARAVIEW_USE_PYTHON:BOOL=ON \
-DPARAVIEW_PYTHON_SITE_PACKAGES_SUFFIX=%{_lib}/python%{py3_ver} /site-packages/paraview \
2020-05-11 16:26:57 +02:00
-DVTK_PYTHON_OPTIONAL_LINK:BOOL=OFF \
2020-02-11 01:33:43 +01:00
-DPARAVIEW_ENABLE_WEB:BOOL=ON \
-DVTK_WRAP_PYTHON:BOOL=ON \
-DVTK_OPENGL_HAS_OSMESA:BOOL=OFF \
-DBUILD_EXAMPLES:BOOL=OFF \
-DBUILD_TESTING:BOOL=OFF \
-DQtTesting_INSTALL_NO_DEVELOPMENT:BOOL=ON \
-DVTK_BUILD_QT_DESIGNER_PLUGIN:BOOL=OFF \
-DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON \
2020-02-27 12:57:31 +01:00
-DPARAVIEW_BUILD_WITH_EXTERNAL:BOOL=ON \
2020-02-11 01:33:43 +01:00
-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=%{?with_gl2ps:ON}%{!?with_gl2ps:OFF} \
-DVTK_MODULE_USE_EXTERNAL_VTK_libharu=%{?with_haru:ON}%{!?with_haru:OFF} \
2020-05-06 13:11:02 +02:00
-DVTK_MODULE_USE_EXTERNAL_VTK_pugixml=%{?with_pugixml:ON}%{!?with_pugixml:OFF}
2020-02-27 12:57:31 +01:00
%cmake_build
2011-04-20 10:24:25 +02:00
%install
2018-12-05 14:55:34 +01:00
find . \( -name \*.txt -o -name \*.xml -o -name '*.[ch]' -o -name '*.[ch][px][px]' \) -exec chmod -x " { } " +
2011-04-20 10:24:25 +02:00
2016-12-03 14:07:03 +01:00
%cmake_install
2014-09-11 10:57:03 +02:00
2016-12-03 14:07:03 +01:00
# INSTALL DOCUMENTATION USED BY THE HELP MENU IN MAIN APP
install -Dm0644 %{S:2} %{buildroot} %{_datadir} /%{name} -%{major_ver} /doc/GettingStarted.pdf
install -Dm0644 %{S:3} %{buildroot} %{_datadir} /%{name} -%{major_ver} /doc/Guide.pdf
2020-02-27 12:57:31 +01:00
# REMOVE paraview-config: DOESN'T WORK WITHOUT STATIC LIBS ANYWAY
rm %{buildroot} %{_bindir} /paraview-config
2014-02-04 10:39:54 +01:00
%fdupes %{buildroot} /
2013-07-13 14:13:29 +02:00
2020-02-11 01:33:43 +01:00
%post -n %{shlib} -p /sbin/ldconfig
2014-09-11 10:57:03 +02:00
2020-02-11 01:33:43 +01:00
%postun -n %{shlib} -p /sbin/ldconfig
2014-09-11 10:57:03 +02:00
2011-04-20 10:24:25 +02:00
%files
2020-02-11 01:33:43 +01:00
%license %{_datadir} /licenses/ParaView/
%{_bindir} /*
2018-12-03 20:11:01 +01:00
%exclude %{_bindir} /smTest*
%exclude %{_bindir} /vtk*
2016-12-03 14:07:03 +01:00
%{_datadir} /%{name} -%{major_ver} /
2020-02-11 01:33:43 +01:00
%dir %{_datadir} /metainfo
%{_datadir} /metainfo/*.appdata.xml
%{_datadir} /applications/*.desktop
2014-09-11 10:57:03 +02:00
%{_datadir} /icons/hicolor/*/apps/%{name} .png
2020-02-11 01:33:43 +01:00
%{_docdir} /paraview/
%dir %{_libdir} /vtk/
%dir %{_libdir} /vtk/hierarchy
%{_libdir} /vtk/hierarchy/ParaView/
%files -n %{shlib}
%{_libdir} /*.so.*
%files plugins
%{_libdir} /%{name} -%{major_ver} /
2013-02-26 12:20:04 +01:00
2018-12-03 20:11:01 +01:00
%files devel
2020-02-11 01:33:43 +01:00
%{_libdir} /*.so
%{_libdir} /cmake/paraview-%{major_ver} /
2018-12-03 20:11:01 +01:00
%{_bindir} /smTest*
%{_bindir} /vtk*
%{_includedir} /%{name} *
2020-02-11 01:33:43 +01:00
2020-05-06 13:03:26 +02:00
%files devel-static
%{_libdir} /*.a
2020-02-11 01:33:43 +01:00
%files -n python3-paraview
2020-02-27 12:57:31 +01:00
%{python3_sitearch} /%{name} /
2018-12-03 20:11:01 +01:00
2011-04-20 10:24:25 +02:00
%changelog