From 92da3ef71478c83a54e46c850d5833c2c97f30a8b60099cdd7d924f5a037f358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Fri, 12 Aug 2016 19:48:48 +0000 Subject: [PATCH] Accepting request 418326 from home:badshah400:branches:science - Refresh vtk-Rinterface-uintptr_t.patch to fix further issues with uintptr_t redefinition by defining the HAVE_UINTPTR_T macro using cmake functions; removing the #include of stdint.h is not needed any more since we will not be using the defs from Rinterface.h anyway (boo#985386). Although this really causes a build failure for the i586 arch, where the redefinition of unitptr_t in Rinterface.h conflicts with the stdint.h defintion, the patch is applied generally because the redefinition is not needed in any case. Patch sent upstream. OBS-URL: https://build.opensuse.org/request/show/418326 OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=77 --- vtk-Rinterface-uintptr_t.patch | 41 +++++++++++++++++----------------- vtk.changes | 13 +++++++++++ vtk.spec | 4 ++-- 3 files changed, 36 insertions(+), 22 deletions(-) diff --git a/vtk-Rinterface-uintptr_t.patch b/vtk-Rinterface-uintptr_t.patch index c2aedfd..5c9c29e 100644 --- a/vtk-Rinterface-uintptr_t.patch +++ b/vtk-Rinterface-uintptr_t.patch @@ -1,25 +1,26 @@ -Index: VTK-7.0.0/Filters/StatisticsGnuR/vtkRInterface.cxx +Index: VTK-7.0.0/Filters/StatisticsGnuR/CMakeLists.txt =================================================================== ---- VTK-7.0.0.orig/Filters/StatisticsGnuR/vtkRInterface.cxx -+++ VTK-7.0.0/Filters/StatisticsGnuR/vtkRInterface.cxx -@@ -20,12 +20,15 @@ +--- VTK-7.0.0.orig/Filters/StatisticsGnuR/CMakeLists.txt ++++ VTK-7.0.0/Filters/StatisticsGnuR/CMakeLists.txt +@@ -16,6 +16,10 @@ include_directories(${R_INCLUDE_DIR}) - #include "vtkRInterface.h" + add_definitions(-DVTK_BUILDING_FILTERS_STATISTICSGNUR) -+// uintptr_t is already defined in recent versions of R which therefore causes a -+// clash when the same symbol is redefined in stddef.h ++# Check for the existance of uintptr_t type and set the HAVE_UINTPTR_T macro ++include(CheckTypeSize) ++CHECK_TYPE_SIZE(uintptr_t UINTPTR_T) + - // for uintptr_t --#ifdef _MSC_VER --#include --#else --#include --#endif -+// #ifdef _MSC_VER -+// #include -+// #else -+// #include -+// #endif + # Configure the module specific settings into a module configured header. + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkFiltersStatisticsGnuRConfigure.h.in + ${CMAKE_CURRENT_BINARY_DIR}/vtkFiltersStatisticsGnuRConfigure.h) +Index: VTK-7.0.0/Filters/StatisticsGnuR/vtkFiltersStatisticsGnuRConfigure.h.in +=================================================================== +--- VTK-7.0.0.orig/Filters/StatisticsGnuR/vtkFiltersStatisticsGnuRConfigure.h.in ++++ VTK-7.0.0/Filters/StatisticsGnuR/vtkFiltersStatisticsGnuRConfigure.h.in +@@ -17,5 +17,6 @@ + #define vtkFiltersStatisticsGnuRConfigure_h - #include "vtkInformation.h" - #include "vtkInformationVector.h" + #define VTK_R_HOME "@R_HOME@" ++#cmakedefine HAVE_UINTPTR_T + + #endif diff --git a/vtk.changes b/vtk.changes index a80cd25..5d4fc54 100644 --- a/vtk.changes +++ b/vtk.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Aug 10 00:56:56 UTC 2016 - badshah400@gmail.com + +- Refresh vtk-Rinterface-uintptr_t.patch to fix further issues + with uintptr_t redefinition by defining the HAVE_UINTPTR_T + macro using cmake functions; removing the #include of stdint.h + is not needed any more since we will not be using the defs from + Rinterface.h anyway (boo#985386). Although this really causes a + build failure for the i586 arch, where the redefinition of + unitptr_t in Rinterface.h conflicts with the stdint.h defintion, + the patch is applied generally because the redefinition is not + needed in any case. Patch sent upstream. + ------------------------------------------------------------------- Wed Apr 13 11:32:12 UTC 2016 - badshah400@gmail.com diff --git a/vtk.spec b/vtk.spec index c936122..890e3c5 100644 --- a/vtk.spec +++ b/vtk.spec @@ -32,7 +32,7 @@ Source: http://www.vtk.org/files/release/%{series}/VTK-%{version}.tar.gz Source1: vtk-rpmlintrc # PATCH-FIX-UPSTREAM vtk-fix-file-contains-date-time.patch badshah400@gmail.com -- Fix file containing DATE and TIME Patch1: vtk-fix-file-contains-date-time.patch -# PATCH-FIX-UPSTREAM vtk-Rinterface-uintptr_t.patch badshah400@gmail.com -- Only use uintptr_t definition from R headers; no longer include stdint.h +# PATCH-FIX-UPSTREAM vtk-Rinterface-uintptr_t.patch boo#985386 badshah400@gmail.com -- Fix issues with uintptr_t redefinition by defining the HAVE_UINTPTR_T macro using cmake functions to avoid redefinition of uintptr_t, which is already defined in stdint.h called earlier; patch sent upstream Patch2: vtk-Rinterface-uintptr_t.patch # PATCH-FIX-UPSTREAM vtk-gcc6.patch dmueller@suse.com -- Fix compilation with GCC >= 6.0 Patch3: vtk-gcc6.patch @@ -320,7 +320,7 @@ cmake .. \ -DVTK_Group_Views:BOOL=ON \ -DModule_vtkFiltersStatisticsGnuR:BOOL=ON \ -DVTK_WRAP_TCL:BOOL=ON \ - -DVTK_USE_SYSTEM_HDF5:BOOL=ON \ + -DVTK_USE_SYSTEM_HDF5:BOOL=ON \ -DVTK_USE_SYSTEM_NETCDF:BOOL=ON \ -DVTK_PYTHON_VERSION=3 \ -DCMAKE_NO_BUILTIN_CHRPATH:BOOL=ON