Compare commits

...

2 Commits
master ... f21

Author SHA1 Message Date
Orion Poplawski d5a315950c Add patch to fix VTK_INSTALL_PREFIX (bug #1228881) 2015-07-13 15:06:40 -06:00
Orion Poplawski dd1470d003 Add requires netcdf-cxx-devel to vtk-devel (bug #1224512)
Add needed vtk-*-devel requires to vtk-devel (bug #1199310)
2015-06-25 11:13:07 -06:00
2 changed files with 43 additions and 9 deletions

32
vtk-install-prefix.patch Normal file
View File

@ -0,0 +1,32 @@
diff -up VTK-6.1.0/CMake/vtkModuleTop.cmake.install-prefix VTK-6.1.0/CMake/vtkModuleTop.cmake
--- VTK-6.1.0/CMake/vtkModuleTop.cmake.install-prefix 2015-07-13 15:00:52.538379740 -0600
+++ VTK-6.1.0/CMake/vtkModuleTop.cmake 2015-07-13 15:03:30.197677726 -0600
@@ -304,14 +304,26 @@ configure_file(CMake/VTKConfig.cmake.in
# Generate VTKConfig.cmake for the install tree.
set(VTK_CONFIG_CODE "
# Compute the installation prefix from this VTKConfig.cmake file location.
-get_filename_component(VTK_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)")
+set(_vtk_installed_prefix \"${CMAKE_INSTALL_PREFIX}/${VTK_INSTALL_PACKAGE_DIR}\")
+set(_vtk_requested_prefix \"\${CMAKE_CURRENT_LIST_DIR}\")
+get_filename_component(_vtk_installed_prefix_full \"\${_vtk_installed_prefix}\" REALPATH)
+get_filename_component(_vtk_requested_prefix_full \"\${_vtk_requested_prefix}\" REALPATH)
+if (_vtk_installed_prefix_full STREQUAL _vtk_requested_prefix_full)
+ set(VTK_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\")
+else ()
+ set(VTK_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}\")")
+
# Construct the proper number of get_filename_component(... PATH)
# calls to compute the installation prefix.
string(REGEX REPLACE "/" ";" _count "${VTK_INSTALL_PACKAGE_DIR}")
foreach(p ${_count})
set(VTK_CONFIG_CODE "${VTK_CONFIG_CODE}
-get_filename_component(VTK_INSTALL_PREFIX \"\${VTK_INSTALL_PREFIX}\" PATH)")
+ get_filename_component(VTK_INSTALL_PREFIX \"\${VTK_INSTALL_PREFIX}\" PATH)")
endforeach(p)
+
+set(VTK_CONFIG_CODE "${VTK_CONFIG_CODE}
+endif ()")
+
set(VTK_CONFIG_CODE "${VTK_CONFIG_CODE}
set(VTK_MODULES_DIR \"\${VTK_INSTALL_PREFIX}/${VTK_INSTALL_PACKAGE_DIR}/Modules\")")
set(VTK_CONFIG_CMAKE_DIR "\${VTK_INSTALL_PREFIX}/${VTK_INSTALL_PACKAGE_DIR}")

View File

@ -9,7 +9,7 @@
Summary: The Visualization Toolkit - A high level 3D visualization library
Name: vtk
Version: 6.1.0
Release: 26%{?dist}
Release: 25%{?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
@ -33,7 +33,9 @@ Patch4: vtk-type.patch
# Fix tcl library loading
# http://www.vtk.org/Bug/view.php?id=15279
Patch5: vtk-tcllib.patch
# Fix VTK_INSTALL_PREFIX - backport from upstream
# https://bugzilla.redhat.com/show_bug.cgi?id=1228881
Patch6: vtk-install-prefix.patch
URL: http://vtk.org/
BuildRequires: cmake
@ -105,6 +107,7 @@ Requires: libtiff-devel%{?_isa}
Requires: libxml2-devel%{?_isa}
Requires: postgresql-devel%{?_isa}
Requires: mysql-devel%{?_isa}
Requires: netcdf-cxx-devel%{?_isa}
Requires: qt4-devel%{?_isa}
Requires: qtwebkit-devel%{?_isa}
Requires: jsoncpp-devel%{?_isa}
@ -193,6 +196,7 @@ programming languages.
%patch3 -p1 -b .glext
%patch4 -p1 -b .type
%patch5 -p1 -b .tcllib
%patch6 -p1 -b .install-prefix
# 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,15 +468,13 @@ cp -pr --parents Wrapping/*/README* _docs/
%doc vtk-examples/Examples
%changelog
* Thu Mar 05 2015 Orion Poplawski <orion@cora.nwra.com> - 6.1.0-26
* Mon Jul 13 2015 Orion Poplawski <orion@cora.nwra.com> - 6.1.0-25
- Add patch to fix VTK_INSTALL_PREFIX (bug #1228881)
* Thu Jun 25 2015 Orion Poplawski <orion@cora.nwra.com> - 6.1.0-24
- Add requires netcdf-cxx-devel to vtk-devel (bug #1224512)
- Add needed vtk-*-devel requires to vtk-devel (bug #1199310)
* Wed Mar 04 2015 Orion Poplawski <orion@cora.nwra.com> - 6.1.0-25
- Rebuild for jsoncpp
* Wed Feb 04 2015 Petr Machata <pmachata@redhat.com> - 6.1.0-24
- Bump for rebuild.
* Tue Feb 3 2015 Orion Poplawski <orion@cora.nwra.com> - 6.1.0-23
- Add patch to fix tcl library loading