summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Zander <negril.nx+gentoo@gmail.com>2024-09-07 17:25:20 +0200
committerSam James <sam@gentoo.org>2024-09-08 14:50:24 +0100
commitb5b0280e7b92008879c644166456c9895b0dc123 (patch)
treee4c72b0c93498daf0ca428accb49fd98e84c2965 /sci-libs
parentsci-libs/vtk: fix build with GCC 15 (diff)
downloadgentoo-b5b0280e7b92008879c644166456c9895b0dc123.tar.gz
gentoo-b5b0280e7b92008879c644166456c9895b0dc123.tar.bz2
gentoo-b5b0280e7b92008879c644166456c9895b0dc123.zip
sci-libs/vtk: revbump to backport expat fix from 9.3.1
The underlaying issue is only present in IOXMLParser which we uncondionally build but is only required by paraview. Which bundles it's own vtk. https://gitlab.kitware.com/vtk/vtk/-/issues/19258 https://discourse.paraview.org/t/i-cannot-read-a-vtp-file-i-could-open-yesterday-can-someone-try-to-open-it/13938/4 Closes: https://bugs.gentoo.org/930032 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/vtk/files/vtk-9.3.0-r1-expat-2.6.0.patch72
-rw-r--r--sci-libs/vtk/vtk-9.3.0-r3.ebuild (renamed from sci-libs/vtk/vtk-9.3.0-r2.ebuild)1
2 files changed, 73 insertions, 0 deletions
diff --git a/sci-libs/vtk/files/vtk-9.3.0-r1-expat-2.6.0.patch b/sci-libs/vtk/files/vtk-9.3.0-r1-expat-2.6.0.patch
new file mode 100644
index 000000000000..ac519f98aa63
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.3.0-r1-expat-2.6.0.patch
@@ -0,0 +1,72 @@
+From 3efa07ad277efe5c1d11a2ef2b907c095f68bbef Mon Sep 17 00:00:00 2001
+From: Ben Boeckel <ben.boeckel@kitware.com>
+Date: Mon, 15 Apr 2024 22:22:22 -0400
+Subject: [PATCH] vtkXMLDataParser: track `AppendedData` state explicitly
+
+Newer `libexpat` doesn't like being given the appended data after the
+artificially ended document anymore. Avoid pushing it through to its
+parser.
+
+(cherry picked from commit db8f9efca220c9d16a30958e179abae3379d0011)
+
+Fixes: #19258
+---
+ IO/XMLParser/vtkXMLDataParser.cxx | 6 +++++-
+ IO/XMLParser/vtkXMLDataParser.h | 3 +++
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/IO/XMLParser/vtkXMLDataParser.cxx b/IO/XMLParser/vtkXMLDataParser.cxx
+index 1f6006d37c2..7d38092fdd7 100644
+--- a/IO/XMLParser/vtkXMLDataParser.cxx
++++ b/IO/XMLParser/vtkXMLDataParser.cxx
+@@ -36,6 +36,7 @@ vtkXMLDataParser::vtkXMLDataParser()
+ this->RootElement = nullptr;
+ this->AppendedDataPosition = 0;
+ this->AppendedDataMatched = 0;
++ this->AppendedDataFound = false;
+ this->DataStream = nullptr;
+ this->InlineDataStream = vtkBase64InputStream::New();
+ this->AppendedDataStream = vtkBase64InputStream::New();
+@@ -88,6 +89,7 @@ void vtkXMLDataParser::PrintSelf(ostream& os, vtkIndent indent)
+ {
+ this->Superclass::PrintSelf(os, indent);
+ os << indent << "AppendedDataPosition: " << this->AppendedDataPosition << "\n";
++ os << indent << "AppendedDataFound: " << this->AppendedDataFound << "\n";
+ if (this->RootElement)
+ {
+ this->RootElement->PrintXML(os, indent);
+@@ -214,7 +216,7 @@ int vtkXMLDataParser::ParsingComplete()
+ // If we have reached the appended data section, we stop parsing.
+ // This prevents the XML parser from having to walk over the entire
+ // appended data section.
+- if (this->AppendedDataPosition)
++ if (this->AppendedDataPosition || this->AppendedDataFound)
+ {
+ return 1;
+ }
+@@ -433,6 +435,8 @@ int vtkXMLDataParser::ParseBuffer(const char* buffer, unsigned int count)
+ {
+ return 0;
+ }
++
++ this->AppendedDataFound = true;
+ }
+
+ return 1;
+diff --git a/IO/XMLParser/vtkXMLDataParser.h b/IO/XMLParser/vtkXMLDataParser.h
+index 1504a4d400b..142bf28327d 100644
+--- a/IO/XMLParser/vtkXMLDataParser.h
++++ b/IO/XMLParser/vtkXMLDataParser.h
+@@ -204,6 +204,9 @@ protected:
+ // How much of the string "<AppendedData" has been matched in input.
+ int AppendedDataMatched;
+
++ // Whether AppendedData has been dealt with or not.
++ bool AppendedDataFound;
++
+ // The byte order of the binary input.
+ int ByteOrder;
+
+--
+GitLab
+
diff --git a/sci-libs/vtk/vtk-9.3.0-r2.ebuild b/sci-libs/vtk/vtk-9.3.0-r3.ebuild
index fa67ba0e190f..3a522724f066 100644
--- a/sci-libs/vtk/vtk-9.3.0-r2.ebuild
+++ b/sci-libs/vtk/vtk-9.3.0-r3.ebuild
@@ -167,6 +167,7 @@ PATCHES=(
"${FILESDIR}/${PN}-9.3.0-ThrustPatches.patch"
"${FILESDIR}/${PN}-9.3.0-core-octree_node.txx.patch"
"${FILESDIR}/${PN}-9.3.0-ThirdParty-gcc15.patch"
+ "${FILESDIR}/${PN}-9.3.0-r1-expat-2.6.0.patch"
)
DOCS=( CONTRIBUTING.md README.md )