SHA256
1
0
forked from pool/vtk

Copy from home:anubisg1:branches:science/vtk via accept of submit request 12109

Request was accepted with message:
Thanks for your hard work. Looks good.

OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=12
This commit is contained in:
Werner Hoch 2009-06-23 16:55:47 +00:00 committed by Git OBS Bridge
parent 78125669e4
commit 309b15a2da
4 changed files with 55 additions and 42 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:714c0dea68f65c65c02319ca495f5c367c64a52fb787aa13b1fe0f3fcfa6dfe2
size 13953658

3
vtk-5.4.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:037c0582ee7483e0b495e45a00c4f08784691ef82c4ea159ef86731c3beda73d
size 18265310

View File

@ -1,24 +1,19 @@
%define lib_ver 5.2 %define qtdir %{_libdir}/qt4
%define qtdir %{_libdir}/qt3
Name: vtk Name: vtk
Summary: The Visualization Toolkit - A high level 3D visualization library Summary: The Visualization Toolkit - A high level 3D visualization library
Version: %{lib_ver}.1 Version: 5.4.2
Release: 1 Release: 1
Packager: Werner Hoch <werner.ho@gmx.de>
License: BSD License: BSD
Group: System Environment/Libraries Group: System/Libraries
URL: http://www.vtk.org URL: http://www.vtk.org
Source: vtk-%{version}.tar.bz2 Source0: vtk-%{version}.tar.gz
Patch0: vtk-5.2.1-pythondestdir.patch Patch0: vtk-5.4.2-pythondestdir.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: cmake, tcl-devel, tk-devel, qt3-devel, python-devel BuildRequires: cmake tcl-devel tk-devel libqt4-devel python-devel
BuildRequires: libexpat-devel, libjpeg-devel, libpng-devel, freetype2-devel BuildRequires: libexpat-devel libjpeg-devel libpng-devel freetype2-devel
BuildRequires: libtiff-devel, zlib-devel BuildRequires: libtiff-devel zlib-devel fdupes doxygen graphviz gnuplot
BuildRequires: doxygen, graphviz, gnuplot
# tar-1.14.90+ uses --strip-components option # tar-1.14.90+ uses --strip-components option
BuildRequires: tar > 1.14.90 BuildRequires: tar > 1.14.90
BuildRequires: chrpath BuildRequires: chrpath
@ -45,7 +40,7 @@ use VTK to do 3D visualisation
%package tcl %package tcl
Summary: Tcl bindings for VTK Summary: Tcl bindings for VTK
Requires: vtk = %{version} Requires: vtk = %{version}
Group: System Environment/Libraries Group: System/Libraries
%description tcl %description tcl
tcl bindings for VTK tcl bindings for VTK
@ -53,7 +48,7 @@ tcl bindings for VTK
%package python %package python
Summary: Python bindings for VTK Summary: Python bindings for VTK
Requires: vtk = %{version} Requires: vtk = %{version}
Group: System Environment/Libraries Group: System/Libraries
%description python %description python
python bindings for VTK python bindings for VTK
@ -61,8 +56,9 @@ python bindings for VTK
%package qt %package qt
Summary: QT VTK widget Summary: QT VTK widget
Requires: vtk = %{version} Requires: vtk = %{version}
Requires: qt3 # do not neeeded to call it, rpm take care of it
Group: Development/Libraries #Requires: libqt4
Group: Development/Libraries/C and C++
%description qt %description qt
Qt VTK widget Qt VTK widget
@ -70,7 +66,7 @@ Qt VTK widget
%package examples %package examples
Summary: Examples for VTK Summary: Examples for VTK
Requires: vtk = %{version}, vtkdata = %{version} Requires: vtk = %{version}, vtkdata = %{version}
Group: Applications/Engineering Group: Productivity/Scientific/Other
%description examples %description examples
This package contains many well-commented examples showing how to use This package contains many well-commented examples showing how to use
@ -80,13 +76,11 @@ programming languages
%package testing-progs %package testing-progs
Summary: Testing programs for VTK Summary: Testing programs for VTK
Requires: %{name} = %{version}, vtkdata = %{version} Requires: %{name} = %{version}, vtkdata = %{version}
Group: Applications/Engineering Group: Productivity/Scientific/Other
%description testing-progs %description testing-progs
Testing programs for VTK Testing programs for VTK
%prep %prep
%setup -n VTK -q %setup -n VTK -q
%patch0 -p1 %patch0 -p1
@ -97,8 +91,10 @@ grep -rl '\.\./\.\./\.\./\.\./VTKData' . | xargs \
perl -pi -e's,\.\./\.\./\.\./\.\./VTKData,%{_datadir}/%{name}data,g' perl -pi -e's,\.\./\.\./\.\./\.\./VTKData,%{_datadir}/%{name}data,g'
%build %build
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
cmake . \ cmake . \
-DDESIRED_QT_VERSION=3 \ -DDESIRED_QT_VERSION=4 \
-DCMAKE_C_FLAGS:STRING="$RPM_OPT_FLAGS" \ -DCMAKE_C_FLAGS:STRING="$RPM_OPT_FLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$RPM_OPT_FLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$RPM_OPT_FLAGS" \
-DCMAKE_INSTALL_PREFIX:PATH=$RPM_BUILD_ROOT \ -DCMAKE_INSTALL_PREFIX:PATH=$RPM_BUILD_ROOT \
@ -117,7 +113,7 @@ cmake . \
-DVTK_USE_GUISUPPORT:BOOL=ON \ -DVTK_USE_GUISUPPORT:BOOL=ON \
-DVTK_USE_QVTK:BOOL=ON \ -DVTK_USE_QVTK:BOOL=ON \
-DVTK_INSTALL_QT_DIR:STRING=%{qtdir}/plugins/designer \ -DVTK_INSTALL_QT_DIR:STRING=%{qtdir}/plugins/designer \
-DVTK_LEGACY_REMOVE:BOOL=ON \ -DVTK_LEGACY_REMOVE:BOOL=OFF \
-DVTK_USE_GL2PS:BOOL=ON \ -DVTK_USE_GL2PS:BOOL=ON \
-DVTK_USE_SYSTEM_EXPAT:BOOL=ON \ -DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
-DVTK_USE_SYSTEM_JPEG:BOOL=ON \ -DVTK_USE_SYSTEM_JPEG:BOOL=ON \
@ -128,7 +124,7 @@ cmake . \
-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \ -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \
-DVTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T:INTERNAL=1 -DVTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T:INTERNAL=1
make %{_smp_mflags} %__make %{?jobs:-j%{jobs}}
%install %install
make install make install
@ -176,19 +172,19 @@ find $RPM_BUILD_ROOT%{_datadir}/%{name}-examples \
-name "CMake*" | xargs rm -rf -name "CMake*" | xargs rm -rf
# cmake # cmake
install -d $RPM_BUILD_ROOT/%{_libdir}/vtk-%{lib_ver} install -d $RPM_BUILD_ROOT/%{_libdir}/vtk-%{version}
mv $RPM_BUILD_ROOT/%{_libdir}/*.cmake $RPM_BUILD_ROOT/%{_libdir}/vtk-%{lib_ver} mv $RPM_BUILD_ROOT/%{_libdir}/*.cmake $RPM_BUILD_ROOT/%{_libdir}/vtk-%{version}
mv $RPM_BUILD_ROOT/%{_libdir}/CMake $RPM_BUILD_ROOT/%{_libdir}/vtk-%{lib_ver} mv $RPM_BUILD_ROOT/%{_libdir}/CMake $RPM_BUILD_ROOT/%{_libdir}/vtk-%{version}
mv $RPM_BUILD_ROOT/%{_libdir}/hints $RPM_BUILD_ROOT/%{_libdir}/vtk-%{lib_ver} mv $RPM_BUILD_ROOT/%{_libdir}/hints $RPM_BUILD_ROOT/%{_libdir}/vtk-%{version}
# make scripts executable # make scripts executable
chmod a+x $RPM_BUILD_ROOT%{_libdir}/testing/*.{py,tcl} chmod a+x $RPM_BUILD_ROOT%{_libdir}/testing/*.{py,tcl}
# fix tcl stuff # fix tcl stuff
install -d $RPM_BUILD_ROOT/usr/share/tcl/vtk-%{lib_ver}/testing install -d $RPM_BUILD_ROOT/usr/share/tcl/vtk-%{version}/testing
mv $RPM_BUILD_ROOT/%{_libdir}/pkgIndex.tcl $RPM_BUILD_ROOT/usr/share/tcl/vtk-%{lib_ver} mv $RPM_BUILD_ROOT/%{_libdir}/pkgIndex.tcl $RPM_BUILD_ROOT/usr/share/tcl/vtk-%{version}
mv $RPM_BUILD_ROOT/%{_libdir}/tcl/* $RPM_BUILD_ROOT/usr/share/tcl/vtk-%{lib_ver} mv $RPM_BUILD_ROOT/%{_libdir}/tcl/* $RPM_BUILD_ROOT/usr/share/tcl/vtk-%{version}
mv $RPM_BUILD_ROOT/%{_libdir}/testing/*.tcl $RPM_BUILD_ROOT/usr/share/tcl/vtk-%{lib_ver}/testing mv $RPM_BUILD_ROOT/%{_libdir}/testing/*.tcl $RPM_BUILD_ROOT/usr/share/tcl/vtk-%{version}/testing
#python testing files --> remove them #python testing files --> remove them
rm -rf $RPM_BUILD_ROOT/%{_libdir}/testing rm -rf $RPM_BUILD_ROOT/%{_libdir}/testing
@ -217,6 +213,12 @@ for dir in vtk vtk-devel vtk-tcl vtk-testing-progs vtk-python; do
install -d $RPM_BUILD_ROOT/%{_docdir}/"$dir" install -d $RPM_BUILD_ROOT/%{_docdir}/"$dir"
done done
`for i in $(find %{buildroot}%{_datadir}/vtk-examples/ -name '*.py'); do chmod +x $i; done`
#chmod -x %buildroot/%{_libdir}/vtk-%{version}/*.cmake
#symlink duplicate files, made rpm smaller and rpmlint happyer
%fdupes -s %buildroot
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -260,6 +262,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libvtkmetaio.so.* %{_libdir}/libvtkmetaio.so.*
%{_libdir}/libvtksqlite.so.* %{_libdir}/libvtksqlite.so.*
%{_libdir}/libvtkverdict.so.* %{_libdir}/libvtkverdict.so.*
%{_libdir}/libvtkGeovis.so.*
%{_libdir}/libvtkalglib.so.*
%{_libdir}/libvtkproj4.so.*
%doc README.html %doc README.html
%doc vtkLogo.jpg %doc vtkLogo.jpg
@ -267,11 +272,11 @@ rm -rf $RPM_BUILD_ROOT
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%dir %{_libdir}/vtk-%{lib_ver} %dir %{_libdir}/vtk-%{version}
%{_includedir}/* %{_includedir}/*
%{_libdir}/vtk-%{lib_ver}/CMake %{_libdir}/vtk-%{version}/CMake
%{_libdir}/vtk-%{lib_ver}/*.cmake %{_libdir}/vtk-%{version}/*.cmake
%{_libdir}/vtk-%{lib_ver}/hints %{_libdir}/vtk-%{version}/hints
%{_libdir}/libvtkCommon.so %{_libdir}/libvtkCommon.so
%{_libdir}/libvtkFiltering.so %{_libdir}/libvtkFiltering.so
%{_libdir}/libvtkGenericFiltering.so %{_libdir}/libvtkGenericFiltering.so
@ -297,6 +302,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libvtkmetaio.so %{_libdir}/libvtkmetaio.so
%{_libdir}/libvtksqlite.so %{_libdir}/libvtksqlite.so
%{_libdir}/libvtkverdict.so %{_libdir}/libvtkverdict.so
%{_libdir}/libvtkGeovis.so
%{_libdir}/libvtkalglib.so
%{_libdir}/libvtkproj4.so
%doc README.html %doc README.html
%doc vtkLogo.jpg %doc vtkLogo.jpg
%defattr(0644,root,root,-) %defattr(0644,root,root,-)
@ -333,6 +341,7 @@ rm -rf $RPM_BUILD_ROOT
%files qt %files qt
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/libQVTK.so.* %{_libdir}/libQVTK.so.*
%{_libdir}/libvtkQtChart.so*
%{_bindir}/qtevents %{_bindir}/qtevents
%{_bindir}/qtimageviewer %{_bindir}/qtimageviewer
%{_bindir}/qtsimpleview %{_bindir}/qtsimpleview
@ -343,8 +352,14 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_datadir}/%{name}-examples %{_datadir}/%{name}-examples
%changelog %changelog
* Mon Jun 08 2009 Andrea Florio <andrea@opensuse.org> - 5.4.2
- made rpmlint happy (using fdupes)
- fixed rpm Group using real ones, please check here: http://en.opensuse.org/SUSE_Package_Conventions/RPM_Groups
- added libraries introduced in version 5.4.2 to file lists
- use qt4 instead of qt3
- replaced %{lib_version} with %{version}
- set VTK_LEGACY_REMOVE to OFF for compatibility with applications that uses the legacy functions
* Sat Jan 03 2009 Werner Hoch <werner.ho@gmx.de> - 5.2.1 * Sat Jan 03 2009 Werner Hoch <werner.ho@gmx.de> - 5.2.1
- removed vtk-data - removed vtk-data
- removed vtk-doc (doxygen) - removed vtk-doc (doxygen)
@ -356,5 +371,3 @@ rm -rf $RPM_BUILD_ROOT
- use qt3 instead of qt4 - use qt3 instead of qt4
* Thu Jul 18 2008 Werner Hoch <werner.ho@gmx.de> - 5.0.4 * Thu Jul 18 2008 Werner Hoch <werner.ho@gmx.de> - 5.0.4
- specfile taken from fedora core 9 and adapted to opensuse - specfile taken from fedora core 9 and adapted to opensuse