Accepting request 87721 from home:prusnak:branches:science

- updated to 5.8.0

OBS-URL: https://build.opensuse.org/request/show/87721
OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=25
This commit is contained in:
Detlef Steuer
2011-10-13 14:13:46 +00:00
committed by Git OBS Bridge
parent ea8389538b
commit 4e85dc18b2
15 changed files with 78 additions and 286 deletions

110
vtk.spec
View File

@@ -1,5 +1,5 @@
#
# spec file for package
# spec file for package vtk
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,44 +19,25 @@
%define qtdir /%{_lib}/qt4
Name: vtk
Version: 5.6.1
Version: 5.8.0
Release: 1
# 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
Summary: The Visualization Toolkit - A high level 3D visualization library
Url: http://vtk.org/
Group: Productivity/Scientific/Other
Source: %{name}-%{version}.tar.bz2
Source: http://www.vtk.org/files/release/5.8/%{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-gcc43.patch --badshah400@gmail.com Compatibility with gcc 4.3 and above
Patch1: vtk-gcc43.patch
# PATCH-FIX-UPSTREAM vtk-testcxxjavaremove.patch --badshah400@gmail.com
Patch2: vtk-testcxxjavaremove.patch
# PATCH-FIX-UPSTREAM vtk-python27-compat.patch --badshah400@gmail.com Python 2.7 compatibility
Patch3: vtk-python27-compat.patch
# PATCH-FIX-UPSTREAM vtk-gcc46.patch --badshah400@gmail.com Add needed includes for gcc 4.6
# http://public.kitware.com/Bug/view.php?id=11824
Patch4: vtk-gcc46.patch
# PATCH-FIX-UPSTREAM vtk-system.patch --badshah400@gmail.com Use system libraries
# http://public.kitware.com/Bug/view.php?id=11823
Patch5: vtk-system.patch
# PATCH-FIX-UPSTREAM vtk-soversion.patch --badshah400@gmail.com Upstream patch to add soversions to libCosmo and libVPIC
Patch6: vtk-soversion.patch
Patch1: vtk-system.patch
# PATCH-FIX-UPSTREAM vtk-sqldatabaseschema.patch --badshah400@gmail.com Resolve problems with vtkSQLdatabaseschema.cxx, patch came from upstream
Patch7: vtk-sqldatabaseschema.patch
%if 0%{?suse_version} > 1120
# PATCH-FIX-UPSTREAM vtk-libpng14.patch --badshah400@gmail.com Restore compatibility with libpng14
Patch8: vtk-libpng14.patch
%endif
# PATCH-FIX-UPSTREAM vtk-string-length.patch badshah400@gmail.com Prevent buffer overflows during string copy
Patch9: vtk-string-length.patch
# PATCH-FIX-UPSTREAM vtk-Balloon-Representation.patch badshah400@gmail.com Correct assignment operations in source files
Patch10: vtk-Balloon-Representation.patch
Patch2: vtk-sqldatabaseschema.patch
# patch to fix the soname for libVTKnetcdf_cxx
Patch11: vtk-soversion2.patch
Url: http://vtk.org/
Patch3: vtk-soversion2.patch
BuildRequires: Mesa-devel
BuildRequires: MesaGLw-devel
BuildRequires: boost-devel
@@ -71,26 +52,24 @@ BuildRequires: gcc-java
BuildRequires: gnuplot
BuildRequires: graphviz
BuildRequires: java-devel
BuildRequires: libQtWebKit-devel
BuildRequires: libexpat-devel
BuildRequires: libgcj-devel
BuildRequires: libjpeg-devel
BuildRequires: libmysqlclient-devel
BuildRequires: libpng-devel
BuildRequires: libqt4-devel
BuildRequires: libQtWebKit-devel
BuildRequires: libtheora-devel
BuildRequires: libtiff-devel
BuildRequires: libxml2-devel
BuildRequires: make
BuildRequires: openmotif-devel
BuildRequires: postgresql-devel
BuildRequires: python-devel
BuildRequires: sqlite3-devel
BuildRequires: tcl-devel
BuildRequires: tk-devel
BuildRequires: wget
BuildRequires: xorg-x11-devel
BuildRequires: zlib-devel
BuildRequires: pkgconfig(libxml-2.0)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -103,6 +82,7 @@ volume rendering, LOD control).
%package devel
Summary: VTK header files for building C++ code
Group: Development/Libraries/Other
Requires: %{name} = %{version}
Requires: Mesa-devel
Requires: libexpat-devel
Requires: libjpeg-devel
@@ -113,7 +93,6 @@ Requires: libqt4-devel
Requires: libtheora-devel
Requires: libtiff-devel
Requires: postgresql-devel
Requires: %{name} = %{version}
%description devel
VTK is an open-source software system for image processing, 3D
@@ -185,8 +164,8 @@ This package provides a few testing programs for VTK
%package qt
Summary: QT VTK widget
Requires: %{name} = %{version}
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description qt
VTK is an open-source software system for image processing, 3D
@@ -197,7 +176,6 @@ volume rendering, LOD control).
This package provides Qt bindings for VTK.
%package examples
Summary: Examples for VTK
Group: Productivity/Scientific/Other
@@ -221,28 +199,10 @@ programming languages.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%if 0%{?suse_version} > 1120
%patch8 -p1
%endif
%patch9 -p1
%patch10 -p1
%patch11 -p1
# Replace relative path ../../../VTKData with %{_datadir}/vtkdata-%{version}
# otherwise it will break on symlinks.
grep -rl '\.\./\.\./\.\./\.\./VTKData' . | xargs \
perl -pi -e's,\.\./\.\./\.\./\.\./VTKData,%{_datadir}/%{name},g'
# Save an unbuilt copy of the Example's sources for %doc
#mkdir vtk-examples-5.6
#cp -a Examples vtk-examples-5.6
# Don't ship Win32 examples
rm -rf vtk-examples-5.6/Examples/GUI/Win32
#find vtk-examples-5.6 -type f | xargs chmod -R a-x
grep -rl '\.\./\.\./\.\./\.\./VTKData' . | xargs perl -pi -e's,\.\./\.\./\.\./\.\./VTKData,%{_datadir}/%{name},g'
%build
export CC='gcc'
@@ -275,27 +235,23 @@ cmake . \
-DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON
%__make
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
find . -name \*.c -or -name \*.cxx -or -name \*.h -or -name \*.hxx -or -name \*.gif | xargs chmod -x
%install
#mkdir -p %{buildroot}
#%makeinstall
make DESTDIR=%{buildroot} install
mv %{buildroot}%{_libdir}/%{name}/lib*.so* %{buildroot}%{_libdir}/
# Gather list of non-python/tcl libraries
ls %{buildroot}%{_libdir}/*.so.* \
| grep -Ev '(Java|QVTK|Qt|PythonD|TCL)' | sed -e's,^%{buildroot},,' > libs.list
ls %{buildroot}%{_libdir}/*.so.* | grep -Ev '(Java|QVTK|Qt|PythonD|TCL)' | sed -e's,^%{buildroot},,' > libs.list
# List of executable utilities
cat > utils.list << EOF
vtkEncodeString
vtkWrapHierarchy
lproj
EOF
@@ -360,17 +316,12 @@ 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
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
# Add exec bits to shared libs ...
#chmod 0755 %{buildroot}%{_libdir}/vtk-5.6/CMake/*.so
#chmod 0755 %{buildroot}%{_libdir}/python*/site-packages/vtk/*.so
# Verdict places the docs in the false folder
rm -rf %{buildroot}%{_libdir}/vtk/doc
@@ -406,16 +357,13 @@ rm -rf %{buildroot}
%files -f main.list
%defattr(-,root,root,-)
%doc --parents Copyright.txt README.html vtkLogo.jpg vtkBanner.gif Wrapping/*/README*
%doc README.html
%doc vtkLogo.jpg
%doc Copyright.txt
%doc Copyright.txt README.html vtkLogo.jpg vtkBanner.gif Wrapping/*/README*
%files devel
%defattr(-,root,root,-)
%doc Utilities/Upgrading
%{_libdir}/%{name}/doxygen
%{_includedir}/%{name}-5.6
%{_includedir}/%{name}-5.8/
%{_libdir}/%{name}/CMake/
%{_libdir}/%{name}/*.cmake
%{_libdir}/%{name}/hints
@@ -423,24 +371,24 @@ rm -rf %{buildroot}
%files tcl
%defattr(-,root,root,-)
%doc README.html
%doc vtkLogo.jpg
%{_bindir}/vtkWrapTcl
%{_bindir}/vtkWrapTclInit
%{_bindir}/vtk
%{_libdir}/libvtk*TCL.so.*
%{_datadir}/tcl/vtk/
%doc README.html
%doc vtkLogo.jpg
%files -n python-vtk
%defattr(-,root,root,-)
%{_libdir}/*PythonD.so.*
%doc README.html
%doc vtkLogo.jpg
%{python_sitelib}/%{name}/
%{_libdir}/*PythonD.so.*
%{_prefix}/lib/python%{py_ver}/site-packages/VTK-%{version}-py%{py_ver}.egg-info
%{_bindir}/vtkWrapPython
%{_bindir}/vtkWrapPythonInit
%{_bindir}/vtkpython
%doc README.html
%doc vtkLogo.jpg
%files java
%defattr(-,root,root,-)
@@ -454,25 +402,21 @@ rm -rf %{buildroot}
%files testing -f testing.list
%defattr(-,root,root,-)
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/testing/
%doc README.html
%doc vtkLogo.jpg
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/testing/
%files qt
%defattr(-,root,root,-)
%{_libdir}/libQVTK.so.*
%{_libdir}/libvtkQtChart.so*
#%{_bindir}/qtevents
#%{_bindir}/qtimageviewer
#%{_bindir}/qtsimpleview
%dir %{_prefix}/%{qtdir}/plugins/designer
%{_prefix}/%{qtdir}/plugins/designer/libQVTKWidgetPlugin.so
%files examples -f examples.list
%defattr(-,root,root,-)
%dir %{_libdir}/%{name}
%doc README.html
%doc vtkLogo.jpg
%dir %{_libdir}/%{name}
%changelog