diff options
author | Pacho Ramos <pacho@gentoo.org> | 2019-04-20 11:34:02 +0200 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2019-04-20 11:34:02 +0200 |
commit | 76a4a88d277cf9a01e833f0ba8f09d5fa4826f14 (patch) | |
tree | ee9930d1672f93fcac1933ba09fd4402eb7ab813 /media-libs/openexr | |
parent | sys-auth/polkit: Drop 0.115-r1 (diff) | |
download | gentoo-76a4a88d277cf9a01e833f0ba8f09d5fa4826f14.tar.gz gentoo-76a4a88d277cf9a01e833f0ba8f09d5fa4826f14.tar.bz2 gentoo-76a4a88d277cf9a01e833f0ba8f09d5fa4826f14.zip |
media-libs/openexr: Multiple test fixes from Debian
Closes: https://bugs.gentoo.org/656680
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Diffstat (limited to 'media-libs/openexr')
6 files changed, 179 insertions, 2 deletions
diff --git a/media-libs/openexr/files/openexr-2.3.0-bigendian.patch b/media-libs/openexr/files/openexr-2.3.0-bigendian.patch new file mode 100644 index 000000000000..0851fe957354 --- /dev/null +++ b/media-libs/openexr/files/openexr-2.3.0-bigendian.patch @@ -0,0 +1,71 @@ +Description: Fix test-suite on some big-endian archs +Author: Dennis Gilmore <dennis@ausil.us> +Bug-Debian: https://bugs.debian.org/793040 +Origin: vendor, https://github.com/openexr/openexr/issues/81 +Reviewed-by: Mathieu Malaterre <malat@debian.org> + +Index: openexr/IlmImfTest/testFutureProofing.cpp +=================================================================== +--- openexr.orig/IlmImfTest/testFutureProofing.cpp ++++ openexr/IlmImfTest/testFutureProofing.cpp +@@ -40,6 +40,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <assert.h> ++#include <byteswap.h> + + #include "tmpDir.h" + #include "testFutureProofing.h" +@@ -64,6 +65,7 @@ + #include <ImfNamespace.h> + #include <ImathNamespace.h> + #include <IlmThreadNamespace.h> ++#include <ImfSystemSpecific.h> + + namespace IMF = OPENEXR_IMF_NAMESPACE; + using namespace IMF; +@@ -1234,6 +1236,12 @@ modifyType (bool modify_version) + + //length of attribute + fread(&length,4,1,f); ++ if (!GLOBAL_SYSTEM_LITTLE_ENDIAN) ++ { ++ int tmp = bswap_32(length); ++ length = tmp; ++ } ++ + if(!modify_version && attrib_name=="type") + { + // modify the type of part 1 to be 'X<whatevever>' +Index: openexr/IlmImfTest/testMultiPartFileMixingBasic.cpp +=================================================================== +--- openexr.orig/IlmImfTest/testMultiPartFileMixingBasic.cpp ++++ openexr/IlmImfTest/testMultiPartFileMixingBasic.cpp +@@ -40,6 +40,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <assert.h> ++#include <byteswap.h> + + #include "tmpDir.h" + #include "testMultiPartFileMixingBasic.h" +@@ -59,6 +60,7 @@ + #include <ImfDeepScanLineInputPart.h> + #include <ImfPartType.h> + #include <ImfMisc.h> ++#include <ImfSystemSpecific.h> + + namespace IMF = OPENEXR_IMF_NAMESPACE; + using namespace IMF; +@@ -1383,6 +1385,11 @@ killOffsetTables (const std::string & fn + + //length of attribute + fread(&length,4,1,f); ++ if (!GLOBAL_SYSTEM_LITTLE_ENDIAN) ++ { ++ int tmp = bswap_32(length); ++ length = tmp; ++ } + + //value of attribute + for(int i=0;i<length;i++) diff --git a/media-libs/openexr/files/openexr-2.3.0-bigendian2.patch b/media-libs/openexr/files/openexr-2.3.0-bigendian2.patch new file mode 100644 index 000000000000..cf1ad7b09027 --- /dev/null +++ b/media-libs/openexr/files/openexr-2.3.0-bigendian2.patch @@ -0,0 +1,17 @@ +Description: Upstream is not interested in big endian arch + Seems to only affect the test suite. +Author: Mathieu Malaterre <malat@debian.org> + +Index: openexr/IlmImfTest/main.cpp +=================================================================== +--- openexr.orig/IlmImfTest/main.cpp ++++ openexr/IlmImfTest/main.cpp +@@ -153,7 +153,7 @@ main (int argc, char *argv[]) + TEST (testHuf, "core"); + TEST (testWav, "core"); + TEST (testRgba, "basic"); +- TEST (testSharedFrameBuffer, "basic"); ++ //TEST (testSharedFrameBuffer, "basic"); + TEST (testRgbaThreading, "basic"); + TEST (testChannels, "basic"); + TEST (testAttributes, "core"); 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 new file mode 100644 index 000000000000..360b9609b2dc --- /dev/null +++ b/media-libs/openexr/files/openexr-2.3.0-skip-bogus-tests.patch @@ -0,0 +1,31 @@ +Description: Remove bogus test from suite +Author: Mathieu Malaterre <malat@debian.org> +Bug-Debian: https://bugs.debian.org/790495 +Forwarded: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790495#15 + +--- openexr-2.2.0.orig/IlmImfTest/testSampleImages.cpp ++++ openexr-2.2.0/IlmImfTest/testSampleImages.cpp +@@ -162,15 +162,15 @@ testSampleImages (const std::string&) + compareImages (ILM_IMF_TEST_IMAGEDIR "comp_b44.exr", + ILM_IMF_TEST_IMAGEDIR "comp_b44_piz.exr"); + +- compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwaa_v1.exr", +- ILM_IMF_TEST_IMAGEDIR "comp_dwaa_piz.exr"); +- compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwaa_v2.exr", +- ILM_IMF_TEST_IMAGEDIR "comp_dwaa_piz.exr"); ++// compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwaa_v1.exr", ++// ILM_IMF_TEST_IMAGEDIR "comp_dwaa_piz.exr"); ++// compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwaa_v2.exr", ++// ILM_IMF_TEST_IMAGEDIR "comp_dwaa_piz.exr"); + +- compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwab_v1.exr", +- ILM_IMF_TEST_IMAGEDIR "comp_dwab_piz.exr"); +- compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwab_v2.exr", +- ILM_IMF_TEST_IMAGEDIR "comp_dwab_piz.exr"); ++// compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwab_v1.exr", ++// ILM_IMF_TEST_IMAGEDIR "comp_dwab_piz.exr"); ++// compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwab_v2.exr", ++// ILM_IMF_TEST_IMAGEDIR "comp_dwab_piz.exr"); + + + cout << "ok\n" << endl; 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 new file mode 100644 index 000000000000..bb3917d79961 --- /dev/null +++ b/media-libs/openexr/files/openexr-2.3.0-tests-32bits-2.patch @@ -0,0 +1,17 @@ +Description: Usual double rounding issue with x87 +Author: Mathieu Malaterre <malat@debian.org> +Bug-Debian: https://bugs.debian.org/909865 +Forwarded: https://github.com/openexr/openexr/issues/346 +Last-Update: 2018-12-19 + +--- openexr-2.3.0.orig/IlmImfTest/Makefile.am ++++ openexr-2.3.0/IlmImfTest/Makefile.am +@@ -54,6 +54,8 @@ IlmImfTest_SOURCES = main.cpp tmpDir.h t + + AM_CPPFLAGS = -DILM_IMF_TEST_IMAGEDIR=\"$(srcdir)/\" + ++AM_CPPFLAGS += -ffloat-store ++ + if BUILD_IMFHUGETEST + IlmImfTest_SOURCES += testDeepScanLineHuge.cpp testDeepScanLineHuge.h + AM_CPPFLAGS += -DENABLE_IMFHUGETEST 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 new file mode 100644 index 000000000000..430bb20bcfae --- /dev/null +++ b/media-libs/openexr/files/openexr-2.3.0-tests-32bits.patch @@ -0,0 +1,36 @@ +Description: Fix test-suite on some 32bits archs +Author: Mathieu Malaterre <malat@debian.org> +Bug-Debian: https://bugs.debian.org/791478 + +Index: openexr/IlmImfTest/Makefile.am +=================================================================== +--- openexr.orig/IlmImfTest/Makefile.am ++++ openexr/IlmImfTest/Makefile.am +@@ -44,7 +44,6 @@ IlmImfTest_SOURCES = main.cpp tmpDir.h t + testDeepScanLineMultipleRead.h testDeepScanLineMultipleRead.cpp \ + testPartHelper.h testPartHelper.cpp \ + testOptimized.cpp testOptimized.h \ +- testOptimizedInterleavePatterns.cpp testOptimizedInterleavePatterns.h \ + testBadTypeAttributes.cpp testBadTypeAttributes.h \ + testFutureProofing.cpp testFutureProofing.h \ + compareDwa.cpp compareDwa.h \ +Index: openexr/IlmImfTest/main.cpp +=================================================================== +--- openexr.orig/IlmImfTest/main.cpp ++++ openexr/IlmImfTest/main.cpp +@@ -82,7 +82,6 @@ + #include "testCopyMultiPartFile.h" + #include "testPartHelper.h" + #include "testOptimized.h" +-#include "testOptimizedInterleavePatterns.h" + #include "testBadTypeAttributes.h" + #include "testFutureProofing.h" + #include "testPartHelper.h" +@@ -174,7 +173,6 @@ main (int argc, char *argv[]) + TEST (testExistingStreams, "core"); + TEST (testStandardAttributes, "core"); + TEST (testOptimized, "basic"); +- TEST (testOptimizedInterleavePatterns, "basic"); + TEST (testYca, "basic"); + TEST (testTiledYa, "basic"); + TEST (testNativeFormat, "basic"); diff --git a/media-libs/openexr/openexr-2.3.0.ebuild b/media-libs/openexr/openexr-2.3.0.ebuild index 70d1ef559dd9..1db0ffc5bda1 100644 --- a/media-libs/openexr/openexr-2.3.0.ebuild +++ b/media-libs/openexr/openexr-2.3.0.ebuild @@ -31,6 +31,12 @@ PATCHES=( "${FILESDIR}/${PN}-2.2.0-fix-config.h-collision.patch" "${FILESDIR}/${PN}-2.2.0-Install-missing-header-files.patch" "${FILESDIR}/${P}-fix-build-system.patch" + # From Debian + "${FILESDIR}/${PN}-2.3.0-tests-32bits.patch" + "${FILESDIR}/${PN}-2.3.0-skip-bogus-tests.patch" + "${FILESDIR}/${PN}-2.3.0-bigendian.patch" + "${FILESDIR}/${PN}-2.3.0-bigendian2.patch" + "${FILESDIR}/${PN}-2.3.0-tests-32bits-2.patch" ) src_prepare() { @@ -66,6 +72,5 @@ multilib_src_install_all() { rm -rf "${ED%/}"/usr/share/doc/${PF}/examples || die fi - # package provides .pc files - find "${D}" -name '*.la' -delete || die + find "${D}" -name '*.la' -type f -delete || die } |