Initial 6.0 rc2 update and cleanup

This commit is contained in:
Orion Poplawski 2013-06-26 10:05:46 -06:00
parent 8c7c22e6dd
commit 980ace4171

148
vtk.spec
View File

@ -7,28 +7,27 @@
%else %else
%bcond_without java %bcond_without java
%endif %endif
%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)}
%{!?tcl_sitelib: %global tcl_sitelib %{_datadir}/tcl%{tcl_version}}
Summary: The Visualization Toolkit - A high level 3D visualization library Summary: The Visualization Toolkit - A high level 3D visualization library
Name: vtk Name: vtk
Version: 6.0.0 Version: 6.0.0
Release: 0.1%{?dist} Release: 0.1.rc2%{?dist}
# This is a variant BSD license, a cross between BSD and ZLIB. # This is a variant BSD license, a cross between BSD and ZLIB.
# For all intents, it has the same rights and restrictions as BSD. # For all intents, it has the same rights and restrictions as BSD.
# http://fedoraproject.org/wiki/Licensing/BSD#VTKBSDVariant # http://fedoraproject.org/wiki/Licensing/BSD#VTKBSDVariant
License: BSD License: BSD
Group: System Environment/Libraries Group: System Environment/Libraries
Source: http://www.vtk.org/files/release/5.10/%{name}-%{version}.tar.gz Source: http://www.vtk.org/files/release/6.0/%{name}-%{version}.rc2.tar.gz
Patch1: vtk-5.2.0-gcc43.patch
# Add soname to libvtkNetCDF_cxx
# http://vtk.org/Bug/view.php?id=12207
Patch2: vtk-soname.patch
# Use system libraries # Use system libraries
# http://public.kitware.com/Bug/view.php?id=11823 # http://public.kitware.com/Bug/view.php?id=11823
Patch5: vtk-6.0.0-system.patch Patch5: vtk-6.0.0-system.patch
# Test
Patch6: vtk-test.patch
URL: http://vtk.org/ URL: http://vtk.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%if 0%{?rhel} && (0%{?rhel} <= 6) %if 0%{?rhel} && (0%{?rhel} <= 6)
BuildRequires: cmake28 BuildRequires: cmake28
@ -62,10 +61,13 @@ BuildRequires: %{_includedir}/Xm
%{!?with_java:Conflicts: vtk-java} %{!?with_java:Conflicts: vtk-java}
Requires: hdf5 = %{_hdf5_version} Requires: hdf5 = %{_hdf5_version}
# Do not check .so files in the python_sitearch directory
%global __provides_exclude_from ^%{python_sitearch}/.*\\.so$
%description %description
VTK is an open-source software system for image processing, 3D VTK is an open-source software system for image processing, 3D
graphics, volume rendering and visualization. VTK includes many graphics, volume rendering and visualization. VTK includes many
advanced algorithms (e.g., surface reconstruction, implicit modelling, advanced algorithms (e.g., surface reconstruction, implicit modeling,
decimation) and rendering techniques (e.g., hardware-accelerated decimation) and rendering techniques (e.g., hardware-accelerated
volume rendering, LOD control). volume rendering, LOD control).
@ -73,6 +75,7 @@ volume rendering, LOD control).
Summary: VTK header files for building C++ code Summary: VTK header files for building C++ code
Requires: vtk = %{version}-%{release} Requires: vtk = %{version}-%{release}
%{?with_OSMesa:Requires: mesa-libOSMesa-devel} %{?with_OSMesa:Requires: mesa-libOSMesa-devel}
Requires: cmake
Requires: gl2ps-devel Requires: gl2ps-devel
Requires: expat-devel, libjpeg-devel, libpng-devel Requires: expat-devel, libjpeg-devel, libpng-devel
Requires: libogg-devel Requires: libogg-devel
@ -85,7 +88,7 @@ Group: Development/Libraries
%description devel %description devel
This provides the VTK header files required to compile C++ programs that This provides the VTK header files required to compile C++ programs that
use VTK to do 3D visualisation. use VTK to do 3D visualization.
%package tcl %package tcl
Summary: Tcl bindings for VTK Summary: Tcl bindings for VTK
@ -141,10 +144,9 @@ programming languages.
%prep %prep
%setup -q -n VTK%{version} %setup -q -n VTK%{version}.rc2
#patch1 -p1 -b .gcc43
#patch2 -p1 -b .soname
%patch5 -p1 -b .system %patch5 -p1 -b .system
%patch6 -p1 -b .test
# Replace relative path ../../../VTKData with %{_datadir}/vtkdata-%{version} # Replace relative path ../../../VTKData with %{_datadir}/vtkdata-%{version}
# otherwise it will break on symlinks. # otherwise it will break on symlinks.
@ -155,7 +157,7 @@ grep -rl '\.\./\.\./\.\./\.\./VTKData' . | xargs \
mkdir vtk-examples mkdir vtk-examples
cp -a Examples vtk-examples cp -a Examples vtk-examples
# Don't ship Win32 examples # Don't ship Win32 examples
rm -rf vtk-examples/Examples/GUI/Win32 rm -r vtk-examples/Examples/GUI/Win32
find vtk-examples -type f | xargs chmod -R a-x find vtk-examples -type f | xargs chmod -R a-x
%build %build
@ -175,9 +177,12 @@ pushd build
-DBUILD_DOCUMENTATION:BOOL=ON \ -DBUILD_DOCUMENTATION:BOOL=ON \
-DBUILD_EXAMPLES:BOOL=ON \ -DBUILD_EXAMPLES:BOOL=ON \
-DBUILD_TESTING:BOOL=ON \ -DBUILD_TESTING:BOOL=ON \
-DVTK_INSTALL_INCLUDE_DIR:PATH=/include/vtk \ -DVTK_CUSTOM_LIBRARY_SUFFIX="" \
-DVTK_INSTALL_LIB_DIR:PATH=/%{_lib}/vtk \ -DVTK_INSTALL_INCLUDE_DIR:PATH=include/vtk \
-DVTK_INSTALL_QT_DIR=/%{_lib}/qt4/plugins/designer \ -DVTK_INSTALL_LIBRARY_DIR:PATH=%{_lib}/vtk \
-DVTK_INSTALL_PACKAGE_DIR:PATH=%{_lib}/cmake/vtk \
-DVTK_INSTALL_QT_DIR:PATH=/%{_lib}/qt4/plugins/designer \
-DVTK_INSTALL_TCL_DIR:PATH=share/tcl%{tcl_version}/vtk \
-DTK_INTERNAL_PATH:PATH=/usr/include/tk-private/generic \ -DTK_INTERNAL_PATH:PATH=/usr/include/tk-private/generic \
%if %{with OSMesa} %if %{with OSMesa}
-DVTK_OPENGL_HAS_OSMESA:BOOL=ON \ -DVTK_OPENGL_HAS_OSMESA:BOOL=ON \
@ -193,19 +198,21 @@ pushd build
-DVTK_WRAP_JAVA:BOOL=OFF \ -DVTK_WRAP_JAVA:BOOL=OFF \
%endif %endif
-DVTK_WRAP_TCL:BOOL=ON \ -DVTK_WRAP_TCL:BOOL=ON \
-DVTK_USE_BOOST:BOOL=ON \ -DVTK_Group_Imaging:BOOL=ON \
-DVTK_USE_GL2PS:BOOL=ON \ -DVTK_Group_Qt:BOOL=ON \
-DVTK_USE_GUISUPPORT:BOOL=ON \ -DVTK_Group_Rendering:BOOL=ON \
-DVTK_USE_MYSQL=ON \ -DVTK_Group_StandAlone:BOOL=ON \
-DVTK_Group_Tk:BOOL=ON \
-DVTK_Group_Views:BOOL=ON \
-DModule_vtkFiltersStatisticsGnuR:BOOL=ON \
-DVTK_USE_OGGTHEORA_ENCODER=ON \ -DVTK_USE_OGGTHEORA_ENCODER=ON \
-DVTK_USE_PARALLEL:BOOL=ON \
-DVTK_USE_POSTGRES=ON \
-DVTK_USE_SYSTEM_LIBRARIES=ON \ -DVTK_USE_SYSTEM_LIBRARIES=ON \
-DVTK_USE_SYSTEM_LIBPROJ4=OFF \ -DVTK_USE_SYSTEM_LIBPROJ4=OFF
-DVTK_USE_QVTK=ON \
-DVTK_USE_QT=ON \
-DVTK_USE_TEXT_ANALYSIS=ON
# TODO - MPI
#-DVTK_Group_MPI:BOOL=ON \
# Needed for some tests. Fails to compile at the moment. We don't run test though.
# -DVTK_DATA_ROOT:PATH=%{_datadir}/vtkdata-%{version} \
# Not working, see http://public.kitware.com/Bug/view.php?id=11978 # Not working, see http://public.kitware.com/Bug/view.php?id=11978
# -DVTK_USE_ODBC=ON \ # -DVTK_USE_ODBC=ON \
# Not working, see http://public.kitware.com/Bug/view.php?id=10779 # Not working, see http://public.kitware.com/Bug/view.php?id=10779
@ -215,14 +222,13 @@ pushd build
# -DVTK_USE_MPI:BOOL=ON \ # -DVTK_USE_MPI:BOOL=ON \
# Got intermittent build error with -j # Got intermittent build error with -j
make #%{?_smp_mflags} make %{?_smp_mflags}
# Remove executable bits from sources (some of which are generated) # Remove executable bits from sources (some of which are generated)
find . -name \*.c -or -name \*.cxx -or -name \*.h -or -name \*.hxx -or \ find . -name \*.c -or -name \*.cxx -or -name \*.h -or -name \*.hxx -or \
-name \*.gif | xargs chmod -x -name \*.gif | xargs chmod -x
%install %install
rm -rf %{buildroot}
mkdir -p %{buildroot} mkdir -p %{buildroot}
pushd build pushd build
make install DESTDIR=%{buildroot} make install DESTDIR=%{buildroot}
@ -243,7 +249,6 @@ ls %{buildroot}%{_libdir}/vtk/*.so.* \
# List of executable utilities # List of executable utilities
cat > utils.list << EOF cat > utils.list << EOF
vtkEncodeString vtkEncodeString
lproj
EOF EOF
# List of executable examples # List of executable examples
@ -270,44 +275,33 @@ Cone5
Cone6 Cone6
EOF EOF
# List of executable test binaries # Install examples too
cat > testing.list << EOF for filelist in examples.list; do
CommonCxxTests
TestCxxFeatures
TestInstantiator
FilteringCxxTests
GraphicsCxxTests
GenericFilteringCxxTests
ImagingCxxTests
IOCxxTests
RenderingCxxTests
VTKBenchMark
VolumeRenderingCxxTests
WidgetsCxxTests
SocketClient
SocketServer
EOF
# Install utils/examples/testing, too
for filelist in utils.list examples.list testing.list; do
for file in `cat $filelist`; do for file in `cat $filelist`; do
install -p bin/$file %{buildroot}%{_bindir} install -p bin/$file %{buildroot}%{_bindir}
done done
done
# Fix up filelist paths
for filelist in utils.list examples.list; do
perl -pi -e's,^,%{_bindir}/,' $filelist perl -pi -e's,^,%{_bindir}/,' $filelist
done done
# Remove any remnants of rpaths # Remove any remnants of rpaths on files we install
for file in `cat utils.list examples.list testing.list`; do for file in `cat examples.list`; do
chrpath -d %{buildroot}$file chrpath -d %{buildroot}$file
done done
# http://vtk.org/Bug/view.php?id=14125
chrpath -d %{buildroot}%{python_sitearch}/vtk/*.so
# Main package contains utils and core libs # Main package contains utils and core libs
cat libs.list utils.list > main.list cat libs.list utils.list > main.list
popd popd
# Make scripts executable # Make scripts executable
chmod a+x %{buildroot}%{_libdir}/vtk/doxygen/*.pl #chmod a+x %{buildroot}%{_libdir}/vtk/doxygen/*.pl
chmod a+x %{buildroot}%{_libdir}/vtk/testing/*.{py,tcl} #chmod a+x %{buildroot}%{_libdir}/vtk/testing/*.{py,tcl}
# Remove exec bit from non-scripts and %%doc # Remove exec bit from non-scripts and %%doc
for file in `find %{buildroot} -type f -perm 0755 \ for file in `find %{buildroot} -type f -perm 0755 \
@ -320,9 +314,6 @@ find Utilities/Upgrading -type f | xargs chmod -x
# Add exec bits to shared libs ... # Add exec bits to shared libs ...
chmod 0755 %{buildroot}%{_libdir}/python*/site-packages/vtk/*.so chmod 0755 %{buildroot}%{_libdir}/python*/site-packages/vtk/*.so
# Verdict places the docs in the false folder
rm -fr %{buildroot}%{_libdir}/vtk/doc
# Setup Wrapping docs tree # Setup Wrapping docs tree
mkdir _docs mkdir _docs
cp -pr --parents Wrapping/*/README* _docs/ cp -pr --parents Wrapping/*/README* _docs/
@ -331,8 +322,6 @@ cp -pr --parents Wrapping/*/README* _docs/
%check %check
#LD_LIBARARY_PATH=`pwd`/bin ctest -V #LD_LIBARARY_PATH=`pwd`/bin ctest -V
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
@ -357,62 +346,59 @@ rm -rf %{buildroot}
%postun qt -p /sbin/ldconfig %postun qt -p /sbin/ldconfig
%files -f build/main.list %files -f build/main.list
%defattr(-,root,root,-)
%doc Copyright.txt README.html vtkLogo.jpg vtkBanner.gif _docs/Wrapping %doc Copyright.txt README.html vtkLogo.jpg vtkBanner.gif _docs/Wrapping
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/vtk-%{_arch}.conf %config(noreplace) %{_sysconfdir}/ld.so.conf.d/vtk-%{_arch}.conf
%dir %{_libdir}/vtk
%files devel %files devel
%defattr(-,root,root,-)
%doc Utilities/Upgrading %doc Utilities/Upgrading
%{_bindir}/vtkHashSource
%{_bindir}/vtkWrapHierarchy %{_bindir}/vtkWrapHierarchy
%{_libdir}/vtk/doxygen
%{_includedir}/vtk %{_includedir}/vtk
%{_libdir}/vtk/*.so %{_libdir}/vtk/*.so
%{_libdir}/vtk/CMake %{_libdir}/libvtkWrappingTools.a
%{_libdir}/vtk/*.cmake %{_libdir}/cmake/vtk/
%{_libdir}/vtk/hints %{_bindir}/vtkParseOGLExt
%{_bindir}/vtkProcessShader
%{_docdir}/vtk-6.0/
%{tcl_sitelib}/vtk/vtktcl.c
%files tcl %files tcl
%defattr(-,root,root,-)
%{_libdir}/vtk/*TCL.so.* %{_libdir}/vtk/*TCL.so.*
%{_bindir}/vtk %{_bindir}/vtk
%{_bindir}/vtkWrapTcl %{_bindir}/vtkWrapTcl
%{_bindir}/vtkWrapTclInit %{_bindir}/vtkWrapTclInit
%{_libdir}/vtk/pkgIndex.tcl %{tcl_sitelib}/vtk/
%{_libdir}/vtk/tcl %exclude %{tcl_sitelib}/vtk/vtktcl.c
%files python %files python
%defattr(-,root,root,-)
#%{python_sitearch}/vtk
%{python_sitearch}/* %{python_sitearch}/*
%{_libdir}/vtk/*PythonD.so.* %{_libdir}/vtk/*Python27D.so.*
%{_bindir}/vtkpython #%{_bindir}/vtkpython
%{_bindir}/vtkWrapPython %{_bindir}/vtkWrapPython
%{_bindir}/vtkWrapPythonInit %{_bindir}/vtkWrapPythonInit
%if %{with java} %if %{with java}
%files java %files java
%defattr(-,root,root,-)
%{_libdir}/vtk/*Java.so.* %{_libdir}/vtk/*Java.so.*
%{_libdir}/vtk/java %{_libdir}/vtk/vtk.jar
%{_bindir}/vtkParseJava %{_bindir}/vtkParseJava
%{_bindir}/vtkWrapJava %{_bindir}/vtkWrapJava
%endif %endif
%files qt %files qt
%defattr(-,root,root,-) %{_libdir}/vtk/lib*Qt*.so.*
%{_libdir}/vtk/libQVTK.so.* %{_libdir}/qt4/plugins/designer/libQVTKWidgetPlugin.so
%{_libdir}/qt4/plugins/designer
%files testing -f build/testing.list %files testing
%defattr(-,root,root,-)
%{_libdir}/vtk/testing
%files examples -f build/examples.list %files examples -f build/examples.list
%defattr(-,root,root,-)
%doc vtk-examples/Examples %doc vtk-examples/Examples
%changelog %changelog
* Mon Jun 10 2013 Orion Poplawski <orion@cora.nwra.com> - 6.0.0-1
- Update to 6.0.0
* Thu May 16 2013 Orion Poplawski <orion@cora.nwra.com> - 5.10.1-5 * Thu May 16 2013 Orion Poplawski <orion@cora.nwra.com> - 5.10.1-5
- Rebuild for hdf5 1.8.11 - Rebuild for hdf5 1.8.11