1 |
commit: 2e02cfbf0edd45b41747e2707fc56b7512c6aef6 |
2 |
Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net> |
3 |
AuthorDate: Tue Aug 23 16:54:15 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 1 02:23:53 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e02cfbf |
7 |
|
8 |
sci-libs/vtk: build with LTO enabled |
9 |
|
10 |
Closes: https://bugs.gentoo.org/863038 |
11 |
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/27010 |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
...-or-scope-struct-names-to-avoid-conflicts.patch | 126 +++++++++++++++++++++ |
16 |
sci-libs/vtk/vtk-9.1.0-r2.ebuild | 1 + |
17 |
2 files changed, 127 insertions(+) |
18 |
|
19 |
diff --git a/sci-libs/vtk/files/vtk-9.1.0-Change-or-scope-struct-names-to-avoid-conflicts.patch b/sci-libs/vtk/files/vtk-9.1.0-Change-or-scope-struct-names-to-avoid-conflicts.patch |
20 |
new file mode 100644 |
21 |
index 000000000000..e06c786db9ab |
22 |
--- /dev/null |
23 |
+++ b/sci-libs/vtk/files/vtk-9.1.0-Change-or-scope-struct-names-to-avoid-conflicts.patch |
24 |
@@ -0,0 +1,126 @@ |
25 |
+From https://gitlab.kitware.com/vtk/vtk/-/commit/0322b938968eebee585ad7efb93bbdade7106355 |
26 |
+From: Aron Helser <aron.helser@×××××××.com> |
27 |
+Date: Mon, 15 Aug 2022 10:06:13 -0400 |
28 |
+Subject: [PATCH 16/30] Change or scope struct names to avoid conflicts. |
29 |
+ |
30 |
+(cherry picked from commit b79eb46bf5a4277cafc1ed2bd47fd3ffc28a5b3f) |
31 |
+--- a/IO/AMR/vtkAMRFlashReader.cxx |
32 |
++++ b/IO/AMR/vtkAMRFlashReader.cxx |
33 |
+@@ -153,7 +153,7 @@ void vtkAMRFlashReader::ComputeStats( |
34 |
+ |
35 |
+ for (int i = 0; i < internal->NumberOfBlocks; ++i) |
36 |
+ { |
37 |
+- Block& theBlock = internal->Blocks[i]; |
38 |
++ FlashReaderBlock& theBlock = internal->Blocks[i]; |
39 |
+ double* gridMin = theBlock.MinBounds; |
40 |
+ if (gridMin[0] < min[0]) |
41 |
+ { |
42 |
+@@ -193,7 +193,7 @@ int vtkAMRFlashReader::FillMetaData() |
43 |
+ |
44 |
+ for (int i = 0; i < this->Internal->NumberOfBlocks; ++i) |
45 |
+ { |
46 |
+- Block& theBlock = this->Internal->Blocks[i]; |
47 |
++ FlashReaderBlock& theBlock = this->Internal->Blocks[i]; |
48 |
+ |
49 |
+ // Start numbering levels from 0! |
50 |
+ int level = this->Internal->Blocks[i].Level - 1; |
51 |
+--- a/IO/AMR/vtkAMRFlashReaderInternal.cxx |
52 |
++++ b/IO/AMR/vtkAMRFlashReaderInternal.cxx |
53 |
+@@ -692,7 +692,7 @@ void vtkFlashReaderInternal::GetBlockMinMaxGlobalDivisionIds() |
54 |
+ |
55 |
+ for (int b = 0; b < this->NumberOfBlocks; b++) |
56 |
+ { |
57 |
+- Block& B = this->Blocks[b]; |
58 |
++ FlashReaderBlock& B = this->Blocks[b]; |
59 |
+ |
60 |
+ for (int d = 0; d < 3; d++) |
61 |
+ { |
62 |
+--- a/IO/AMR/vtkAMRFlashReaderInternal.h |
63 |
++++ b/IO/AMR/vtkAMRFlashReaderInternal.h |
64 |
+@@ -74,7 +74,7 @@ typedef struct tagFlashReaderSimulationParameters |
65 |
+ double RedShift; |
66 |
+ } FlashReaderSimulationParameters; |
67 |
+ |
68 |
+-typedef struct tagBlock |
69 |
++typedef struct tagFlashReaderBlock |
70 |
+ { |
71 |
+ int Index; // Id of the block |
72 |
+ int Level; // LOD level |
73 |
+@@ -88,7 +88,7 @@ typedef struct tagBlock |
74 |
+ double Center[3]; // center of the block |
75 |
+ double MinBounds[3]; // lower left of the bounding box |
76 |
+ double MaxBounds[3]; // upper right of the bounding box |
77 |
+-} Block; |
78 |
++} FlashReaderBlock; |
79 |
+ |
80 |
+ typedef struct tagFlashReaderSimulationInformation |
81 |
+ { |
82 |
+@@ -152,7 +152,7 @@ public: |
83 |
+ FlashReaderSimulationInformation SimulationInformation; // CFD simulation |
84 |
+ |
85 |
+ // blocks |
86 |
+- std::vector<Block> Blocks; |
87 |
++ std::vector<FlashReaderBlock> Blocks; |
88 |
+ std::vector<int> LeafBlocks; |
89 |
+ std::vector<std::string> AttributeNames; |
90 |
+ |
91 |
+--- a/IO/AMR/vtkAMRVelodyneReader.cxx |
92 |
++++ b/IO/AMR/vtkAMRVelodyneReader.cxx |
93 |
+@@ -219,7 +219,7 @@ int vtkAMRVelodyneReader::FillMetaData() |
94 |
+ double spacing[3]; |
95 |
+ for (int i = 0; i < this->Internal->nBlocks; i++) |
96 |
+ { |
97 |
+- Block& theBlock = this->Internal->Blocks[i]; |
98 |
++ vtkAMRVelodyneReaderInternal::Block& theBlock = this->Internal->Blocks[i]; |
99 |
+ int level = theBlock.Level; |
100 |
+ int id = theBlock.Index; |
101 |
+ CalculateBlockDims(this->Internal->blockDims.data(), theBlock.isFull, dims); |
102 |
+@@ -243,7 +243,7 @@ vtkUniformGrid* vtkAMRVelodyneReader::GetAMRGrid(const int blockIdx) |
103 |
+ { |
104 |
+ return nullptr; |
105 |
+ } |
106 |
+- Block& theBlock = this->Internal->Blocks[blockIdx]; |
107 |
++ vtkAMRVelodyneReaderInternal::Block& theBlock = this->Internal->Blocks[blockIdx]; |
108 |
+ int dims[3]; |
109 |
+ CalculateBlockDims(this->Internal->blockDims.data(), theBlock.isFull, dims); |
110 |
+ vtkUniformGrid* ug = vtkUniformGrid::New(); |
111 |
+--- a/IO/AMR/vtkAMRVelodyneReaderInternal.h |
112 |
++++ b/IO/AMR/vtkAMRVelodyneReaderInternal.h |
113 |
+@@ -48,24 +48,20 @@ |
114 |
+ //================================================================================ |
115 |
+ // INTERNAL VELODYNE READER |
116 |
+ //================================================================================ |
117 |
+-typedef struct tagVelodyneSimParameters |
118 |
+-{ |
119 |
+- double Time; |
120 |
+- int CycleTime; |
121 |
+-} VelodneSimParameters; |
122 |
+ |
123 |
+-typedef struct tagBlock |
124 |
+-{ |
125 |
+- int Index; |
126 |
+- int dSetLoc; |
127 |
+- int Level; |
128 |
+- double Origin[3]; |
129 |
+- bool isFull; |
130 |
+- bool isLeaf; |
131 |
+-} Block; |
132 |
+ class vtkAMRVelodyneReaderInternal |
133 |
+ { |
134 |
+ public: |
135 |
++ typedef struct tagVelodyneBlock |
136 |
++ { |
137 |
++ int Index; |
138 |
++ int dSetLoc; |
139 |
++ int Level; |
140 |
++ double Origin[3]; |
141 |
++ bool isFull; |
142 |
++ bool isLeaf; |
143 |
++ } Block; |
144 |
++ |
145 |
+ vtkAMRVelodyneReaderInternal(); |
146 |
+ ~vtkAMRVelodyneReaderInternal(); |
147 |
+ void SetFileName(VTK_FILEPATH VTK_FUTURE_CONST char* fileName); |
148 |
+-- |
149 |
+2.37.2 |
150 |
+ |
151 |
|
152 |
diff --git a/sci-libs/vtk/vtk-9.1.0-r2.ebuild b/sci-libs/vtk/vtk-9.1.0-r2.ebuild |
153 |
index 1e80b96b80b4..e9034c50bbb0 100644 |
154 |
--- a/sci-libs/vtk/vtk-9.1.0-r2.ebuild |
155 |
+++ b/sci-libs/vtk/vtk-9.1.0-r2.ebuild |
156 |
@@ -145,6 +145,7 @@ PATCHES=( |
157 |
"${FILESDIR}"/${PN}-9.0.3-IO-FFMPEG-support-FFmpeg-5.0-API-changes.patch |
158 |
"${FILESDIR}"/${P}-adjust-to-find-binaries.patch |
159 |
"${FILESDIR}"/${P}-avoid-naming-collision-with-netcdf-4.9.0.patch |
160 |
+ "${FILESDIR}"/${P}-Change-or-scope-struct-names-to-avoid-conflicts.patch |
161 |
) |
162 |
|
163 |
DOCS=( CONTRIBUTING.md README.md ) |