diff --git a/vtk-6.1.0-netcdf.patch b/vtk-6.1.0-netcdf.patch deleted file mode 100644 index e6f8b64..0000000 --- a/vtk-6.1.0-netcdf.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -up VTK/ThirdParty/netcdf/CMakeLists.txt.netcdf VTK/ThirdParty/netcdf/CMakeLists.txt ---- VTK/ThirdParty/netcdf/CMakeLists.txt.netcdf 2013-12-27 20:29:11.644289659 -0700 -+++ VTK/ThirdParty/netcdf/CMakeLists.txt 2013-12-27 20:33:48.071895769 -0700 -@@ -1,10 +1,18 @@ --vtk_module_third_party(NetCDF -- LIBRARIES vtkNetCDF vtkNetCDF_cxx -- INCLUDE_DIRS -- ${CMAKE_CURRENT_SOURCE_DIR}/vtknetcdf/include -- ${CMAKE_CURRENT_BINARY_DIR}/vtknetcdf -- COMPONENTS C CXX -- ) -+if(NOT VTK_USE_SYSTEM_NETCDF) -+ vtk_module_third_party(NetCDF -+ LIBRARIES vtkNetCDF vtkNetCDF_cxx -+ INCLUDE_DIRS -+ ${CMAKE_CURRENT_SOURCE_DIR}/vtknetcdf/include -+ ${CMAKE_CURRENT_BINARY_DIR}/vtknetcdf -+ COMPONENTS C CXX -+ ) -+else(NOT VTK_USE_SYSTEM_NETCDF) -+ vtk_module_third_party(NetCDF -+ LIBRARIES vtkNetCDF netcdf -+ COMPONENTS C CXX -+ ) -+endif() -+ - - #Configure the top cpp header to switch between system and internal - #netcdf just like vtk_module_third_party does for the c header. diff --git a/vtk-6.1.0-system.patch b/vtk-6.1.0-system.patch deleted file mode 100644 index c75d544..0000000 --- a/vtk-6.1.0-system.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -up VTK/CMake/vtkModuleMacros.cmake.system VTK/CMake/vtkModuleMacros.cmake ---- VTK/CMake/vtkModuleMacros.cmake.system 2013-12-24 19:17:43.000000000 -0700 -+++ VTK/CMake/vtkModuleMacros.cmake 2013-12-27 20:28:22.375573277 -0700 -@@ -682,7 +682,7 @@ macro(vtk_module_third_party _pkg) - message(FATAL_ERROR "Cannot specify both LIBRARIES and NO_LIBRARIES") - endif() - -- option(VTK_USE_SYSTEM_${_upper} "Use system-installed ${_pkg}" OFF) -+ option(VTK_USE_SYSTEM_${_upper} "Use system-installed ${_pkg}" ${VTK_USE_SYSTEM_LIBRARIES}) - mark_as_advanced(VTK_USE_SYSTEM_${_upper}) - - if(VTK_USE_SYSTEM_${_upper}) -diff -up VTK/CMakeLists.txt.system VTK/CMakeLists.txt ---- VTK/CMakeLists.txt.system 2013-12-27 20:28:22.374573241 -0700 -+++ VTK/CMakeLists.txt 2013-12-27 20:28:48.118669708 -0700 -@@ -132,6 +132,11 @@ if (CMAKE_CROSSCOMPILING AND NOT COMPILE - endif() - - #----------------------------------------------------------------------------- -+# Do we try to use system libraries by default? -+OPTION(VTK_USE_SYSTEM_LIBRARIES "Use the system's libraries by default." OFF) -+MARK_AS_ADVANCED(VTK_USE_SYSTEM_LIBRARIES) -+ -+#----------------------------------------------------------------------------- - # The third party macros are still used in one or two third party builds. - include(vtkThirdParty) - diff --git a/vtk-install.patch b/vtk-install.patch deleted file mode 100644 index 27c6c3a..0000000 --- a/vtk-install.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up VTK-6.1.0/CMake/vtkModuleTop.cmake.install VTK-6.1.0/CMake/vtkModuleTop.cmake ---- VTK-6.1.0/CMake/vtkModuleTop.cmake.install 2014-01-23 19:12:04.922871103 -0700 -+++ VTK-6.1.0/CMake/vtkModuleTop.cmake 2014-01-23 19:14:33.002645155 -0700 -@@ -330,11 +330,15 @@ if (NOT VTK_INSTALL_NO_DEVELOPMENT) - CMake/pythonmodules.h.in - CMake/UseVTK.cmake - CMake/FindTCL.cmake -+ CMake/TopologicalSort.cmake - CMake/vtkTclTkMacros.cmake - CMake/vtk-forward.c.in -+ CMake/vtkGroups.cmake - CMake/vtkForwardingExecutable.cmake - CMake/vtkJavaWrapping.cmake - CMake/vtkMakeInstantiator.cmake -+ CMake/vtkMakeInstantiator.cxx.in -+ CMake/vtkMakeInstantiator.h.in - CMake/vtkModuleAPI.cmake - CMake/vtkModuleHeaders.cmake.in - CMake/vtkModuleInfo.cmake.in diff --git a/vtk-tcllib.patch b/vtk-tcllib.patch index a56bce1..9a37e46 100644 --- a/vtk-tcllib.patch +++ b/vtk-tcllib.patch @@ -1,19 +1,18 @@ -diff -up VTK-6.1.0/CMake/vtkModuleMacros.cmake.tcllib VTK-6.1.0/CMake/vtkModuleMacros.cmake -diff -up VTK-6.1.0/Wrapping/Tcl/CMakeLists.txt.tcllib VTK-6.1.0/Wrapping/Tcl/CMakeLists.txt ---- VTK-6.1.0/Wrapping/Tcl/CMakeLists.txt.tcllib 2014-01-22 08:55:41.000000000 -0700 -+++ VTK-6.1.0/Wrapping/Tcl/CMakeLists.txt 2015-02-03 16:12:42.635456315 -0700 -@@ -261,7 +261,7 @@ endforeach() +diff -up VTK-6.2.0.rc1/Wrapping/Tcl/CMakeLists.txt.tcllib VTK-6.2.0.rc1/Wrapping/Tcl/CMakeLists.txt +--- VTK-6.2.0.rc1/Wrapping/Tcl/CMakeLists.txt.tcllib 2015-02-16 15:08:49.121229694 -0700 ++++ VTK-6.2.0.rc1/Wrapping/Tcl/CMakeLists.txt 2015-02-16 15:09:38.793971979 -0700 +@@ -264,7 +264,7 @@ endforeach() # Configure the Tcl package index file for the install tree. SET(VTK_TCL_SCRIPT_DIR "[file dirname [info script]]") IF(UNIX) - SET(VTK_TCL_LIBRARY_DIR "[file dirname [file dirname [file dirname [info script]]]]") + SET(VTK_TCL_LIBRARY_DIR "${CMAKE_INSTALL_PREFIX}/${VTK_INSTALL_LIBRARY_DIR}") - ELSE(UNIX) + ELSE() SET(VTK_TCL_LIBRARY_DIR "[file join [file dirname [file dirname [file dirname [file dirname [info script]]]]] bin]") -diff -up VTK-6.1.0/Wrapping/Tcl/pkgIndex.tcl.in.tcllib VTK-6.1.0/Wrapping/Tcl/pkgIndex.tcl.in ---- VTK-6.1.0/Wrapping/Tcl/pkgIndex.tcl.in.tcllib 2014-01-22 08:55:41.000000000 -0700 -+++ VTK-6.1.0/Wrapping/Tcl/pkgIndex.tcl.in 2015-02-03 16:12:42.635456315 -0700 +diff -up VTK-6.2.0.rc1/Wrapping/Tcl/pkgIndex.tcl.in.tcllib VTK-6.2.0.rc1/Wrapping/Tcl/pkgIndex.tcl.in +--- VTK-6.2.0.rc1/Wrapping/Tcl/pkgIndex.tcl.in.tcllib 2015-02-16 12:03:08.000000000 -0700 ++++ VTK-6.2.0.rc1/Wrapping/Tcl/pkgIndex.tcl.in 2015-02-16 15:08:49.121229694 -0700 @@ -7,7 +7,7 @@ package ifneeded vtkinit {@VTK_MAJOR_VER if {[catch "load {} $libName"]} { set libExt [info sharedlibextension] @@ -23,9 +22,9 @@ diff -up VTK-6.1.0/Wrapping/Tcl/pkgIndex.tcl.in.tcllib VTK-6.1.0/Wrapping/Tcl/pk if {[catch "cd {$libPath}; load {$libFile}" errorMessage]} { puts $errorMessage } -diff -up VTK-6.1.0/Wrapping/Tcl/vtkbase/vtkbase.tcl.in.tcllib VTK-6.1.0/Wrapping/Tcl/vtkbase/vtkbase.tcl.in ---- VTK-6.1.0/Wrapping/Tcl/vtkbase/vtkbase.tcl.in.tcllib 2015-02-03 16:12:42.814455894 -0700 -+++ VTK-6.1.0/Wrapping/Tcl/vtkbase/vtkbase.tcl.in 2015-02-03 16:23:08.653411667 -0700 +diff -up VTK-6.2.0.rc1/Wrapping/Tcl/vtkbase/vtkbase.tcl.in.tcllib VTK-6.2.0.rc1/Wrapping/Tcl/vtkbase/vtkbase.tcl.in +--- VTK-6.2.0.rc1/Wrapping/Tcl/vtkbase/vtkbase.tcl.in.tcllib 2015-02-16 12:03:08.000000000 -0700 ++++ VTK-6.2.0.rc1/Wrapping/Tcl/vtkbase/vtkbase.tcl.in 2015-02-16 15:08:49.122229706 -0700 @@ -44,7 +44,7 @@ namespace eval ::vtk { } diff --git a/vtk-type.patch b/vtk-type.patch deleted file mode 100644 index fc891e9..0000000 --- a/vtk-type.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx.type VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx ---- VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx.type 2014-01-22 08:55:41.000000000 -0700 -+++ VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx 2015-01-08 15:00:40.492667074 -0700 -@@ -1186,7 +1186,7 @@ bool vtkFreeTypeTools::CalculateBounding - if (bitmap) - { - metaData.ascent = std::max(bitmapGlyph->top - 1, metaData.ascent); -- metaData.descent = std::min(-(bitmap->rows - (bitmapGlyph->top - 1)), -+ metaData.descent = std::min(-(static_cast(bitmap->rows) - (bitmapGlyph->top - 1)), - metaData.descent); - } - ++heightString; -@@ -1951,8 +1951,8 @@ void vtkFreeTypeTools::GetLineMetrics(T - if (bitmap) - { - bbox[0] = std::min(bbox[0], pen[0] + bitmapGlyph->left); -- bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + bitmap->width); -- bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - bitmap->rows); -+ bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + static_cast(bitmap->width)); -+ bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - static_cast(bitmap->rows)); - bbox[3] = std::max(bbox[3], pen[1] + bitmapGlyph->top - 1); - } - else diff --git a/vtk-vtkpython.patch b/vtk-vtkpython.patch deleted file mode 100644 index f310479..0000000 --- a/vtk-vtkpython.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up VTK6.0.0/Wrapping/Python/CMakeLists.txt.vtkpython VTK6.0.0/Wrapping/Python/CMakeLists.txt ---- VTK6.0.0/Wrapping/Python/CMakeLists.txt.vtkpython 2013-06-12 13:47:10.000000000 -0600 -+++ VTK6.0.0/Wrapping/Python/CMakeLists.txt 2013-07-26 16:44:19.954295281 -0600 -@@ -371,3 +371,8 @@ endif() - - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in - ${CMAKE_CURRENT_BINARY_DIR}/setup.py @ONLY IMMEDIATE) -+ -+if(NOT VTK_INSTALL_NO_RUNTIME AND NOT VTK_INSTALL_NO_PYTHON) -+ install(TARGETS vtkpython ${VTKPYTHON_EXECUTABLE} -+ DESTINATION ${VTK_INSTALL_RUNTIME_DIR}) -+endif() diff --git a/vtk.spec b/vtk.spec index dbba5f8..553b2d1 100644 --- a/vtk.spec +++ b/vtk.spec @@ -8,28 +8,18 @@ Summary: The Visualization Toolkit - A high level 3D visualization library Name: vtk -Version: 6.1.0 -Release: 24%{?dist} +Version: 6.2.0 +Release: 0.1.rc1%{?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/6.1/VTK-%{version}.tar.gz -# Use system libraries -# http://public.kitware.com/Bug/view.php?id=11823 -Patch0: vtk-6.1.0-system.patch -# Install some more needed cmake files to try to support paraview build -# http://www.vtk.org/Bug/view.php?id=14157 -Patch1: vtk-install.patch -# Patch to vtk to use system netcdf library -Patch2: vtk-6.1.0-netcdf.patch +Source0: http://www.vtk.org/files/release/6.2/VTK-%{version}.rc1.tar.gz +Source1: http://www.vtk.org/files/release/6.2/VTKData-%{version}.rc1.tar.gz +Source2: xorg.conf # Fix compilation with mesa 10.4 # https://bugzilla.redhat.com/show_bug.cgi?id=1138466 Patch3: vtk-glext.patch -# Fix types for std::min/man -# http://www.vtk.org/Bug/view.php?id=15249 -Patch4: vtk-type.patch # Fix tcl library loading # http://www.vtk.org/Bug/view.php?id=15279 Patch5: vtk-tcllib.patch @@ -69,6 +59,8 @@ BuildRequires: wget BuildRequires: %{_includedir}/Xm BuildRequires: blas-devel BuildRequires: lapack-devel +# For %check +BuildRequires: xorg-x11-drv-dummy %{!?with_java:Conflicts: vtk-java} Requires: hdf5 = %{_hdf5_version} @@ -85,6 +77,10 @@ volume rendering, LOD control). %package devel Summary: VTK header files for building C++ code Requires: vtk%{?_isa} = %{version}-%{release} +Requires: vtk-python%{?_isa} = %{version}-%{release} +Requires: vtk-qt-python%{?_isa} = %{version}-%{release} +Requires: vtk-qt-tcl%{?_isa} = %{version}-%{release} +Requires: vtk-tcl%{?_isa} = %{version}-%{release} %{?with_OSMesa:Requires: mesa-libOSMesa-devel%{?_isa}} Requires: cmake Requires: blas-devel%{?_isa} @@ -106,7 +102,6 @@ Requires: qtwebkit-devel%{?_isa} Requires: jsoncpp-devel%{?_isa} # bz #1183210 + #1183530 Requires: python2-devel -Group: Development/Libraries %description devel This provides the VTK header files required to compile C++ programs that @@ -115,7 +110,6 @@ use VTK to do 3D visualization. %package tcl Summary: Tcl bindings for VTK Requires: vtk%{?_isa} = %{version}-%{release} -Group: System Environment/Libraries %description tcl tcl bindings for VTK @@ -123,7 +117,6 @@ tcl bindings for VTK %package python Summary: Python bindings for VTK Requires: vtk%{?_isa} = %{version}-%{release} -Group: System Environment/Libraries %description python python bindings for VTK @@ -132,7 +125,6 @@ python bindings for VTK %package java Summary: Java bindings for VTK Requires: vtk%{?_isa} = %{version}-%{release} -Group: System Environment/Libraries %description java Java bindings for VTK @@ -141,7 +133,6 @@ Java bindings for VTK %package qt Summary: Qt bindings for VTK Requires: vtk%{?_isa} = %{version}-%{release} -Group: System Environment/Libraries %description qt Qt bindings for VTK @@ -149,7 +140,6 @@ Qt bindings for VTK %package qt-python Summary: Qt Python bindings for VTK Requires: vtk%{?_isa} = %{version}-%{release} -Group: System Environment/Libraries %description qt-python Qt Python bindings for VTK @@ -157,23 +147,28 @@ Qt Python bindings for VTK %package qt-tcl Summary: Qt TCL bindings for VTK Requires: vtk%{?_isa} = %{version}-%{release} -Group: System Environment/Libraries %description qt-tcl Qt TCL bindings for VTK +%package data +Summary: VTK data files for tests/examples +BuildArch: noarch +Obsoletes: vtkdata < 6.1.0-3 + +%description data +VTK data files for tests and examples. + %package testing Summary: Testing programs for VTK -Requires: vtk%{?_isa} = %{version}-%{release}, vtkdata = %{version} -Group: Applications/Engineering +Requires: vtk%{?_isa} = %{version}-%{release}, vtk-data = %{version} %description testing Testing programs for VTK %package examples Summary: Examples for VTK -Requires: vtk%{?_isa} = %{version}-%{release}, vtkdata = %{version} -Group: Applications/Engineering +Requires: vtk%{?_isa} = %{version}-%{release}, vtk-data = %{version} %description examples This package contains many well-commented examples showing how to use @@ -182,12 +177,8 @@ programming languages. %prep -%setup -q -n VTK-%{version} -%patch0 -p1 -b .system -%patch1 -p1 -b .install -%patch2 -p1 -b .netcdf +%setup -q -b 1 -n VTK-%{version}.rc1 %patch3 -p1 -b .glext -%patch4 -p1 -b .type %patch5 -p1 -b .tcllib # Remove included thirdparty sources just to be sure # TODO - vtksqlite @@ -196,11 +187,6 @@ do rm -r ThirdParty/*/${x} done -# Replace relative path ../../../VTKData with %{_datadir}/vtkdata-%{version} -# otherwise it will break on symlinks. -grep -rl '\.\./\.\./\.\./\.\./VTKData' . | xargs \ - perl -pi -e's,\.\./\.\./\.\./\.\./VTKData,%{_datadir}/vtkdata-%{version},g' - # Save an unbuilt copy of the Example's sources for %doc mkdir vtk-examples cp -a Examples vtk-examples @@ -225,7 +211,7 @@ pushd build %{cmake} .. \ -DBUILD_DOCUMENTATION:BOOL=ON \ -DBUILD_EXAMPLES:BOOL=ON \ - -DBUILD_TESTING:BOOL=OFF \ + -DBUILD_TESTING:BOOL=ON \ -DVTK_CUSTOM_LIBRARY_SUFFIX="" \ -DVTK_INSTALL_ARCHIVE_DIR:PATH=%{_lib}/vtk \ -DVTK_INSTALL_DATA_DIR=share/vtk \ @@ -283,8 +269,8 @@ make %{?_smp_mflags} find . -name \*.c -or -name \*.cxx -or -name \*.h -or -name \*.hxx -or \ -name \*.gif | xargs chmod -x + %install -mkdir -p %{buildroot} pushd build make install DESTDIR=%{buildroot} @@ -296,11 +282,6 @@ echo %{_libdir}/vtk > %{buildroot}%{_sysconfdir}/ld.so.conf.d/vtk-%{_arch}.conf ls %{buildroot}%{_libdir}/vtk/*.so.* \ | grep -Ev '(Java|Qt|Python27D|TCL)' | sed -e's,^%{buildroot},,' > libs.list -# List of executable utilities -cat > utils.list << EOF -vtkEncodeString -EOF - # List of executable examples cat > examples.list << EOF HierarchicalBoxPipeline @@ -325,27 +306,31 @@ Cone5 Cone6 EOF +# List of executable test binaries +find bin \( -name \*Tests -o -name Test\* -o -name VTKBenchMark \) \ + -printf '%f\n' > testing.list + # Install examples too -for filelist in examples.list; do +for filelist in examples.list testing.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 +for filelist in examples.list testing.list; do perl -pi -e's,^,%{_bindir}/,' $filelist done # Remove any remnants of rpaths on files we install # Seems to be some kind of java path -for file in `cat examples.list`; do +for file in `cat examples.list testing.list`; do chrpath -d %{buildroot}$file done chrpath -d %{buildroot}%{_libdir}/qt4/plugins/designer/libQVTKWidgetPlugin.so # Main package contains utils and core libs -cat libs.list utils.list > main.list +cat libs.list popd # Make scripts executable @@ -358,15 +343,30 @@ for file in `find %{buildroot} -type f -perm 0755 \ head -1 $file | grep '^#!' > /dev/null && continue chmod 0644 $file done -find Utilities/Upgrading -type f | xargs chmod -x +find Utilities/Upgrading -type f -print0 | xargs -0 chmod -x # Setup Wrapping docs tree -mkdir _docs +mkdir -p _docs cp -pr --parents Wrapping/*/README* _docs/ +#Install data +mkdir -p %{buildroot}%{_datadir}/vtkdata +cp -al build/ExternalData/* %{buildroot}%{_datadir}/vtkdata/ + %check -#LD_LIBARARY_PATH=`pwd`/bin ctest -V +cd build +cp %SOURCE2 . +if [ -x /usr/libexec/Xorg ]; then + Xorg=/usr/libexec/Xorg +else + Xorg=/usr/libexec/Xorg.bin +fi +$Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config ./xorg.conf -configdir . :99 & +export DISPLAY=:99 +ctest %{_smp_mflags} -V || : +kill %1 || : +cat xorg.log %post -p /sbin/ldconfig @@ -399,9 +399,10 @@ cp -pr --parents Wrapping/*/README* _docs/ %postun qt-tcl -p /sbin/ldconfig -%files -f build/main.list +%files -f build/libs.list %doc Copyright.txt README.html vtkLogo.jpg vtkBanner.gif _docs/Wrapping %config(noreplace) %{_sysconfdir}/ld.so.conf.d/vtk-%{_arch}.conf +%{_bindir}/vtkEncodeString %{_datadir}/vtk %dir %{_libdir}/vtk @@ -414,7 +415,7 @@ cp -pr --parents Wrapping/*/README* _docs/ %{_libdir}/vtk/libvtkWrappingTools.a %{_libdir}/cmake/vtk/ %{_bindir}/vtkParseOGLExt -%{_docdir}/vtk-6.1/ +%{_docdir}/vtk-6.2/ %{tcl_sitelib}/vtk/vtktcl.c %files tcl @@ -454,12 +455,24 @@ cp -pr --parents Wrapping/*/README* _docs/ %files qt-tcl %{_libdir}/vtk/*QtTCL.so.* -%files testing +%files data +%{_datadir}/vtkdata + +%files testing -f build/testing.list %files examples -f build/examples.list %doc vtk-examples/Examples + %changelog +* Fri Feb 20 2015 Orion Poplawski - 6.2.0-0.1.rc1 +- Update to 6.2.0.rc1 +- Remove type, system, install, and netcdf patches applied upstream +- Integrate and replace vtkdata +- Build and run tests again +- Generate testing.list based on executable name +- Add needed vtk-*-devel requires to vtk-devel + * Wed Feb 04 2015 Petr Machata - 6.1.0-24 - Bump for rebuild.