From 44c4d02573ddd76a156bfb234080c445733ffe56 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Tue, 3 Mar 2015 22:29:16 -0700 Subject: [PATCH] Update to 6.2.0.rc1 --- vtk-6.1.0-netcdf.patch | 29 ----------------- vtk-6.1.0-system.patch | 27 ---------------- vtk-install.patch | 19 ----------- vtk-tcllib.patch | 23 +++++++------ vtk-type.patch | 23 ------------- vtk-vtkpython.patch | 12 ------- vtk.spec | 73 ++++++++++++++++++++++++------------------ 7 files changed, 52 insertions(+), 154 deletions(-) delete mode 100644 vtk-6.1.0-netcdf.patch delete mode 100644 vtk-6.1.0-system.patch delete mode 100644 vtk-install.patch delete mode 100644 vtk-type.patch delete mode 100644 vtk-vtkpython.patch 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..a307c10 100644 --- a/vtk.spec +++ b/vtk.spec @@ -8,28 +8,19 @@ 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 +60,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} @@ -162,9 +155,17 @@ 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} +Requires: vtk%{?_isa} = %{version}-%{release}, vtk-data = %{version} Group: Applications/Engineering %description testing @@ -172,7 +173,7 @@ Testing programs for VTK %package examples Summary: Examples for VTK -Requires: vtk%{?_isa} = %{version}-%{release}, vtkdata = %{version} +Requires: vtk%{?_isa} = %{version}-%{release}, vtk-data = %{version} Group: Applications/Engineering %description examples @@ -182,12 +183,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 +193,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 +217,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 \ @@ -284,7 +276,6 @@ 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} @@ -358,15 +349,29 @@ 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 +cp -al .ExternalData %{buildroot}%{_datadir}/vtk/ + %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 :99 & +export DISPLAY=:99 +ctest %{_smp_mflags} -V || : +kill %1 || : +cat xorg.log %post -p /sbin/ldconfig @@ -403,6 +408,7 @@ cp -pr --parents Wrapping/*/README* _docs/ %doc Copyright.txt README.html vtkLogo.jpg vtkBanner.gif _docs/Wrapping %config(noreplace) %{_sysconfdir}/ld.so.conf.d/vtk-%{_arch}.conf %{_datadir}/vtk +%exclude %{_datadir}/vtk/.ExternalData %dir %{_libdir}/vtk %files devel @@ -414,7 +420,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,6 +460,9 @@ cp -pr --parents Wrapping/*/README* _docs/ %files qt-tcl %{_libdir}/vtk/*QtTCL.so.* +%files data +%{_datadir}/vtk/.ExternalData + %files testing %files examples -f build/examples.list