From 871fcc573681e3ba421b2f4b33d518795aaba02e Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 8 Feb 2016 20:26:21 -0700 Subject: [PATCH] Add patch for gcc 6 support --- vtk-gcc6.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++ vtk.spec | 8 +++++++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 vtk-gcc6.patch diff --git a/vtk-gcc6.patch b/vtk-gcc6.patch new file mode 100644 index 0000000..e7f6ce6 --- /dev/null +++ b/vtk-gcc6.patch @@ -0,0 +1,44 @@ +diff --git a/CMake/GenerateExportHeader.cmake b/CMake/GenerateExportHeader.cmake +index ecfae31..80244df 100644 +--- a/CMake/GenerateExportHeader.cmake ++++ b/CMake/GenerateExportHeader.cmake +@@ -163,10 +163,10 @@ endmacro() + macro(_test_compiler_hidden_visibility) + + if(CMAKE_COMPILER_IS_GNUCXX) +- execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version ++ execute_process(COMMAND ${CMAKE_C_COMPILER} --version + OUTPUT_VARIABLE _gcc_version_info + ERROR_VARIABLE _gcc_version_info) +- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*" ++ string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" + _gcc_version "${_gcc_version_info}") + # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the + # patch level, handle this here: +@@ -181,7 +181,7 @@ macro(_test_compiler_hidden_visibility) + endif() + + if(CMAKE_CXX_COMPILER_ID MATCHES "Intel") +- execute_process(COMMAND ${CMAKE_CXX_COMPILER} ARGS -V ++ execute_process(COMMAND ${CMAKE_CXX_COMPILER} -V + OUTPUT_VARIABLE _intel_version_info + ERROR_VARIABLE _intel_version_info) + string(REGEX REPLACE ".*Version ([0-9]+(\\.[0-9]+)+).*" "\\1" +diff --git a/CMake/vtkCompilerExtras.cmake b/CMake/vtkCompilerExtras.cmake +index e39bd30..4dc928a 100644 +--- a/CMake/vtkCompilerExtras.cmake ++++ b/CMake/vtkCompilerExtras.cmake +@@ -28,11 +28,11 @@ if(CMAKE_COMPILER_IS_GNUCXX) + endif() + + # Now check if we can use visibility to selectively export symbols +- execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version ++ execute_process(COMMAND ${CMAKE_C_COMPILER} --version + OUTPUT_VARIABLE _gcc_version_info + ERROR_VARIABLE _gcc_version_info) + +- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*" ++ string (REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" + _gcc_version "${_gcc_version_info}") + if(NOT _gcc_version) + string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0" diff --git a/vtk.spec b/vtk.spec index ce1f512..7d98a0c 100644 --- a/vtk.spec +++ b/vtk.spec @@ -9,7 +9,7 @@ Summary: The Visualization Toolkit - A high level 3D visualization library Name: vtk Version: 6.3.0 -Release: 5%{?dist} +Release: 6%{?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 @@ -17,6 +17,8 @@ License: BSD Source0: http://www.vtk.org/files/release/6.3/VTK-%{version}.tar.gz Source1: http://www.vtk.org/files/release/6.3/VTKData-%{version}.tar.gz Source2: xorg.conf +# https://gitlab.kitware.com/vtk/vtk/merge_requests/1156 +Patch0: vtk-gcc6.patch # Fix tcl library loading # http://www.vtk.org/Bug/view.php?id=15279 Patch5: vtk-tcllib.patch @@ -204,6 +206,7 @@ programming languages. %prep %setup -q -b 1 -n VTK-%{version} +%patch0 -p1 -b .gcc6 %patch5 -p1 -b .tcllib # Remove included thirdparty sources just to be sure # TODO - alglib - http://www.vtk.org/Bug/view.php?id=15729 @@ -496,6 +499,9 @@ cat xorg.log %changelog +* Mon Feb 8 2016 Orion Poplawski - 6.3.0-6 +- Add patch for gcc 6 support + * Fri Feb 05 2016 Fedora Release Engineering - 6.3.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild