Accepting request 917760 from home:Guillaume_G:branches:graphics

- Add patch to fix OpenEXRCore.testHUF on armv7:
  * openexr-fix-armv7.patch
  * openexr-fix-armv7-2.patch

OBS-URL: https://build.opensuse.org/request/show/917760
OBS-URL: https://build.opensuse.org/package/show/graphics/openexr?expand=0&rev=76
This commit is contained in:
Petr Gajdos 2021-09-09 15:33:55 +00:00 committed by Git OBS Bridge
parent 727e813366
commit 4d5d206ec7
4 changed files with 64 additions and 1 deletions

29
openexr-fix-armv7-2.patch Normal file
View File

@ -0,0 +1,29 @@
From daf791092ec0d7208cc222432c86464852e10fbc Mon Sep 17 00:00:00 2001
From: Kimball Thurston <kdt3rd@gmail.com>
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 <kdt3rd@gmail.com>
---
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<uint8_t> hspare;

23
openexr-fix-armv7.patch Normal file
View File

@ -0,0 +1,23 @@
From 26d2fd360edebee51e786ad75b595664a7fb881c Mon Sep 17 00:00:00 2001
From: Kimball Thurston <kdt3rd@gmail.com>
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 <kdt3rd@gmail.com>
---
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<uint8_t> hspare;

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Aug 31 06:23:32 UTC 2021 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- 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

View File

@ -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"