diff --git a/openexr-fix-armv7-2.patch b/openexr-fix-armv7-2.patch new file mode 100644 index 0000000..a266dcb --- /dev/null +++ b/openexr-fix-armv7-2.patch @@ -0,0 +1,29 @@ +From daf791092ec0d7208cc222432c86464852e10fbc Mon Sep 17 00:00:00 2001 +From: Kimball Thurston +Date: Thu, 2 Sep 2021 21:08:39 +1200 +Subject: [PATCH] the HufDec struct used during decompression also contains a + pointer + +Account for that for 32-bit machines in the unit / coverage test. + +Signed-off-by: Kimball Thurston +--- + src/test/OpenEXRCoreTest/compression.cpp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/test/OpenEXRCoreTest/compression.cpp b/src/test/OpenEXRCoreTest/compression.cpp +index b10fff9ad..aed0257ff 100644 +--- a/src/test/OpenEXRCoreTest/compression.cpp ++++ b/src/test/OpenEXRCoreTest/compression.cpp +@@ -1333,8 +1333,9 @@ testHUF (const std::string& tempdir) + { + uint64_t esize = internal_exr_huf_compress_spare_bytes (); + uint64_t dsize = internal_exr_huf_decompress_spare_bytes (); +- EXRCORE_TEST (esize == 65537 * (8 + 8 + sizeof(void*) + 4)); +- EXRCORE_TEST (dsize == (65537 * 8 + (1 << 14) * 16)); ++ EXRCORE_TEST (esize == 65537 * (8 + 8 + sizeof (uint64_t*) + 4)); ++ EXRCORE_TEST ( ++ dsize == (65537 * 8 + (1 << 14) * (sizeof (uint32_t*) + 4 + 4))); + + std::vector hspare; + diff --git a/openexr-fix-armv7.patch b/openexr-fix-armv7.patch new file mode 100644 index 0000000..e03c47d --- /dev/null +++ b/openexr-fix-armv7.patch @@ -0,0 +1,23 @@ +From 26d2fd360edebee51e786ad75b595664a7fb881c Mon Sep 17 00:00:00 2001 +From: Kimball Thurston +Date: Tue, 31 Aug 2021 04:00:39 +1200 +Subject: [PATCH] Fixes #1135, test which assumed 64-bit pointer size (#1136) + +Signed-off-by: Kimball Thurston +--- + src/test/OpenEXRCoreTest/compression.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/test/OpenEXRCoreTest/compression.cpp b/src/test/OpenEXRCoreTest/compression.cpp +index 5d408ca7c..b10fff9ad 100644 +--- a/src/test/OpenEXRCoreTest/compression.cpp ++++ b/src/test/OpenEXRCoreTest/compression.cpp +@@ -1333,7 +1333,7 @@ testHUF (const std::string& tempdir) + { + uint64_t esize = internal_exr_huf_compress_spare_bytes (); + uint64_t dsize = internal_exr_huf_decompress_spare_bytes (); +- EXRCORE_TEST (esize == 65537 * (8 + 8 + 8 + 4)); ++ EXRCORE_TEST (esize == 65537 * (8 + 8 + sizeof(void*) + 4)); + EXRCORE_TEST (dsize == (65537 * 8 + (1 << 14) * 16)); + + std::vector hspare; diff --git a/openexr.changes b/openexr.changes index 9b45890..0cebce1 100644 --- a/openexr.changes +++ b/openexr.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Aug 31 06:23:32 UTC 2021 - Guillaume GARDET + +- Add patch to fix OpenEXRCore.testHUF on armv7: + * openexr-fix-armv7.patch + * openexr-fix-armv7-2.patch + ------------------------------------------------------------------- Mon Aug 16 14:41:56 UTC 2021 - pgajdos@suse.com diff --git a/openexr.spec b/openexr.spec index 8e99958..0cdf1d4 100644 --- a/openexr.spec +++ b/openexr.spec @@ -30,6 +30,10 @@ Group: Development/Libraries/C and C++ URL: https://www.openexr.com/ Source0: https://github.com/openexr/openexr/archive/v%{version}.tar.gz Source2: baselibs.conf +# PATCH-FIX-UPSTREAM https://github.com/AcademySoftwareFoundation/openexr/issues/1135 +Patch1: openexr-fix-armv7.patch +# PATCH-FIX-UPSTREAM https://github.com/AcademySoftwareFoundation/openexr/issues/1135 +Patch2: openexr-fix-armv7-2.patch BuildRequires: cmake >= 3.12 BuildRequires: fltk-devel BuildRequires: freeglut-devel @@ -145,7 +149,7 @@ Industrial Light & Magic for use in computer imaging applications. This package contains documentation. %prep -%setup -q +%autosetup -p1 %build export PTHREAD_LIBS="-lpthread"