Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/openexr/, media-libs/openexr/files/
Date: Sat, 20 Apr 2019 23:27:58
Message-Id: 1555752842.76a4a88d277cf9a01e833f0ba8f09d5fa4826f14.pacho@gentoo
1 commit: 76a4a88d277cf9a01e833f0ba8f09d5fa4826f14
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 20 09:34:02 2019 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 20 09:34:02 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76a4a88d
7
8 media-libs/openexr: Multiple test fixes from Debian
9
10 Closes: https://bugs.gentoo.org/656680
11 Package-Manager: Portage-2.3.62, Repoman-2.3.12
12 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
13
14 .../openexr/files/openexr-2.3.0-bigendian.patch | 71 ++++++++++++++++++++++
15 .../openexr/files/openexr-2.3.0-bigendian2.patch | 17 ++++++
16 .../files/openexr-2.3.0-skip-bogus-tests.patch | 31 ++++++++++
17 .../files/openexr-2.3.0-tests-32bits-2.patch | 17 ++++++
18 .../openexr/files/openexr-2.3.0-tests-32bits.patch | 36 +++++++++++
19 media-libs/openexr/openexr-2.3.0.ebuild | 9 ++-
20 6 files changed, 179 insertions(+), 2 deletions(-)
21
22 diff --git a/media-libs/openexr/files/openexr-2.3.0-bigendian.patch b/media-libs/openexr/files/openexr-2.3.0-bigendian.patch
23 new file mode 100644
24 index 00000000000..0851fe95735
25 --- /dev/null
26 +++ b/media-libs/openexr/files/openexr-2.3.0-bigendian.patch
27 @@ -0,0 +1,71 @@
28 +Description: Fix test-suite on some big-endian archs
29 +Author: Dennis Gilmore <dennis@×××××.us>
30 +Bug-Debian: https://bugs.debian.org/793040
31 +Origin: vendor, https://github.com/openexr/openexr/issues/81
32 +Reviewed-by: Mathieu Malaterre <malat@××××××.org>
33 +
34 +Index: openexr/IlmImfTest/testFutureProofing.cpp
35 +===================================================================
36 +--- openexr.orig/IlmImfTest/testFutureProofing.cpp
37 ++++ openexr/IlmImfTest/testFutureProofing.cpp
38 +@@ -40,6 +40,7 @@
39 + #include <stdio.h>
40 + #include <stdlib.h>
41 + #include <assert.h>
42 ++#include <byteswap.h>
43 +
44 + #include "tmpDir.h"
45 + #include "testFutureProofing.h"
46 +@@ -64,6 +65,7 @@
47 + #include <ImfNamespace.h>
48 + #include <ImathNamespace.h>
49 + #include <IlmThreadNamespace.h>
50 ++#include <ImfSystemSpecific.h>
51 +
52 + namespace IMF = OPENEXR_IMF_NAMESPACE;
53 + using namespace IMF;
54 +@@ -1234,6 +1236,12 @@ modifyType (bool modify_version)
55 +
56 + //length of attribute
57 + fread(&length,4,1,f);
58 ++ if (!GLOBAL_SYSTEM_LITTLE_ENDIAN)
59 ++ {
60 ++ int tmp = bswap_32(length);
61 ++ length = tmp;
62 ++ }
63 ++
64 + if(!modify_version && attrib_name=="type")
65 + {
66 + // modify the type of part 1 to be 'X<whatevever>'
67 +Index: openexr/IlmImfTest/testMultiPartFileMixingBasic.cpp
68 +===================================================================
69 +--- openexr.orig/IlmImfTest/testMultiPartFileMixingBasic.cpp
70 ++++ openexr/IlmImfTest/testMultiPartFileMixingBasic.cpp
71 +@@ -40,6 +40,7 @@
72 + #include <stdio.h>
73 + #include <stdlib.h>
74 + #include <assert.h>
75 ++#include <byteswap.h>
76 +
77 + #include "tmpDir.h"
78 + #include "testMultiPartFileMixingBasic.h"
79 +@@ -59,6 +60,7 @@
80 + #include <ImfDeepScanLineInputPart.h>
81 + #include <ImfPartType.h>
82 + #include <ImfMisc.h>
83 ++#include <ImfSystemSpecific.h>
84 +
85 + namespace IMF = OPENEXR_IMF_NAMESPACE;
86 + using namespace IMF;
87 +@@ -1383,6 +1385,11 @@ killOffsetTables (const std::string & fn
88 +
89 + //length of attribute
90 + fread(&length,4,1,f);
91 ++ if (!GLOBAL_SYSTEM_LITTLE_ENDIAN)
92 ++ {
93 ++ int tmp = bswap_32(length);
94 ++ length = tmp;
95 ++ }
96 +
97 + //value of attribute
98 + for(int i=0;i<length;i++)
99
100 diff --git a/media-libs/openexr/files/openexr-2.3.0-bigendian2.patch b/media-libs/openexr/files/openexr-2.3.0-bigendian2.patch
101 new file mode 100644
102 index 00000000000..cf1ad7b0902
103 --- /dev/null
104 +++ b/media-libs/openexr/files/openexr-2.3.0-bigendian2.patch
105 @@ -0,0 +1,17 @@
106 +Description: Upstream is not interested in big endian arch
107 + Seems to only affect the test suite.
108 +Author: Mathieu Malaterre <malat@××××××.org>
109 +
110 +Index: openexr/IlmImfTest/main.cpp
111 +===================================================================
112 +--- openexr.orig/IlmImfTest/main.cpp
113 ++++ openexr/IlmImfTest/main.cpp
114 +@@ -153,7 +153,7 @@ main (int argc, char *argv[])
115 + TEST (testHuf, "core");
116 + TEST (testWav, "core");
117 + TEST (testRgba, "basic");
118 +- TEST (testSharedFrameBuffer, "basic");
119 ++ //TEST (testSharedFrameBuffer, "basic");
120 + TEST (testRgbaThreading, "basic");
121 + TEST (testChannels, "basic");
122 + TEST (testAttributes, "core");
123
124 diff --git a/media-libs/openexr/files/openexr-2.3.0-skip-bogus-tests.patch b/media-libs/openexr/files/openexr-2.3.0-skip-bogus-tests.patch
125 new file mode 100644
126 index 00000000000..360b9609b2d
127 --- /dev/null
128 +++ b/media-libs/openexr/files/openexr-2.3.0-skip-bogus-tests.patch
129 @@ -0,0 +1,31 @@
130 +Description: Remove bogus test from suite
131 +Author: Mathieu Malaterre <malat@××××××.org>
132 +Bug-Debian: https://bugs.debian.org/790495
133 +Forwarded: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790495#15
134 +
135 +--- openexr-2.2.0.orig/IlmImfTest/testSampleImages.cpp
136 ++++ openexr-2.2.0/IlmImfTest/testSampleImages.cpp
137 +@@ -162,15 +162,15 @@ testSampleImages (const std::string&)
138 + compareImages (ILM_IMF_TEST_IMAGEDIR "comp_b44.exr",
139 + ILM_IMF_TEST_IMAGEDIR "comp_b44_piz.exr");
140 +
141 +- compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwaa_v1.exr",
142 +- ILM_IMF_TEST_IMAGEDIR "comp_dwaa_piz.exr");
143 +- compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwaa_v2.exr",
144 +- ILM_IMF_TEST_IMAGEDIR "comp_dwaa_piz.exr");
145 ++// compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwaa_v1.exr",
146 ++// ILM_IMF_TEST_IMAGEDIR "comp_dwaa_piz.exr");
147 ++// compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwaa_v2.exr",
148 ++// ILM_IMF_TEST_IMAGEDIR "comp_dwaa_piz.exr");
149 +
150 +- compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwab_v1.exr",
151 +- ILM_IMF_TEST_IMAGEDIR "comp_dwab_piz.exr");
152 +- compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwab_v2.exr",
153 +- ILM_IMF_TEST_IMAGEDIR "comp_dwab_piz.exr");
154 ++// compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwab_v1.exr",
155 ++// ILM_IMF_TEST_IMAGEDIR "comp_dwab_piz.exr");
156 ++// compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwab_v2.exr",
157 ++// ILM_IMF_TEST_IMAGEDIR "comp_dwab_piz.exr");
158 +
159 +
160 + cout << "ok\n" << endl;
161
162 diff --git a/media-libs/openexr/files/openexr-2.3.0-tests-32bits-2.patch b/media-libs/openexr/files/openexr-2.3.0-tests-32bits-2.patch
163 new file mode 100644
164 index 00000000000..bb3917d7996
165 --- /dev/null
166 +++ b/media-libs/openexr/files/openexr-2.3.0-tests-32bits-2.patch
167 @@ -0,0 +1,17 @@
168 +Description: Usual double rounding issue with x87
169 +Author: Mathieu Malaterre <malat@××××××.org>
170 +Bug-Debian: https://bugs.debian.org/909865
171 +Forwarded: https://github.com/openexr/openexr/issues/346
172 +Last-Update: 2018-12-19
173 +
174 +--- openexr-2.3.0.orig/IlmImfTest/Makefile.am
175 ++++ openexr-2.3.0/IlmImfTest/Makefile.am
176 +@@ -54,6 +54,8 @@ IlmImfTest_SOURCES = main.cpp tmpDir.h t
177 +
178 + AM_CPPFLAGS = -DILM_IMF_TEST_IMAGEDIR=\"$(srcdir)/\"
179 +
180 ++AM_CPPFLAGS += -ffloat-store
181 ++
182 + if BUILD_IMFHUGETEST
183 + IlmImfTest_SOURCES += testDeepScanLineHuge.cpp testDeepScanLineHuge.h
184 + AM_CPPFLAGS += -DENABLE_IMFHUGETEST
185
186 diff --git a/media-libs/openexr/files/openexr-2.3.0-tests-32bits.patch b/media-libs/openexr/files/openexr-2.3.0-tests-32bits.patch
187 new file mode 100644
188 index 00000000000..430bb20bcfa
189 --- /dev/null
190 +++ b/media-libs/openexr/files/openexr-2.3.0-tests-32bits.patch
191 @@ -0,0 +1,36 @@
192 +Description: Fix test-suite on some 32bits archs
193 +Author: Mathieu Malaterre <malat@××××××.org>
194 +Bug-Debian: https://bugs.debian.org/791478
195 +
196 +Index: openexr/IlmImfTest/Makefile.am
197 +===================================================================
198 +--- openexr.orig/IlmImfTest/Makefile.am
199 ++++ openexr/IlmImfTest/Makefile.am
200 +@@ -44,7 +44,6 @@ IlmImfTest_SOURCES = main.cpp tmpDir.h t
201 + testDeepScanLineMultipleRead.h testDeepScanLineMultipleRead.cpp \
202 + testPartHelper.h testPartHelper.cpp \
203 + testOptimized.cpp testOptimized.h \
204 +- testOptimizedInterleavePatterns.cpp testOptimizedInterleavePatterns.h \
205 + testBadTypeAttributes.cpp testBadTypeAttributes.h \
206 + testFutureProofing.cpp testFutureProofing.h \
207 + compareDwa.cpp compareDwa.h \
208 +Index: openexr/IlmImfTest/main.cpp
209 +===================================================================
210 +--- openexr.orig/IlmImfTest/main.cpp
211 ++++ openexr/IlmImfTest/main.cpp
212 +@@ -82,7 +82,6 @@
213 + #include "testCopyMultiPartFile.h"
214 + #include "testPartHelper.h"
215 + #include "testOptimized.h"
216 +-#include "testOptimizedInterleavePatterns.h"
217 + #include "testBadTypeAttributes.h"
218 + #include "testFutureProofing.h"
219 + #include "testPartHelper.h"
220 +@@ -174,7 +173,6 @@ main (int argc, char *argv[])
221 + TEST (testExistingStreams, "core");
222 + TEST (testStandardAttributes, "core");
223 + TEST (testOptimized, "basic");
224 +- TEST (testOptimizedInterleavePatterns, "basic");
225 + TEST (testYca, "basic");
226 + TEST (testTiledYa, "basic");
227 + TEST (testNativeFormat, "basic");
228
229 diff --git a/media-libs/openexr/openexr-2.3.0.ebuild b/media-libs/openexr/openexr-2.3.0.ebuild
230 index 70d1ef559dd..1db0ffc5bda 100644
231 --- a/media-libs/openexr/openexr-2.3.0.ebuild
232 +++ b/media-libs/openexr/openexr-2.3.0.ebuild
233 @@ -31,6 +31,12 @@ PATCHES=(
234 "${FILESDIR}/${PN}-2.2.0-fix-config.h-collision.patch"
235 "${FILESDIR}/${PN}-2.2.0-Install-missing-header-files.patch"
236 "${FILESDIR}/${P}-fix-build-system.patch"
237 + # From Debian
238 + "${FILESDIR}/${PN}-2.3.0-tests-32bits.patch"
239 + "${FILESDIR}/${PN}-2.3.0-skip-bogus-tests.patch"
240 + "${FILESDIR}/${PN}-2.3.0-bigendian.patch"
241 + "${FILESDIR}/${PN}-2.3.0-bigendian2.patch"
242 + "${FILESDIR}/${PN}-2.3.0-tests-32bits-2.patch"
243 )
244
245 src_prepare() {
246 @@ -66,6 +72,5 @@ multilib_src_install_all() {
247 rm -rf "${ED%/}"/usr/share/doc/${PF}/examples || die
248 fi
249
250 - # package provides .pc files
251 - find "${D}" -name '*.la' -delete || die
252 + find "${D}" -name '*.la' -type f -delete || die
253 }