6 %bcond_with java # build with Java support (not yet done)
9 Summary: Toolkit for 3D computer graphics, image processing, and visualization
10 Summary(pl): Zestaw narzêdzi do trójwymiarowej grafiki, przetwarzania obrazu i wizualizacji
16 Source0: %{name}42Src.tar.bz2
17 Source1: %{name}42Data.tar.bz2
18 Patch0: %{name}-cmakefiles.patch
19 URL: http://public.kitware.com/VTK/
21 BuildRequires: python-devel
23 BuildRequires: XFree86-devel
24 BuildRequires: doxygen
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 The Visualization ToolKit (VTK) is an object oriented software system
29 for 3D computer graphics, image processing, and visualization. VTK
30 includes a textbook, a C++ class library, and several interpreted
31 interface layers including Tcl/Tk, Java, and Python. VTK supports a
32 wide variety of visualization algorithms including scalar, vector,
33 tensor, texture, and volumetric methods. It also supports advanced
34 modeling techniques like implicit modeling, polygon reduction, mesh
35 smoothing, cutting, contouring, and Delaunay triangulation. Moreover,
36 dozens of imaging algorithms have been integrated into the system.
37 This allows mixing 2D imaging / 3D graphics algorithms and data.
39 NOTE: The java wrapper is not included by default. You may rebuild
40 the srpm using "--with java" with JDK installed.
42 NOTE: All patented routines which are part of the package have been
43 removed in this version.
46 Summary: VTK header files for building C++ code
47 Summary(pl): Pliki nag³ówkowe VTK dla C++
48 Group: Development/C++
52 This provides the VTK header files required to compile C++
53 programs that use VTK to do 3D visualisation.
56 Summary: Tcl bindings for VTK
57 Summary(pl): Dowi±zania Tcl do VTK
58 Group: System/Libraries
62 The Visualization ToolKit (VTK) is an object oriented software system
63 for 3D computer graphics, image processing, and visualization. VTK
64 includes a textbook, a C++ class library, and several interpreted
65 interface layers including Tcl/Tk, Java, and Python. VTK supports a
66 wide variety of visualization algorithms including scalar, vector,
67 tensor, texture, and volumetric methods. It also supports advanced
68 modeling techniques like implicit modeling, polygon reduction, mesh
69 smoothing, cutting, contouring, and Delaunay triangulation. Moreover,
70 dozens of imaging algorithms have been integrated into the system.
71 This allows mixing 2D imaging / 3D graphics algorithms and data.
73 This package contains tcl bindings for VTK.
76 Summary: Python bindings for VTK
77 Summary(pl): Dowi±zania Pythona do VTK
80 Group: System/Libraries
83 The Visualization ToolKit (VTK) is an object oriented software system
84 for 3D computer graphics, image processing, and visualization. VTK
85 includes a textbook, a C++ class library, and several interpreted
86 interface layers including Tcl/Tk, Java, and Python. VTK supports a
87 wide variety of visualization algorithms including scalar, vector,
88 tensor, texture, and volumetric methods. It also supports advanced
89 modeling techniques like implicit modeling, polygon reduction, mesh
90 smoothing, cutting, contouring, and Delaunay triangulation. Moreover,
91 dozens of imaging algorithms have been integrated into the system.
92 This allows mixing 2D imaging / 3D graphics algorithms and data.
94 This package contains python bindings for VTK.
97 Summary: Java bindings for VTK
98 Summary(pl): Dowi±zania Javy do VTK
99 Group: Development/Java
103 The Visualization ToolKit (VTK) is an object oriented software system
104 for 3D computer graphics, image processing, and visualization. VTK
105 includes a textbook, a C++ class library, and several interpreted
106 interface layers including Tcl/Tk, Java, and Python. VTK supports a
107 wide variety of visualization algorithms including scalar, vector,
108 tensor, texture, and volumetric methods. It also supports advanced
109 modeling techniques like implicit modeling, polygon reduction, mesh
110 smoothing, cutting, contouring, and Delaunay triangulation. Moreover,
111 dozens of imaging algorithms have been integrated into the system.
112 This allows mixing 2D imaging / 3D graphics algorithms and data.
114 This package contains java bindings for VTK.
117 Summary: C++, Tcl and Python example programs/scripts for VTK
118 Summary(pl): Przyk³adowe programy/skrypty w C++, Tcl-u i Pythonie dla VTK
119 Group: Development/Other
123 %description examples
124 This package contains all the examples from the VTK source.
125 To compile the C++ examples you will need to install the vtk-devel
126 package as well. The Python and Tcl examples can be run with the
127 corresponding packages (vtk-python, vtk-tcl).
130 Summary: Test programs for VTK
131 Summary(pl): Programy testowe dla VTK
132 Group: Development/Other
136 %description test-suite
137 This package contains all testing programs from the VTK source. The
138 source code of these programs can be found in the vtk-examples
142 Summary: Data files for VTK
143 Summary(pl): Pliki danych dla VTK
144 Group: Development/Libraries
147 This package contains all the data from the VTKData repository. These
148 data are required to run various examples from the examples package.
151 %setup -q -a 1 -n VTK-%version
157 #cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \
158 # -DLIBRARY_OUTPUT_PATH:PATH=$RPM_BUILD_DIR/VTK-%version/lib \
159 # -DEXECUTABLE_OUTPUT_PATH:PATH=$RPM_BUILD_DIR/VTK-%version/bin \
160 # -DCMAKE_INSTALL_PREFIX:PATH=/usr \
161 # -DCMAKE_SKIP_RPATH:BOOL=ON \
162 # -DCMAKE_CXX_FLAGS:STRING="$RPM_OPT_FLAGS" \
163 # -DCMAKE_C_FLAGS:STRING="$RPM_OPT_FLAGS" \
164 # -DJAVA_INCLUDE_PATH:PATH=$JAVA_HOME/include
165 # -DJAVA_INCLUDE_PATH2:PATH=$JAVA_HOME/include/linux \
166 # -DJAVE_AWT_INCLUDE_PATH:PATH=$JAVA_HOME/include \
167 # -DPYTHON_INCLUDE_PATH:PATH=$(python -c"import os,sys; print os.path.join(sys.exec_prefix, 'include', 'python' + sys.version[:3])") \
168 # -DPYTHON_LIBRARY:FILEPATH=$(python -c"import os,sys; print os.path.join(sys.exec_prefix, 'lib', 'python' + sys.version[:3], 'config/libpython' + sys.version[:3] + '.a')") \
169 # -DVTK_DATA_ROOT:PATH=%{_docdir}/vtk-data-%{version} \
170 # -DVTK_WRAP_PYTHON:BOOL=ON \
171 # -DVTK_WRAP_JAVA:BOOL=ON \
172 # -DVTK_WRAP_TCL:BOOL=ON \
173 # -DVTK_USE_HYBRID:BOOL=ON \
174 # -DVTK_USE_PARALLEL:BOOL=ON \
175 # -DVTK_USE_RENDERING:BOOL=ON \
176 # -DVTK_USE_X:BOOL=ON \
177 # -DBUILD_DOCUMENTATION:BOOL=ON \
178 # -DBUILD_EXAMPLES:BOOL=ON \
179 # -DBUILD_SHARED_LIBS:BOOL=ON \
180 # -DBUILD_TESTING:BOOL=ON \
181 # -DOPENGL_INCLUDE_PATH:FILEPATH=/usr/X11R6/include/GL
182 ## -DOPENGL_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.so.1.0
185 #cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \
186 # -DLIBRARY_OUTPUT_PATH:PATH=$RPM_BUILD_DIR/VTK-%version/lib \
187 # -DEXECUTABLE_OUTPUT_PATH:PATH=$RPM_BUILD_DIR/VTK-%version/bin \
188 # -DCMAKE_INSTALL_PREFIX:PATH=/usr \
189 # -DCMAKE_SKIP_RPATH:BOOL=ON \
190 # -DCMAKE_CXX_FLAGS:STRING="$RPM_OPT_FLAGS" \
191 # -DCMAKE_C_FLAGS:STRING="$RPM_OPT_FLAGS" \
192 # -DPYTHON_INCLUDE_PATH:PATH=$(python -c"import os,sys; print os.path.join(sys.exec_prefix, 'include', 'python' + sys.version[:3])") \
193 # -DPYTHON_LIBRARY:FILEPATH=$(python -c"import os,sys; print os.path.join(sys.exec_prefix, 'lib', 'python' + sys.version[:3], 'config/libpython' + sys.version[:3] + '.a')") \
194 # -DVTK_DATA_ROOT:PATH=%{_datadir}/vtk-data-%{version} \
195 # -DVTK_WRAP_PYTHON:BOOL=ON \
196 # -DVTK_WRAP_JAVA:BOOL=off \
197 # -DVTK_WRAP_TCL:BOOL=ON \
198 # -DVTK_USE_HYBRID:BOOL=ON \
199 # -DVTK_USE_PARALLEL:BOOL=ON \
200 # -DVTK_USE_RENDERING:BOOL=ON \
201 # -DVTK_USE_X:BOOL=ON \
202 # -DBUILD_DOCUMENTATION:BOOL=ON \
203 # -DBUILD_EXAMPLES:BOOL=ON \
204 # -DBUILD_SHARED_LIBS:BOOL=ON \
205 # -DBUILD_TESTING:BOOL=ON \
206 # -DOPENGL_INCLUDE_PATH:FILEPATH=/usr/X11R6/include/GL
207 ## -DOPENGL_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.so.1.0
211 -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
212 -DLIBRARY_OUTPUT_PATH:PATH=$RPM_BUILD_DIR/VTK-%version/lib \
213 -DEXECUTABLE_OUTPUT_PATH:PATH=$RPM_BUILD_DIR/VTK-%version/bin \
214 -DCMAKE_SKIP_RPATH:BOOL=ON \
215 -DBUILD_EXAMPLES:BOOL=ON \
216 -DBUILD_SHARED_LIBS:BOOL=ON \
217 -DBUILD_DOCUMENTATION:BOOL=ON \
218 -DBUILD_TESTING:BOOL=ON \
219 -DCMAKE_BACKWARDS_COMPATIBILITY=1.8 \
220 -DOPENGL_INCLUDE_PATH:PATH=/usr/X11R6/include/GL \
221 -DPYTHON_INCLUDE_PATH:PATH=%{_includedir}/python2.3 \
222 -DPYTHON_LIBRARY:FILEPATH=$(python -c"import os,sys; print os.path.join(sys.exec_prefix, 'lib', 'python' + sys.version [:3], 'config/libpython' + sys.version[:3] + '.a')") \
223 -DPYTHON_UTIL_LIBRARY:PATH=/usr/lib/libutil.so \
224 -DTCL_INCLUDE_PATH:PATH=%{_includedir} \
225 -DTCL_LIBRARY:PATH=%{_libdir}/libtcl.so \
226 -DTK_INCLUDE_PATH:PATH=%{_includedir} \
227 -DTK_LIBRARY:PATH=%{_libdir}/libtk.so \
228 -DVTK_DATA_ROOT:PATH=%{_datadir}/vtk \
229 -DVTK_USE_HYBRID:BOOL=ON \
230 -DVTK_USE_PARALLEL:BOOL=ON \
231 -DVTK_USE_PATENTED:BOOL=off \
232 -DVTK_USE_RENDERING:BOOL=ON \
233 -DVTK_WRAP_JAVA:BOOL=OFF \
234 -DVTK_WRAP_PYTHON:BOOL=ON \
235 -DVTK_WRAP_TCL:BOOL=ON \
236 -DBUILD_SHARED_LIBS:BOOL=ON \
237 -DCMAKE_CXX_COMPILER:PATH="%{__cxx}" \
238 -DCMAKE_C_COMPILER:PATH="%{__cc}" \
239 -DCMAKE_LINKER_FLAGS:STRING="%{rpmldflags}" \
240 -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
246 rm -rf $RPM_BUILD_ROOT
249 export VTKPYTHONPATH=%(python -c"import os,sys; print os.path.join(sys.exec_prefix, 'lib', 'python' + sys.version[:3],'site-packages')")
252 install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
253 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk
254 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/gtk
255 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/qt
256 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/testing
257 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/tk
258 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/util
259 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/wx
260 install -d -m 755 $RPM_BUILD_ROOT/$VTKPYTHONPATH
261 install -d -m 755 $RPM_BUILD_ROOT/usr/include/vtk
263 #install libs and tcl
266 DESTDIR=$RPM_BUILD_ROOT
268 chmod 755 $RPM_BUILD_ROOT%{_libdir}/vtk/*.so
269 for f in $RPM_BUILD_ROOT%{_libdir}/vtk/libvtk*Python*.so
271 ln -s ../`basename $f` $RPM_BUILD_ROOT%{_libdir}/vtk/python/
275 install -m 755 bin/* $RPM_BUILD_ROOT%{_bindir}
278 install -m 644 Wrapping/Python/*.py $RPM_BUILD_ROOT%{_libdir}/vtk/python
279 install -m 644 Wrapping/Python/vtk/*.py $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk
280 install -m 644 Wrapping/Python/vtk/gtk/*.py $RPM_BUILD_ROOT/usr/lib/vtk/python/vtk/gtk
281 install -m 644 Wrapping/Python/vtk/qt/*.py $RPM_BUILD_ROOT/usr/lib/vtk/python/vtk/qt
282 install -m 644 Wrapping/Python/vtk/tk/*.py $RPM_BUILD_ROOT/usr/lib/vtk/python/vtk/tk
283 install -m 644 Wrapping/Python/vtk/util/*.py $RPM_BUILD_ROOT/usr/lib/vtk/python/vtk/util
284 install -m 644 Wrapping/Python/vtk/wx/*.py $RPM_BUILD_ROOT/usr/lib/vtk/python/vtk/wx
285 cat > $RPM_BUILD_ROOT/$VTKPYTHONPATH/vtkpython.pth <<_EOF
286 %{_libdir}/vtk/python
291 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/java
292 install -m 644 lib/vtk.jar $RPM_BUILD_ROOT/usr/lib/vtk/java
293 install -m 644 java/vtk/*.java $RPM_BUILD_ROOT%{_libdir}/vtk/java
297 mkdir -p $RPM_BUILD_ROOT/%_datadir/%name-data
298 cp -r VTKData-release-4-2/* $RPM_BUILD_ROOT/%_datadir/%name-data
299 rm -fr $RPM_BUILD_ROOT/%_datadir/%name-data/CVS
301 #install test-suite and examples
302 for d in Common Filtering Graphics Hybrid IO Imaging Parallel Patented Rendering
304 mkdir -p $RPM_BUILD_ROOT/%_datadir/vtk-examples/Testing/$d
305 cp -a $d/Testing/* $RPM_BUILD_ROOT/%_datadir/vtk-examples/Testing/$d
307 cp -a Examples $RPM_BUILD_ROOT/%_datadir/vtk-examples
309 # get rid of unwanted files
310 find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name "*.o" -exec rm {} \;
311 find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name CMakeCache.txt -exec rm {} \;
312 find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name Makefile -exec rm {} \;
313 find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name DartTestfile.txt -exec rm {} \;
314 find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name .NoDartCoverage -exec rm {} \;
315 find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name "CMake*" -exec rm {} \;
316 find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name "cmake.*" -exec rm {} \;
318 # Generate the package testing-progs lists and store them in file-lists
319 echo "%defattr (-, root, root)" > testing-progs-list
321 find ${RPM_BUILD_ROOT}/usr/bin -type f | \
322 sed -e "s#^${RPM_BUILD_ROOT}##g" | \
323 egrep -v '^/usr/bin/(vtk|pvtk|vtkWrap.*|vtkParse.*|VTKJavaExecutable|vtkpython|pvtkpython)$' \
324 >> testing-progs-list
326 find ${RPM_BUILD_ROOT}/usr/bin -type f | \
327 sed -e "s#^${RPM_BUILD_ROOT}##g" | \
328 egrep -v '^/usr/bin/(vtk|pvtk|vtkWrap.*|vtkParse.*|vtkpython|pvtkpython)$' \
329 >> testing-progs-list
332 %post -p /sbin/ldconfig
333 %post tcl -p /sbin/ldconfig
334 %post python -p /sbin/ldconfig
336 %post java -p /sbin/ldconfig
339 %postun -p /sbin/ldconfig
340 %postun tcl -p /sbin/ldconfig
341 %postun python -p /sbin/ldconfig
343 %postun java -p /sbin/ldconfig
347 %defattr(-,root,root)
348 %doc README.html vtkLogo.jpg
350 %{_libdir}/vtk/libvtkCommon.so
351 %{_libdir}/vtk/libvtkFiltering.so
352 %{_libdir}/vtk/libvtkGraphics.so
353 %{_libdir}/vtk/libvtkHybrid.so
354 %{_libdir}/vtk/libvtkImaging.so
355 %{_libdir}/vtk/libvtkIO.so
356 %{_libdir}/vtk/libvtkParallel.so
357 %{_libdir}/vtk/libvtkRendering.so
358 %{_libdir}/vtk/libvtkjpeg.so
359 %{_libdir}/vtk/libvtkpng.so
360 %{_libdir}/vtk/libvtkzlib.so
361 %{_libdir}/vtk/libvtkexpat.so
362 %{_libdir}/vtk/libvtkfreetype.so
363 %{_libdir}/vtk/libvtkftgl.so
364 %{_libdir}/vtk/libvtktiff.so
367 %defattr(-,root,root)
368 %doc %{_libdir}/vtk/doxygen
371 %{_libdir}/vtk/*.cmake
372 %doc Utilities/Upgrading/*
374 %files test-suite -f testing-progs-list
377 %defattr(-,root,root)
378 %{_bindir}/vtkWrapTcl
379 %{_libdir}/vtk/libvtk*TCL.so
382 %dir %{_libdir}/vtk/testing
383 %{_libdir}/vtk/testing/*.tcl
388 %defattr(-,root,root)
389 %_bindir/vtkWrapPython
391 %_libdir/vtk/libvtk*Python*.so
393 %dir %_libdir/vtk/testing
394 %_libdir/vtk/testing/*.py
395 %(python -c"import os,sys; print os.path.join(sys.exec_prefix, 'lib', 'python' + sys.version[:3],'site-packages', 'vtkpython.pth')")
399 %defattr(-,root,root)
400 %{_bindir}/vtkParseJava
401 %{_bindir}/vtkWrapJava
402 %{_bindir}/VTKJavaExecutable
403 %{_libdir}/vtk/libvtk*Java.so
408 %defattr(-,root,root)
409 %dir %_datadir/vtk-examples
410 %_datadir/vtk-examples/Examples
411 %_datadir/vtk-examples/Testing
414 %defattr(-,root,root)
415 %dir %_datadir/vtk-data
416 %_datadir/vtk-data/Baseline
417 %_datadir/vtk-data/Data
418 %_datadir/vtk-data/VTKData.readme
421 rm -rf $RPM_BUILD_ROOT
424 * Mon Mar 01 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 4.2.2-4mdk
427 * Sun Feb 29 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 4.2.2-3mdk
430 * Sat Aug 9 2003 Austin Acton <aacton@yorku.ca> 4.2.2-2mdk
433 * Thu Jul 17 2003 Austin Acton <aacton@yorku.ca> 4.2.2-1mdk
436 - some removal of some lint
437 - some java conditionals
439 * Sun Feb 2 2003 Austin Acton <aacton@yorku.ca> 4.0-1mdk
441 - stole most of specfile from http://www.creatis.insa-lyon.fr/vtk/