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
%bcond_without java
%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
Name: vtk
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.
# For all intents, it has the same rights and restrictions as BSD.
# http://fedoraproject.org/wiki/Licensing/BSD#VTKBSDVariant
License: BSD
Group: System Environment/Libraries
Source: http://www.vtk.org/files/release/5.10/%{name}-%{version}.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
Source: http://www.vtk.org/files/release/6.0/%{name}-%{version}.rc2.tar.gz
# Use system libraries
# http://public.kitware.com/Bug/view.php?id=11823
Patch5: vtk-6.0.0-system.patch
# Test
Patch6: vtk-test.patch
URL: http://vtk.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%if 0%{?rhel} && (0%{?rhel} <= 6)
BuildRequires: cmake28
@ -62,10 +61,13 @@ BuildRequires: %{_includedir}/Xm
%{!?with_java:Conflicts: vtk-java}
Requires: hdf5 = %{_hdf5_version}
# Do not check .so files in the python_sitearch directory
%global __provides_exclude_from ^%{python_sitearch}/.*\\.so$
%description
VTK is an open-source software system for image processing, 3D
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
volume rendering, LOD control).
@ -73,6 +75,7 @@ volume rendering, LOD control).
Summary: VTK header files for building C++ code
Requires: vtk = %{version}-%{release}
%{?with_OSMesa:Requires: mesa-libOSMesa-devel}
Requires: cmake
Requires: gl2ps-devel
Requires: expat-devel, libjpeg-devel, libpng-devel
Requires: libogg-devel
@ -85,7 +88,7 @@ Group: Development/Libraries
%description devel
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
Summary: Tcl bindings for VTK
@ -141,10 +144,9 @@ programming languages.
%prep
%setup -q -n VTK%{version}
#patch1 -p1 -b .gcc43
#patch2 -p1 -b .soname
%setup -q -n VTK%{version}.rc2
%patch5 -p1 -b .system
%patch6 -p1 -b .test
# Replace relative path ../../../VTKData with %{_datadir}/vtkdata-%{version}
# otherwise it will break on symlinks.
@ -155,7 +157,7 @@ grep -rl '\.\./\.\./\.\./\.\./VTKData' . | xargs \
mkdir vtk-examples
cp -a Examples vtk-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
%build
@ -175,9 +177,12 @@ pushd build
-DBUILD_DOCUMENTATION:BOOL=ON \
-DBUILD_EXAMPLES:BOOL=ON \
-DBUILD_TESTING:BOOL=ON \
-DVTK_INSTALL_INCLUDE_DIR:PATH=/include/vtk \
-DVTK_INSTALL_LIB_DIR:PATH=/%{_lib}/vtk \
-DVTK_INSTALL_QT_DIR=/%{_lib}/qt4/plugins/designer \
-DVTK_CUSTOM_LIBRARY_SUFFIX="" \
-DVTK_INSTALL_INCLUDE_DIR:PATH=include/vtk \
-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 \
%if %{with OSMesa}
-DVTK_OPENGL_HAS_OSMESA:BOOL=ON \
@ -193,19 +198,21 @@ pushd build
-DVTK_WRAP_JAVA:BOOL=OFF \
%endif
-DVTK_WRAP_TCL:BOOL=ON \
-DVTK_USE_BOOST:BOOL=ON \
-DVTK_USE_GL2PS:BOOL=ON \
-DVTK_USE_GUISUPPORT:BOOL=ON \
-DVTK_USE_MYSQL=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_USE_OGGTHEORA_ENCODER=ON \
-DVTK_USE_PARALLEL:BOOL=ON \
-DVTK_USE_POSTGRES=ON \
-DVTK_USE_SYSTEM_LIBRARIES=ON \
-DVTK_USE_SYSTEM_LIBPROJ4=OFF \
-DVTK_USE_QVTK=ON \
-DVTK_USE_QT=ON \
-DVTK_USE_TEXT_ANALYSIS=ON
-DVTK_USE_SYSTEM_LIBPROJ4=OFF
# 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
# -DVTK_USE_ODBC=ON \
# Not working, see http://public.kitware.com/Bug/view.php?id=10779
@ -215,14 +222,13 @@ pushd build
# -DVTK_USE_MPI:BOOL=ON \
# Got intermittent build error with -j
make #%{?_smp_mflags}
make %{?_smp_mflags}
# Remove executable bits from sources (some of which are generated)
find . -name \*.c -or -name \*.cxx -or -name \*.h -or -name \*.hxx -or \
-name \*.gif | xargs chmod -x
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
pushd build
make install DESTDIR=%{buildroot}
@ -243,7 +249,6 @@ ls %{buildroot}%{_libdir}/vtk/*.so.* \
# List of executable utilities
cat > utils.list << EOF
vtkEncodeString
lproj
EOF
# List of executable examples
@ -270,44 +275,33 @@ Cone5
Cone6
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
# Install utils/examples/testing, too
for filelist in utils.list examples.list testing.list; do
# Install examples too
for filelist in examples.list; do
for file in `cat $filelist`; do
install -p bin/$file %{buildroot}%{_bindir}
done
done
# Fix up filelist paths
for filelist in utils.list examples.list; do
perl -pi -e's,^,%{_bindir}/,' $filelist
done
# Remove any remnants of rpaths
for file in `cat utils.list examples.list testing.list`; do
# Remove any remnants of rpaths on files we install
for file in `cat examples.list`; do
chrpath -d %{buildroot}$file
done
# http://vtk.org/Bug/view.php?id=14125
chrpath -d %{buildroot}%{python_sitearch}/vtk/*.so
# Main package contains utils and core libs
cat libs.list utils.list > main.list
popd
# Make scripts executable
chmod a+x %{buildroot}%{_libdir}/vtk/doxygen/*.pl
chmod a+x %{buildroot}%{_libdir}/vtk/testing/*.{py,tcl}
#chmod a+x %{buildroot}%{_libdir}/vtk/doxygen/*.pl
#chmod a+x %{buildroot}%{_libdir}/vtk/testing/*.{py,tcl}
# Remove exec bit from non-scripts and %%doc
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 ...
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
mkdir _docs
cp -pr --parents Wrapping/*/README* _docs/
@ -331,8 +322,6 @@ cp -pr --parents Wrapping/*/README* _docs/
%check
#LD_LIBARARY_PATH=`pwd`/bin ctest -V
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
@ -357,62 +346,59 @@ rm -rf %{buildroot}
%postun qt -p /sbin/ldconfig
%files -f build/main.list
%defattr(-,root,root,-)
%doc Copyright.txt README.html vtkLogo.jpg vtkBanner.gif _docs/Wrapping
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/vtk-%{_arch}.conf
%dir %{_libdir}/vtk
%files devel
%defattr(-,root,root,-)
%doc Utilities/Upgrading
%{_bindir}/vtkHashSource
%{_bindir}/vtkWrapHierarchy
%{_libdir}/vtk/doxygen
%{_includedir}/vtk
%{_libdir}/vtk/*.so
%{_libdir}/vtk/CMake
%{_libdir}/vtk/*.cmake
%{_libdir}/vtk/hints
%{_libdir}/libvtkWrappingTools.a
%{_libdir}/cmake/vtk/
%{_bindir}/vtkParseOGLExt
%{_bindir}/vtkProcessShader
%{_docdir}/vtk-6.0/
%{tcl_sitelib}/vtk/vtktcl.c
%files tcl
%defattr(-,root,root,-)
%{_libdir}/vtk/*TCL.so.*
%{_bindir}/vtk
%{_bindir}/vtkWrapTcl
%{_bindir}/vtkWrapTclInit
%{_libdir}/vtk/pkgIndex.tcl
%{_libdir}/vtk/tcl
%{tcl_sitelib}/vtk/
%exclude %{tcl_sitelib}/vtk/vtktcl.c
%files python
%defattr(-,root,root,-)
#%{python_sitearch}/vtk
%{python_sitearch}/*
%{_libdir}/vtk/*PythonD.so.*
%{_bindir}/vtkpython
%{_libdir}/vtk/*Python27D.so.*
#%{_bindir}/vtkpython
%{_bindir}/vtkWrapPython
%{_bindir}/vtkWrapPythonInit
%if %{with java}
%files java
%defattr(-,root,root,-)
%{_libdir}/vtk/*Java.so.*
%{_libdir}/vtk/java
%{_libdir}/vtk/vtk.jar
%{_bindir}/vtkParseJava
%{_bindir}/vtkWrapJava
%endif
%files qt
%defattr(-,root,root,-)
%{_libdir}/vtk/libQVTK.so.*
%{_libdir}/qt4/plugins/designer
%{_libdir}/vtk/lib*Qt*.so.*
%{_libdir}/qt4/plugins/designer/libQVTKWidgetPlugin.so
%files testing -f build/testing.list
%defattr(-,root,root,-)
%{_libdir}/vtk/testing
%files testing
%files examples -f build/examples.list
%defattr(-,root,root,-)
%doc vtk-examples/Examples
%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
- Rebuild for hdf5 1.8.11