From 76a4a88d277cf9a01e833f0ba8f09d5fa4826f14 Mon Sep 17 00:00:00 2001 From: Pacho Ramos Date: Sat, 20 Apr 2019 11:34:02 +0200 Subject: [PATCH] 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 --- .../files/openexr-2.3.0-bigendian.patch | 71 +++++++++++++++++++ .../files/openexr-2.3.0-bigendian2.patch | 17 +++++ .../openexr-2.3.0-skip-bogus-tests.patch | 31 ++++++++ .../files/openexr-2.3.0-tests-32bits-2.patch | 17 +++++ .../files/openexr-2.3.0-tests-32bits.patch | 36 ++++++++++ media-libs/openexr/openexr-2.3.0.ebuild | 9 ++- 6 files changed, 179 insertions(+), 2 deletions(-) create mode 100644 media-libs/openexr/files/openexr-2.3.0-bigendian.patch create mode 100644 media-libs/openexr/files/openexr-2.3.0-bigendian2.patch create mode 100644 media-libs/openexr/files/openexr-2.3.0-skip-bogus-tests.patch create mode 100644 media-libs/openexr/files/openexr-2.3.0-tests-32bits-2.patch create mode 100644 media-libs/openexr/files/openexr-2.3.0-tests-32bits.patch 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 0000000000000..0851fe9573549 --- /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 +Bug-Debian: https://bugs.debian.org/793040 +Origin: vendor, https://github.com/openexr/openexr/issues/81 +Reviewed-by: Mathieu Malaterre + +Index: openexr/IlmImfTest/testFutureProofing.cpp +=================================================================== +--- openexr.orig/IlmImfTest/testFutureProofing.cpp ++++ openexr/IlmImfTest/testFutureProofing.cpp +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #include "tmpDir.h" + #include "testFutureProofing.h" +@@ -64,6 +65,7 @@ + #include + #include + #include ++#include + + 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' +Index: openexr/IlmImfTest/testMultiPartFileMixingBasic.cpp +=================================================================== +--- openexr.orig/IlmImfTest/testMultiPartFileMixingBasic.cpp ++++ openexr/IlmImfTest/testMultiPartFileMixingBasic.cpp +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #include "tmpDir.h" + #include "testMultiPartFileMixingBasic.h" +@@ -59,6 +60,7 @@ + #include + #include + #include ++#include + + 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 + +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 0000000000000..360b9609b2dca --- /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 +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 0000000000000..bb3917d799612 --- /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 +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 0000000000000..430bb20bcfae9 --- /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 +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 70d1ef559dd96..1db0ffc5bda14 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 }