Accepting request 182962 from home:badshah400:branches:science
Update to version 6.0.0; lots of packaging cleanups OBS-URL: https://build.opensuse.org/request/show/182962 OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=42
This commit is contained in:
committed by
Git OBS Bridge
parent
0074f53c52
commit
bc561deb4c
252
vtk.spec
252
vtk.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package vtk
|
||||
#
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,9 +17,9 @@
|
||||
|
||||
|
||||
Name: vtk
|
||||
Version: 5.10.1
|
||||
Version: 6.0.0
|
||||
Release: 0
|
||||
%define series 5.10
|
||||
%define series 6.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
|
||||
@@ -28,16 +28,12 @@ License: BSD-3-Clause
|
||||
Group: Productivity/Scientific/Other
|
||||
Url: http://vtk.org/
|
||||
Source: http://www.vtk.org/files/release/%{series}/%{name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM vtk-pythondestdir.patch badshah400@gmail.com -- Correct installation destination for python libraries
|
||||
Patch0: vtk-pythondestdir.patch
|
||||
# PATCH-FIX-UPSTREAM vtk-system.patch badshah400@gmail.com -- Use system libraries, http://public.kitware.com/Bug/view.php?id=11823
|
||||
Patch1: vtk-system.patch
|
||||
# patch to fix the soname for libVTKnetcdf_cxx
|
||||
Patch2: vtk-soversion2.patch
|
||||
# PATCH-FIX-UPSTREAM vtk-sqldatabaseschema.patch badshah400@gmail.com -- Fix problems with vtkSQLDatabaseSchema.h
|
||||
Patch3: vtk-sqldatabaseschema.patch
|
||||
Patch0: vtk-system.patch
|
||||
# PATCH-FIX-UPSTREAM vtk-fix-file-contains-date-time.patch badshah400@gmail.com -- Fix file containing DATE and TIME
|
||||
Patch4: vtk-fix-file-contains-date-time.patch
|
||||
Patch1: vtk-fix-file-contains-date-time.patch
|
||||
# PATCH-FIX-UPSTREAM vtk-install-missing-modules.patch badshah400@gmail.com -- Install some cmake modules missed in upstream packaging (will be required if in future we can get paraview to use system installed vtk)
|
||||
Patch2: vtk-install-missing-modules.patch
|
||||
%if 0%{?suse_version} > 1210
|
||||
BuildRequires: Mesa-libGL-devel
|
||||
%else
|
||||
@@ -66,6 +62,7 @@ BuildRequires: libXt-devel
|
||||
%else
|
||||
BuildRequires: xorg-x11-devel
|
||||
%endif
|
||||
BuildRequires: R-base-devel
|
||||
BuildRequires: libexpat-devel
|
||||
BuildRequires: libiodbc-devel
|
||||
BuildRequires: libjpeg-devel
|
||||
@@ -113,6 +110,7 @@ Requires: Mesa-devel
|
||||
Requires: gl2ps-devel
|
||||
Requires: hdf5-devel
|
||||
%endif
|
||||
Requires: R-base-devel
|
||||
Requires: libexpat-devel
|
||||
Requires: libjpeg-devel
|
||||
Requires: libmysqlclient-devel
|
||||
@@ -252,16 +250,6 @@ This package provides a few testing programs for VTK.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%if 0%{?suse_version} == 1140
|
||||
%patch3 -p1
|
||||
%endif
|
||||
%patch4 -p1
|
||||
|
||||
# Remove build time references so build-compare can do its work
|
||||
#FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
|
||||
#FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
|
||||
#sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" Utilities/vtknetcdf/libvers.c
|
||||
#sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/" Utilities/vtknetcdf/libvers.c
|
||||
|
||||
# Replace relative path ../../../VTKData with %%{_datadir}/%%{name}data-%%{version}
|
||||
# otherwise it will break on symlinks.
|
||||
@@ -278,28 +266,25 @@ cmake .. \
|
||||
-DBUILD_EXAMPLES:BOOL=ON \
|
||||
-DBUILD_SHARED_LIBS:BOOL=ON \
|
||||
-DBUILD_TESTING:BOOL=ON \
|
||||
-DVTK_CUSTOM_LIBRARY_SUFFIX="" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
|
||||
-DSIP_INCLUDE_DIR:Path=%{py_incdir} \
|
||||
-DVTK_INSTALL_LIB_DIR:PATH=/%{_lib}/%{name}\
|
||||
-DVTK_INSTALL_ARCHIVE_DIR:PATH=%{_lib}/%{name} \
|
||||
-DVTK_INSTALL_LIBRARY_DIR:PATH=%{_lib}/%{name}\
|
||||
-DVTK_INSTALL_PACKAGE_DIR:PATH=%{_lib}/cmake/%{name} \
|
||||
-DVTK_INSTALL_TCL_DIR:PATH=share/tcl/%{name} \
|
||||
-DVTK_INSTALL_QT_DIR:STRING=/%{qtdir}/plugins/designer \
|
||||
-DVTK_USE_BOOST:BOOL=ON \
|
||||
-DVTK_USE_GL2PS:BOOL=ON \
|
||||
-DVTK_USE_GUISUPPORT:BOOL=ON \
|
||||
-DVTK_USE_MYSQL:BOOL=ON \
|
||||
-DVTK_USE_OGGTHEORA_ENCODER:BOOL=ON \
|
||||
-DVTK_USE_ODBC:BOOL=ON \
|
||||
-DVTK_USE_PARALLEL:BOOL=ON \
|
||||
-DVTK_USE_PARALLEL_BGL:BOOL=ON \
|
||||
-DVTK_USE_QT:BOOL=ON \
|
||||
-DVTK_USE_QVTK_QTOPENGL:BOOL=ON \
|
||||
-DVTK_USE_RENDERING:BOOL=ON \
|
||||
-DVTK_USE_TEXT_ANALYSIS:BOOL=ON \
|
||||
-DVTK_USE_SYSTEM_LIBRARIES:BOOL=ON \
|
||||
-DVTK_USE_SYSTEM_LIBPROJ4:BOOL=OFF \
|
||||
%if 0%{?suse_version} <= 1210
|
||||
%if 0%{?suse_version} <= 1230
|
||||
-DVTK_USE_SYSTEM_GL2PS:BOOL=OFF \
|
||||
-DVTK_USE_SYSTEM_HDF5:BOOL=OFF \
|
||||
%endif
|
||||
%if 0%{?suse_version} <= 1210
|
||||
-DVTK_USE_SYSTEM_HDF5:BOOL=OFF \
|
||||
%endif
|
||||
-DVTK_PYTHON_SETUP_ARGS="--prefix=%{_prefix} --root=%{buildroot}" \
|
||||
-DVTK_WRAP_PYTHON:BOOL=ON \
|
||||
%if 0%{?suse_version} >= 1130
|
||||
-DVTK_WRAP_JAVA:BOOL=ON \
|
||||
@@ -308,11 +293,16 @@ cmake .. \
|
||||
-DVTK_WRAP_JAVA:BOOL=OFF \
|
||||
-DVTK_WRAP_PYTHON_SIP:BOOL=OFF \
|
||||
%endif
|
||||
-DVTK_WRAP_TCL:BOOL=ON \
|
||||
-DVTK_Group_Imaging:BOOL=ON \
|
||||
-DVTK_Group_Qt:BOOL=ON \
|
||||
-DVTK_Group_Rendering:BOOL=ON \
|
||||
-DVTK_Group_StandAlone:BOOL=ON \
|
||||
-DVTK_Group_Tk:BOOL=ON \
|
||||
-DVTK_Group_Views:BOOL=ON \
|
||||
-DModule_vtkFiltersStatisticsGnuR:BOOL=ON \
|
||||
-DVTK_WRAP_TCL:BOOL=ON
|
||||
|
||||
# Package fails to compile with the following option (Note: postgresql-devel and libpqxx-devel are needed as dependencies)
|
||||
# -DVTK_USE_POSTGRES:BOOL=ON \
|
||||
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
|
||||
# Remove executable bits from sources (some of which are generated)
|
||||
@@ -323,110 +313,81 @@ popd
|
||||
pushd build
|
||||
%makeinstall
|
||||
|
||||
# link the directories to %%{_libdir}. Moving them breaks the cmake macros.
|
||||
echo `ls %{buildroot}%{_libdir}/%{name}/*.so*`
|
||||
echo `ls %{buildroot}%{_libdir}/%{name}/*.so* | sed -e's,^%{buildroot}%{_libdir}/,,'`
|
||||
ls %{buildroot}%{_libdir}/%{name}/*.so* | sed -e's,^%{buildroot}%{_libdir}/,,' | xargs ln -st %{buildroot}%{_libdir}
|
||||
# Install conf file to enable vtk to find its libraries
|
||||
mkdir -p %{buildroot}/%{_sysconfdir}/ld.so.conf.d
|
||||
echo %{_libdir}/%{name} > %{buildroot}/%{_sysconfdir}/ld.so.conf.d/%{name}.conf
|
||||
|
||||
# http://vtk.org/Bug/view.php?id=14125
|
||||
chrpath -d %{buildroot}%{python_sitelib}/%{name}/*.so
|
||||
|
||||
# Gather list of non-binding libraries
|
||||
ls %{buildroot}%{_libdir}/lib*.so.* \
|
||||
%{buildroot}%{_libdir}/%{name}/lib*.so.* | grep -Ev '(Java|QVTK|Qt|Python|TCL)' | sed -e's,^%{buildroot},,' > libs.list
|
||||
|
||||
# Gather list of devel libraries
|
||||
ls %{buildroot}%{_libdir}/*.so \
|
||||
%{buildroot}%{_libdir}/%{name}/*.so | sed -e's,^%{buildroot},,' > devel.list
|
||||
|
||||
# List of executable utilities
|
||||
cat > utils.list << EOF
|
||||
%{name}EncodeString
|
||||
%{name}WrapHierarchy
|
||||
lproj
|
||||
EOF
|
||||
ls %{buildroot}%{_libdir}/%{name}/lib*.so.* | grep -Ev '(Java|QVTK|Qt|Python|TCL)' | sed -e's,^%{buildroot},,' > libs.list
|
||||
|
||||
# List of executable examples
|
||||
cat > examples.list << EOF
|
||||
Generate2DAMRDataSetWithPulse
|
||||
Generate3DAMRDataSetWithPulse
|
||||
HierarchicalBoxPipeline
|
||||
LabeledMesh
|
||||
MultiBlock
|
||||
Arrays
|
||||
Cube
|
||||
RGrid
|
||||
SGrid
|
||||
ImageDataLIC2DDemo
|
||||
StructuredGridLIC2DDemo
|
||||
ImageProcessingExamplesCxxTests
|
||||
ImageSlicing
|
||||
DumpXMLFile
|
||||
IOExamplesCxxTests
|
||||
ParticleReader
|
||||
GenerateCubesFromLabels
|
||||
GenerateModelsFromLabels
|
||||
Medical1
|
||||
Medical2
|
||||
Medical3
|
||||
Medical4
|
||||
MedicalExamplesCxxTests
|
||||
Delaunay3D
|
||||
Delaunay3DAlpha
|
||||
ModellingExamplesCxxTests
|
||||
finance
|
||||
AmbientSpheres
|
||||
Cylinder
|
||||
DiffuseSpheres
|
||||
MaterialObjects
|
||||
SpecularSpheres
|
||||
SurfaceLICDemo
|
||||
Cone
|
||||
Cone2
|
||||
Cone3
|
||||
Cone4
|
||||
Cone5
|
||||
Cone6
|
||||
BandedContours
|
||||
FilledContours
|
||||
TubesWithVaryingRadiusAndColors
|
||||
VisualizationAlgorithmsExamplesCxxTests
|
||||
FixedPointVolumeRayCastMapperCT
|
||||
GPURenderDemo
|
||||
BalloonWidget
|
||||
Slider
|
||||
Slider2D
|
||||
WidgetsExamplesCxxTests
|
||||
EOF
|
||||
|
||||
# List of executable test binaries
|
||||
cat > testing.list << EOF
|
||||
CommonCxxTests
|
||||
TestCxxFeatures
|
||||
TestInstantiator
|
||||
FilteringCxxTests
|
||||
GraphicsCxxTests
|
||||
GenericFilteringCxxTests
|
||||
ImagingCxxTests
|
||||
IOCxxTests
|
||||
RenderingCxxTests
|
||||
VTKBenchMark
|
||||
VolumeRenderingCxxTests
|
||||
WidgetsCxxTests
|
||||
SocketClient
|
||||
SocketServer
|
||||
EOF
|
||||
|
||||
# List of devel utilities and files
|
||||
cat > utils.list << EOF
|
||||
%{name}EncodeString
|
||||
%{name}WrapHierarchy
|
||||
lproj
|
||||
EOF
|
||||
|
||||
# Install utils/examples/testing, too
|
||||
for filelist in utils.list examples.list testing.list; do
|
||||
for file in `cat $filelist`; do
|
||||
install -p bin/$file %{buildroot}%{_bindir}
|
||||
done
|
||||
perl -pi -e's,^,%{_bindir}/,' $filelist
|
||||
# Install examples
|
||||
for file in `cat examples.list`; do
|
||||
install -p bin/$file %{buildroot}%{_bindir}
|
||||
done
|
||||
perl -pi -e's,^,%{_bindir}/,' examples.list
|
||||
|
||||
# Remove any remnants of rpaths
|
||||
# vtkpython does not get installed by script, install manually
|
||||
cp -p bin/vtkpython %{buildroot}%{_bindir}/
|
||||
|
||||
# Remove rpaths from installed binaries
|
||||
chrpath -d %{buildroot}%{_bindir}/*
|
||||
|
||||
# Main package contains utils and core libs
|
||||
cat libs.list utils.list > main.list
|
||||
|
||||
popd
|
||||
|
||||
# Make shared libs and scripts executable
|
||||
chmod a+x %{buildroot}%{_libdir}/%{name}/doxygen/*.pl
|
||||
chmod a+x %{buildroot}%{_libdir}/%{name}/testing/*.{py,tcl}
|
||||
|
||||
# Remove exec bit from non-scripts and %%doc
|
||||
for file in `find %{buildroot} -type f -perm 0755 | xargs -r file | grep ASCII | awk -F: '{print $1}'`; do
|
||||
head -1 $file | grep '^#!' > /dev/null && continue
|
||||
chmod 0644 $file
|
||||
done
|
||||
find Utilities/Upgrading -type f | xargs chmod -x
|
||||
|
||||
# Verdict places the docs in the false folder
|
||||
rm -rf %{buildroot}%{_libdir}/%{name}/doc
|
||||
|
||||
# Move tcl script to %%{_datadir}/tcl/%%{name}/
|
||||
mkdir -p %{buildroot}%{_datadir}/tcl/%{name}/
|
||||
mv %{buildroot}%{_libdir}/%{name}/tcl/ %{buildroot}%{_datadir}/tcl/%{name}/
|
||||
mv %{buildroot}%{_libdir}/%{name}/*.tcl %{buildroot}%{_datadir}/tcl/%{name}/
|
||||
|
||||
%fdupes -s %{buildroot}
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
@@ -451,28 +412,33 @@ mv %{buildroot}%{_libdir}/%{name}/*.tcl %{buildroot}%{_datadir}/tcl/%{name}/
|
||||
%post tcl -p /sbin/ldconfig
|
||||
%postun tcl -p /sbin/ldconfig
|
||||
|
||||
%files -f build/main.list
|
||||
%files -f build/libs.list
|
||||
%defattr(-,root,root,-)
|
||||
%doc Copyright.txt README.html %{name}Logo.jpg %{name}Banner.gif Wrapping/*/README*
|
||||
%config %{_sysconfdir}/ld.so.conf.d/%{name}.conf
|
||||
%doc Copyright.txt
|
||||
%dir %{_libdir}/%{name}/
|
||||
|
||||
%files devel -f build/devel.list
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc Utilities/Upgrading
|
||||
%{_libdir}/%{name}/*.cmake
|
||||
%{_libdir}/%{name}/doxygen/
|
||||
%{_libdir}/%{name}/CMake/
|
||||
%{_libdir}/%{name}/hints/
|
||||
%{_bindir}/%{name}EncodeString
|
||||
%{_bindir}/%{name}HashSource
|
||||
%{_bindir}/%{name}ParseOGLExt
|
||||
%{_bindir}/%{name}ProcessShader
|
||||
%{_bindir}/%{name}WrapHierarchy
|
||||
%{_datadir}/doc/%{name}-%{series}/
|
||||
%{_libdir}/%{name}/*.so
|
||||
%{_libdir}/cmake/%{name}/
|
||||
%{_libdir}/%{name}/libvtkWrappingTools.a
|
||||
%{_includedir}/%{name}-%{series}/
|
||||
%{_datadir}/tcl/vtk/vtktcl.c
|
||||
|
||||
%if 0%{?suse_version} >= 1130
|
||||
%files java
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/%{name}ParseJava
|
||||
%{_bindir}/%{name}WrapJava
|
||||
%{_libdir}/*Java.so.*
|
||||
%{_libdir}/%{name}/%{name}.jar
|
||||
%{_libdir}/%{name}/*Java.so.*
|
||||
%{_libdir}/%{name}/java/
|
||||
%endif
|
||||
|
||||
%files -n python-%{name}
|
||||
@@ -480,32 +446,10 @@ mv %{buildroot}%{_libdir}/%{name}/*.tcl %{buildroot}%{_datadir}/tcl/%{name}/
|
||||
%{_bindir}/%{name}python
|
||||
%{_bindir}/%{name}WrapPython
|
||||
%{_bindir}/%{name}WrapPythonInit
|
||||
%{_libdir}/libvtkPythonCore.so.*
|
||||
%{_libdir}/libvtkRenderingPythonTkWidgets.so.*
|
||||
%{_libdir}/*PythonD.so.*
|
||||
%{_libdir}/%{name}/libvtkPythonCore.so.*
|
||||
%{_libdir}/%{name}/libvtkRenderingPythonTkWidgets.so.*
|
||||
%{_libdir}/%{name}/*PythonD.so.*
|
||||
%{python_sitelib}/VTK-%{version}-py%{py_ver}.egg-info
|
||||
%{_libdir}/%{name}/*Python*.so.*
|
||||
%{python_sitelib}/VTK-%{series}-py%{py_ver}.egg-info
|
||||
%{python_sitelib}/%{name}/
|
||||
%if 0%{?suse_version} >= 1130
|
||||
%exclude %{python_sitelib}/%{name}/QVTKPython.so
|
||||
%exclude %{python_sitelib}/%{name}/*PythonSIP.so
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} >= 1130
|
||||
%files -n python-%{name}-qt
|
||||
%defattr(-,root,root,-)
|
||||
%{python_sitelib}/%{name}/QVTKPython.so
|
||||
%{python_sitelib}/%{name}/*PythonSIP.so
|
||||
%endif
|
||||
|
||||
%files qt
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libQVTK.so.*
|
||||
%{_libdir}/%{name}/libQVTK.so.*
|
||||
%dir %{_prefix}/%{qtdir}/plugins/designer
|
||||
%{_prefix}/%{qtdir}/plugins/designer/libQVTKWidgetPlugin.so
|
||||
%exclude %{_libdir}/%{name}/*QtPython27D.so.*
|
||||
|
||||
%files tcl
|
||||
%defattr(-,root,root,-)
|
||||
@@ -513,14 +457,22 @@ mv %{buildroot}%{_libdir}/%{name}/*.tcl %{buildroot}%{_datadir}/tcl/%{name}/
|
||||
%{_bindir}/%{name}WrapTcl
|
||||
%{_bindir}/%{name}WrapTclInit
|
||||
%{_datadir}/tcl/%{name}/
|
||||
%{_libdir}/lib%{name}*TCL.so.*
|
||||
%{_libdir}/%{name}/lib%{name}*TCL.so.*
|
||||
%exclude %{_libdir}/%{name}/*QtTCL.so.*
|
||||
%exclude %{_datadir}/tcl/vtk/vtktcl.c
|
||||
|
||||
%files qt
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/%{name}/lib*Qt*.so.*
|
||||
%dir %{_prefix}/%{qtdir}/plugins/designer
|
||||
%{_prefix}/%{qtdir}/plugins/designer/libQVTKWidgetPlugin.so
|
||||
%exclude %{_libdir}/%{name}/*Python27D.so.*
|
||||
|
||||
%files -n python-%{name}-qt
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/%{name}/*QtPython27D.so.*
|
||||
|
||||
%files examples -f build/examples.list
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
%files testing -f build/testing.list
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/%{name}/testing/
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user