From ebc9c268d3413c7914898f35fe662da37af7bae2 Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Thu, 1 Aug 2013 12:39:28 +0200 Subject: [PATCH] Patch for Paraview: BUG #13101. STL ascii reader was report failures prematurely. --- .../rpmBuild/SOURCES/ParaView-3.14.1.patch_2 | 41 +++++++++++++++++++ .../rpmBuild/SPECS/ParaView-3.14.1.spec | 8 +++- 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 ThirdParty/rpmBuild/SOURCES/ParaView-3.14.1.patch_2 diff --git a/ThirdParty/rpmBuild/SOURCES/ParaView-3.14.1.patch_2 b/ThirdParty/rpmBuild/SOURCES/ParaView-3.14.1.patch_2 new file mode 100644 index 000000000..e47ee6e17 --- /dev/null +++ b/ThirdParty/rpmBuild/SOURCES/ParaView-3.14.1.patch_2 @@ -0,0 +1,41 @@ +From 1d6745888bcc34b260410a3cdbba49ecf0084ba2 Mon Sep 17 00:00:00 2001 +From: Utkarsh Ayachit +Date: Tue, 17 Apr 2012 14:54:05 -0400 +Subject: [PATCH] BUG #13101. STL ascii reader was report failures prematurely. + +STL ascii reader was reporting error when eof was reached at an expected +location. This was causing the reader to fail for the STL file attached with the +bug report. + +Change-Id: I734d2c8d8c85854df3d2a63bae6ba23bccf7a9c2 +--- + IO/vtkSTLReader.cxx | 13 ++++++++----- + 1 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/IO/vtkSTLReader.cxx b/IO/vtkSTLReader.cxx +index 189ea1b..34ee3e0 100644 +--- a/VTK/IO/vtkSTLReader.cxx ++++ b/VTK/IO/vtkSTLReader.cxx +@@ -442,12 +442,15 @@ int vtkSTLReader::ReadASCIISTL(FILE *fp, vtkPoints *newPts, + { + if (!fgets(line, 255, fp)) + { +- vtkErrorMacro ("STLReader error reading file: " << this->FileName +- << " Premature EOF while reading end solid."); +- fclose(fp); +- return 0; ++ done = feof(fp); ++ if (!done) ++ { ++ vtkErrorMacro ("STLReader error reading file: " << this->FileName ++ << " Premature EOF while reading end solid."); ++ fclose(fp); ++ return 0; ++ } + } +- + done = feof(fp); + } + +-- +1.7.4.1 diff --git a/ThirdParty/rpmBuild/SPECS/ParaView-3.14.1.spec b/ThirdParty/rpmBuild/SPECS/ParaView-3.14.1.spec index 34d58d329..00b5f52f7 100644 --- a/ThirdParty/rpmBuild/SPECS/ParaView-3.14.1.spec +++ b/ThirdParty/rpmBuild/SPECS/ParaView-3.14.1.spec @@ -79,7 +79,8 @@ Prefix: %{_prefix} Group: Development/Tools Patch0: ParaView-3.14.1.patch_0_ParaView.git_0f43430 Patch1: ParaView-3.14.1.patch_1 -Patch2: ParaView-3.14.1.patch_darwin +Patch2: ParaView-3.14.1.patch_2 +Patch3: ParaView-3.14.1.patch_darwin %define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS} @@ -114,9 +115,12 @@ Patch2: ParaView-3.14.1.patch_darwin # Correction to BUG #13065. %patch1 -p1 +# Correction to BUG #13101. +%patch2 -p1 + %ifos darwin # Patch for proper install of paraview binary under Mac OS X -%patch2 -p1 +%patch3 -p1 %endif %build