From 1d22659f6db551649b97a5cdb9680c5349cdef5e Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Tue, 3 Feb 2015 17:03:55 -0700 Subject: [PATCH] Add patch to fix tcl library loading Conflicts: vtk.spec --- vtk-tcllib.patch | 37 +++++++++++++++++++++++++++++++++++++ vtk.spec | 5 +++++ 2 files changed, 42 insertions(+) create mode 100644 vtk-tcllib.patch diff --git a/vtk-tcllib.patch b/vtk-tcllib.patch new file mode 100644 index 0000000..a56bce1 --- /dev/null +++ b/vtk-tcllib.patch @@ -0,0 +1,37 @@ +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() + # 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) + 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 +@@ -7,7 +7,7 @@ package ifneeded vtkinit {@VTK_MAJOR_VER + if {[catch "load {} $libName"]} { + set libExt [info sharedlibextension] + set currentDirectory [pwd] +- set libFile [file join $libPath "$libPrefix$libName-@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@$libExt"] ++ set libFile [file join $libPath "$libPrefix$libName$libExt"] + 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 +@@ -44,7 +44,7 @@ namespace eval ::vtk { + } + + foreach dir $dirs { +- set libname [file join $dir ${prefix}${name}-@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@${ext}] ++ set libname [file join $dir ${prefix}${name}${ext}] + if {[file exists $libname]} { + if {![catch {load $libname} errormsg]} { + # WARNING: it HAS to be "" so that pkg_mkIndex work (since diff --git a/vtk.spec b/vtk.spec index f6b74f0..e75f746 100644 --- a/vtk.spec +++ b/vtk.spec @@ -30,6 +30,9 @@ 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 URL: http://vtk.org/ @@ -185,6 +188,7 @@ programming languages. %patch2 -p1 -b .netcdf %patch3 -p1 -b .glext %patch4 -p1 -b .type +%patch5 -p1 -b .tcllib # Remove included thirdparty sources just to be sure # TODO - vtksqlite for x in autobahn vtkexpat vtkfreetype vtkgl2ps vtkhdf5 vtkjpeg vtklibxml2 vtknetcdf vtkoggtheora vtkpng vtktiff twisted vtkzlib zope @@ -464,6 +468,7 @@ cp -pr --parents Wrapping/*/README* _docs/ %changelog * Sun Dec 13 2015 Orion Poplawski - 6.1.0-5 - Add patch to fix compilation with mesa 10.4 (bug #1291099) +- Add patch to fix tcl library loading - Add jsoncpp-devel and python2-devel to vtk-devel Requires (bug #1183210) - Add patch to fix compilation error - Don't override Java memory settings on s390 (related to bug #1115920)