From c4110122e3753bb237959c254bb3cb61f67a09f8 Mon Sep 17 00:00:00 2001 From: Björn Esser Date: Oct 21 2016 20:50:37 +0000 Subject: Revert "Update libjsoncpp_so_11.patch" Needs to be updated (or possibly dropped) with next RC / release --- diff --git a/paraview-5.2.0-libjsoncpp_so_11.patch b/paraview-5.2.0-libjsoncpp_so_11.patch index 3ff6aa4..826adeb 100644 --- a/paraview-5.2.0-libjsoncpp_so_11.patch +++ b/paraview-5.2.0-libjsoncpp_so_11.patch @@ -1,64 +1,66 @@ -From 83e6a93e40cd224a10a66ec725b5f7a29be6de8f Mon Sep 17 00:00:00 2001 +From f29938437db227528e28998d4154aa1f43ae7e26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Tue, 18 Oct 2016 12:16:58 +0200 Subject: [PATCH] Fix build with JSONcpp >= 1.7.7, specialized template (#16938) --- - ParaViewCore/ServerManager/Core/vtkSMSettings.cxx | 40 +++++++++++++++++++++++ - 1 file changed, 40 insertions(+) + ParaViewCore/ServerManager/Core/vtkSMSettings.cxx | 42 +++++++++++++++++++++++ + 1 file changed, 42 insertions(+) diff --git a/ParaViewCore/ServerManager/Core/vtkSMSettings.cxx b/ParaViewCore/ServerManager/Core/vtkSMSettings.cxx -index 1684e40..ca86118 100644 +index 49a0b22..aa17fa6 100644 --- a/ParaViewCore/ServerManager/Core/vtkSMSettings.cxx +++ b/ParaViewCore/ServerManager/Core/vtkSMSettings.cxx -@@ -1410,6 +1410,46 @@ Json::Value vtkConvertXMLElementToJSON( - return value; +@@ -1465,6 +1465,48 @@ Json::Value vtkConvertXMLElementToJSON( + ; } +// We need a specialized template for `vtkIdType`, if compiling +// with `VTK_USE_64BIT_IDS=ON`, because JSONcpp >= 1.7.7 switched -+// from at-least width (long long int) to fixed width (Int64) ++// from at-least width (long long int) to fixed width (int64_t) +// integers. If compiling with `VTK_USE_64BIT_IDS=OFF` this is -+// not needed, because `vtkIdType` represents plain (Int32) -+// integers in this case. ++// not needed, because vtkIdType represents a plain integer in ++// this case. +// +// See: https://gitlab.kitware.com/paraview/paraview/issues/16938 +#ifdef VTK_USE_64BIT_IDS +template <> +Json::Value vtkConvertXMLElementToJSON ( -+ vtkSMVectorProperty* vp, const std::vector >& elements) ++ vtkSMVectorProperty* vp, ++ const std::vector >& elements) +{ + // Since we need to handle enumeration domain :/. -+ vtkSMEnumerationDomain* enumDomain = -+ vtkSMEnumerationDomain::SafeDownCast(vp->FindDomain("vtkSMEnumerationDomain")); ++ vtkSMEnumerationDomain* enumDomain = vtkSMEnumerationDomain::SafeDownCast( ++ vp->FindDomain("vtkSMEnumerationDomain")); + Json::Value value(Json::arrayValue); -+ for (size_t cc = 0; cc < elements.size(); ++cc) -+ { ++ for (size_t cc=0; cc < elements.size(); ++cc) ++ { + vtkIdType xmlValue; + elements[cc]->GetScalarAttribute("value", &xmlValue); -+ const char* txt = enumDomain ? enumDomain->GetEntryTextForValue(xmlValue) : NULL; ++ const char* txt = enumDomain? enumDomain->GetEntryTextForValue(xmlValue) : NULL; + if (txt) -+ { ++ { + value[static_cast(cc)] = Json::Value(txt); -+ } ++ } + else -+ { -+ // We need to cast from `vtkIdType` to `Int64`-type explicitly. -+ value[static_cast(cc)] = Json::Value(static_cast(xmlValue)); ++ { ++ // We need to cast from `vtkIdType` to `int64_t` explicitly. ++ value[static_cast(cc)] = Json::Value(static_cast(xmlValue)); ++ } + } -+ } -+ if (vp->GetNumberOfElements() == 1 && vp->GetRepeatCommand() == 0 && value.size() == 1) -+ { ++ if (vp->GetNumberOfElements()==1 && vp->GetRepeatCommand()==0 && value.size()==1) ++ { + return value[0]; -+ } -+ return value; ++ } ++ return value ++ ; +} +#endif // VTK_USE_64BIT_IDS + template <> Json::Value vtkConvertXMLElementToJSON( - vtkSMVectorProperty* vp, const std::vector >& elements) + vtkSMVectorProperty* vp, -- 2.7.4 diff --git a/paraview.spec b/paraview.spec index 545af23..5602b7f 100644 --- a/paraview.spec +++ b/paraview.spec @@ -587,7 +587,6 @@ update-mime-database \ %changelog * Fri Oct 21 2016 Björn Esser - 5.2.0-0.6.RC2 - Add needed (Build)Requires -- Update libjsoncpp_so_11.patch - Remove cluttering files from %%{_pkgdocdir} * Wed Oct 19 2016 Björn Esser - 5.2.0-0.5.RC2