commit bc25577a0a1e64b4c4f332ce9588bda604eb321f
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Wed Jul 17 11:50:35 2024 +0200
Revert "Unmaintained upstream"
This reverts commit d4e72449227e54bb20ea141699ff9b46c9a54912.
.gitignore | 1 +
OpenEXR_Viewers-nonfree.spec | 299 ++++++++++++++++++++++++++++++++++++
dead.package | 1 -
namespaceAlias.h | 45 ++++++
openexr_viewers-2.0.1-dso.patch | 37 +++++
openexr_viewers-2.1.0-headers.patch | 13 ++
openexr_viewers-gcc-11-fixes.patch | 67 ++++++++
openexr_viewers-imfheader.patch | 36 +++++
sources | 1 +
9 files changed, 499 insertions(+), 1 deletion(-)
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..79c4402
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+OpenEXR_Viewers-*.tar.gz
diff --git a/OpenEXR_Viewers-nonfree.spec b/OpenEXR_Viewers-nonfree.spec
new file mode 100644
index 0000000..f593c76
--- /dev/null
+++ b/OpenEXR_Viewers-nonfree.spec
@@ -0,0 +1,299 @@
+# NVIDIA Cg toolkit is not free
+%define with_Cg 1
+%if %with_Cg
+%define real_name OpenEXR_Viewers-nonfree
+%define V_suffix -nonfree
+%define priority 10
+%else
+%define real_name OpenEXR_Viewers
+%define V_suffix -fedora
+%define priority 5
+%endif
+
+%global project openexr
+
+Name: %{real_name}
+Version: 2.3.0
+Release: 12%{?dist}
+Summary: Viewers programs for OpenEXR
+
+License: AMPAS BSD
+URL:
http://www.openexr.com
+Source0:
https://github.com/%{project}/%{project}/releases/download/v%{version}/Op...
+
+ExclusiveArch: i686 x86_64
+
+Patch1: openexr_viewers-2.0.1-dso.patch
+Patch2: openexr_viewers-gcc-11-fixes.patch
+Patch3: openexr_viewers-imfheader.patch
+
+BuildRequires: make
+BuildRequires: libtool
+BuildRequires: gcc-c++
+
+BuildRequires: fltk-devel >= 1.1
+BuildRequires: pkgconfig(OpenEXR) >= 2.1
+%if %with_Cg
+BuildRequires: Cg
+BuildRequires: freeglut-devel
+Provides: OpenEXR_Viewers = %{version}
+%else
+BuildConflicts: Cg
+%endif
+
+%if 0%{?openexr_ctl}
+BuildRequires: pkgconfig(OpenEXR_CTL)
+BuildRequires: OpenEXR_CTL
+Requires: OpenEXR_CTL%{?_isa}
+%endif
+Requires(post): /usr/sbin/alternatives
+Requires(preun): /usr/sbin/alternatives
+
+
+%description
+exrdisplay is a simple still image viewer that optionally applies color
+transforms to OpenEXR images, using ctl as explained in this document:
+doc/OpenEXRViewers.pdf
+
+%if %with_Cg
+playexr is a program that plays back OpenEXR image sequences, optionally
+with CTL support, applying rendering and display transforms in line with
+the current discussions at the AMPAS Image Interchange Framework committee
+(September 2006).
+
+This is the nonfree version compiled with NVIDIA Cg support
+See:
https://developer.nvidia.com/cg-toolkit
+%else
+
+%package docs
+Summary: Documentation for %{name}
+
+%description docs
+This package contains documentation files for %{name}.
+%endif
+
+%prep
+%setup -q -n openexr_viewers-%{version}
+
+%patch1 -p1 -b .dso
+%patch2 -p1 -b .gcc11
+%patch3 -p1 -b .imfh
+
+%if "%{_lib}" == "lib64"
+sed -i -e 's|ACTUAL_PREFIX/lib/CTL|ACTUAL_PREFIX/lib64/CTL|' configure.ac
+%endif
+#Needed for patch1 and to update CTL compiler test
+#autoconf
+./bootstrap
+sed -i -e 's|#include <vector>\n using namespace Ctl|#include
<vector>\n #include <cstdlib>\nusing namespace Ctl|' configure
+
+
+%build
+export CXXFLAGS="$RPM_OPT_FLAGS -L%{_libdir}"
+%configure --disable-static \
+ --disable-openexrtest \
+ --disable-openexrctltest \
+%if %with_Cg
+ --with-cg-prefix=%{_prefix}
+%endif
+
+# Missing libs for playexr
+sed -i -e 's|LIBS =|LIBS = -lglut|' playexr/Makefile
+
+%make_build
+
+
+%install
+%make_install
+
+# Remove the config.h - uneeded afaik
+rm -rf $RPM_BUILD_ROOT%{_includedir}
+
+# move the binary
+mv $RPM_BUILD_ROOT%{_bindir}/exrdisplay $RPM_BUILD_ROOT%{_bindir}/exrdisplay%{V_suffix}
+
+# Removing installed docs
+rm -rf $RPM_BUILD_ROOT%{_datadir}/doc
+
+# Owernship of the alternative provides
+touch $RPM_BUILD_ROOT%{_bindir}/exrdisplay
+
+%post
+alternatives --install %{_bindir}/exrdisplay exrdisplay %{_bindir}/exrdisplay%{V_suffix}
%{priority} ||:
+
+
+%preun
+if [ $1 -eq 0 ]; then
+ alternatives --remove exrdisplay %{_bindir}/exrdisplay%{V_suffix} || :
+fi
+
+%files
+%doc ChangeLog README.md
+%license LICENSE
+%ghost %{_bindir}/exrdisplay
+%{_bindir}/exrdisplay%{V_suffix}
+%if %with_Cg
+%{_bindir}/playexr
+%else
+
+%files docs
+%doc doc/OpenEXRViewers.odt doc/OpenEXRViewers.pdf
+%endif
+
+%changelog
+* Sun Feb 04 2024 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
2.3.0-12
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
+
+* Thu Aug 03 2023 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
2.3.0-11
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
+
+* Mon Aug 08 2022 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
2.3.0-10
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild and ffmpeg
+ 5.1
+
+* Thu Feb 10 2022 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
2.3.0-9
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+
+* Mon Jan 03 2022 Nicolas Chauvet <kwizart(a)gmail.com> - 2.3.0-8
+- Fix FTBFS
+
+* Wed Jul 21 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.3.0-7
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
+
+* Mon Jan 25 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.3.0-6
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+
+* Mon Jul 27 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.3.0-5
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+
+* Thu Apr 02 2020 Björn Esser <besser82(a)fedoraproject.org> - 2.3.0-4
+- Fix string quoting for rpm >= 4.16
+
+* Tue Jan 28 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.3.0-3
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+
+* Wed Jul 24 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.3.0-2
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
+* Tue Apr 02 2019 Richard Shaw <hobbes1069(a)gmail.com> - 2.3.0-1
+- Update to 2.3.0.
+
+* Thu Jan 31 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.2.1-2
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+
+* Mon Oct 01 2018 Nicolas Chauvet <kwizart(a)gmail.com> - 2.2.1-1
+- Update to 2.2.1
+
+* Thu Jul 19 2018 Nicolas Chauvet <kwizart(a)gmail.com> - 2.2.0-11
+- Spec clean-up
+- Enable CTL with 1.5.2 update
+
+* Thu Jul 12 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.2.0-10
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
+* Wed Feb 07 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.2.0-9
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+
+* Wed Aug 02 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.2.0-8
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
+
+* Wed Jul 26 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.2.0-7
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
+
+* Fri Feb 10 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.2.0-6
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
+
+* Wed Feb 03 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.2.0-5
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
+
+* Tue Jun 16 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
2.2.0-4
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
+
+* Sat May 02 2015 Kalev Lember <kalevlember(a)gmail.com> - 2.2.0-3
+- Rebuilt for GCC 5 C++11 ABI change
+
+* Thu Feb 19 2015 Rex Dieter <rdieter(a)fedoraproject.org> 2.2.0-2
+- rebuild (fltk)
+
+* Tue Nov 25 2014 Rex Dieter <rdieter(a)fedoraproject.org> 2.2.0-1
+- 2.2.0
+
+* Fri Aug 15 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
2.1.0-3
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
+* Fri Jun 06 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
2.1.0-2
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
+* Wed Nov 27 2013 Rex Dieter <rdieter(a)fedoraproject.org> 2.1.0-1
+- 2.1.0
+
+* Fri Oct 11 2013 Rex Dieter <rdieter(a)fedoraproject.org> 2.0.1-3
+- OpenEXR_Viewers FTBFS: ImplicitDSO Linking issues (#1017880)
+
+* Thu Oct 10 2013 Rex Dieter <rdieter(a)fedoraproject.org> 2.0.1-2
+- make OpenEXR_CTL support optional (since it doesn't support openexr-2.x yet)
+
+* Sat Oct 05 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 2.0.1-1
+- Update to 2.0.1
+
+* Sat Sep 14 2013 Bruno Wolff III <bruno(a)wolff.to> - 1.0.2-13
+- Rebuild for ilmbase related soname bumps
+
+* Fri Aug 02 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.2-12
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
+* Mon Mar 11 2013 Rex Dieter <rdieter(a)fedoraproject.org> - 1.0.2-11
+- rebuild (OpenEXR)
+
+* Wed Feb 13 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.2-10
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Wed Jul 18 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.2-9
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Tue Feb 28 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.2-8
+- Rebuilt for c++ ABI breakage
+
+* Thu Jan 12 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.2-7
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Fri Jun 24 2011 Rex Dieter <rdieter(a)fedoraproject.org> 1.0.2-6
+- FTBFS OpenEXR_Viewers-1.0.2-3.fc15: ImplicitDSOLinking (#716011)
+
+* Fri May 27 2011 Nicolas Chauvet <kwizart(a)gmail.com> - 1.0.2-5
+- Update gcc44 patch
+- Rebuild for new fltk
+- Drop old Obsoletes OpenEXR-utils < 1.6.0
+
+* Mon Feb 07 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.2-3
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Sun Sep 05 2010 Nicolas Chauvet <kwizart(a)gmail.com> - 1.0.2-2
+- Fix CTL Module search path on lib64
+- Fix OpenEXR_CTL detection at build time.
+
+* Mon Aug 23 2010 Nicolas Chauvet <kwizart(a)gmail.com> - 1.0.2-1
+- Update to 1.0.2
+
+* Tue Oct 20 2009 kwizart < kwizart at
gmail.com > - 1.0.1-7
+- Rebuild for F-12
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.1-6
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Mon Feb 23 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.1-5
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Thu Feb 12 2009 kwizart < kwizart at
gmail.com > - 1.0.1-4
+- Rebuild for gcc44
+
+* Fri Oct 17 2008 kwizart < kwizart at
gmail.com > - 1.0.1-3
+- Rebuild for F-10
+
+* Sat May 10 2008 kwizart < kwizart at
gmail.com > - 1.0.1-2
+- Ghost the alternative provides
+- Obsoletes OpenEXR-utils
+
+* Wed Jan 9 2008 kwizart < kwizart at
gmail.com > - 1.0.1-1
+- Initial package for Fedora
+
diff --git a/namespaceAlias.h b/namespaceAlias.h
new file mode 100644
index 0000000..bf488da
--- /dev/null
+++ b/namespaceAlias.h
@@ -0,0 +1,45 @@
+///////////////////////////////////////////////////////////////////////////
+//
+// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas
+// Digital Ltd. LLC
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Industrial Light & Magic nor the names of
+// its contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+///////////////////////////////////////////////////////////////////////////
+#ifndef NAMESPACEALIAS_H_
+#define NAMESPACEALIAS_H_
+
+#include "ImfNamespace.h"
+#include "ImathNamespace.h"
+#include "IexNamespace.h"
+
+namespace IMF = OPENEXR_IMF_NAMESPACE;
+namespace IMATH = IMATH_NAMESPACE;
+namespace IEX = IEX_NAMESPACE;
+
+#endif /* NAMESPACEALIAS_H_ */
diff --git a/openexr_viewers-2.0.1-dso.patch b/openexr_viewers-2.0.1-dso.patch
new file mode 100644
index 0000000..1409bed
--- /dev/null
+++ b/openexr_viewers-2.0.1-dso.patch
@@ -0,0 +1,37 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -77,6 +77,18 @@ AM_PATH_PKGCONFIG(
+ [-lIlmImfCtl -lIlmImf -lz -lImath -lHalf -lIex -lIlmThread -lpthread -lIlmCtlSimd
-lIlmCtlMath -lIlmCtl],
+ [openexrctl-prefix])
+
++dnl
++dnl check gl
++dnl
++AM_PATH_PKGCONFIG(
++ [GL_CFLAGS],
++ [GL_LDFLAGS],
++ [GL_LIBS],
++ [gl],
++ ,
++ [$LIB64_IF_EXISTS -L/usr/local/lib],
++ [-lGL],
++ [gl-prefix])
+
+ dnl Enable and choose c++ standard
+ AC_ARG_ENABLE(cxxstd,
+--- a/exrdisplay/Makefile.am
++++ b/exrdisplay/Makefile.am
+@@ -5,11 +5,12 @@ if HAVE_FLTK
+ bin_PROGRAMS = exrdisplay
+
+ INCLUDES = @OPENEXR_CXXFLAGS@ \
+- @GL_CXXFLAGS@ @CG_CXXFLAGS@ @FLTK_CXXFLAGS@ -I$(top_builddir) \
++ @GL_CFLAGS@ @GL_CXXFLAGS@ @CG_CXXFLAGS@ @FLTK_CXXFLAGS@ -I$(top_builddir) \
+ @OPENEXR_CTL_CXXFLAGS@
+
+ LDADD = @OPENEXR_LDFLAGS@ @OPENEXR_LIBS@ \
+ @OPENEXR_CTL_LDFLAGS@ @OPENEXR_CTL_LIBS@ \
++ @GL_LDFLAGS@ @GL_LIBS@ \
+ @CG_LDFLAGS@ @FLTK_LDFLAGS@
+
+ all-local:
diff --git a/openexr_viewers-2.1.0-headers.patch b/openexr_viewers-2.1.0-headers.patch
new file mode 100644
index 0000000..ea4c931
--- /dev/null
+++ b/openexr_viewers-2.1.0-headers.patch
@@ -0,0 +1,13 @@
+diff -up openexr_viewers-2.1.0/exrdisplay/Makefile.am.headers
openexr_viewers-2.1.0/exrdisplay/Makefile.am
+--- openexr_viewers-2.1.0/exrdisplay/Makefile.am.headers 2014-01-31 10:09:46.514343641
-0600
++++ openexr_viewers-2.1.0/exrdisplay/Makefile.am 2014-01-31 10:11:59.636924846 -0600
+@@ -44,7 +44,8 @@ noinst_HEADERS = \
+ scaleImage.h \
+ applyCtl.h \
+ GlWindow3d.h \
+- GlWindow3d.cpp
++ GlWindow3d.cpp \
++ namespaceAlias.h
+
+ EXTRA_DIST = $(exrdisplay_SOURCES)
+
diff --git a/openexr_viewers-gcc-11-fixes.patch b/openexr_viewers-gcc-11-fixes.patch
new file mode 100644
index 0000000..24e8334
--- /dev/null
+++ b/openexr_viewers-gcc-11-fixes.patch
@@ -0,0 +1,67 @@
+diff -ur openexr_viewers-2.3.0/exrdisplay/ImageView.cpp
openexr_viewers-2.3.0.orig/exrdisplay/ImageView.cpp
+--- openexr_viewers-2.3.0/exrdisplay/ImageView.cpp 2022-01-03 16:09:36.458801342 +0100
++++ openexr_viewers-2.3.0.orig/exrdisplay/ImageView.cpp 2022-01-03 16:06:43.121271236
+0100
+@@ -50,6 +50,7 @@
+
+ #include <algorithm>
+ #include <stdio.h>
++#include <limits>
+
+ #if defined PLATFORM_WINDOWS || defined _WIN32
+ #include <windows.h>
+@@ -170,8 +171,8 @@
+ //
+ // find zmax and zmin values of deep data to set bound
+ //
+- float zmax = limits<float>::min();
+- float zmin = limits<float>::max();
++ float zmax = std::numeric_limits<float>::min();
++ float zmin = std::numeric_limits<float>::max();
+ _maxCount = 0;
+
+ for (int k = 0; k < _zsize; k++)
+diff -ur openexr_viewers-2.3.0/exrdisplay/main.cpp
openexr_viewers-2.3.0.orig/exrdisplay/main.cpp
+--- openexr_viewers-2.3.0/exrdisplay/main.cpp 2022-01-03 16:09:36.460801325 +0100
++++ openexr_viewers-2.3.0.orig/exrdisplay/main.cpp 2022-01-03 16:05:04.747106129 +0100
+@@ -69,6 +69,7 @@
+ #include <algorithm>
+ #include <string>
+ #include <exception>
++#include <limits>
+ #include <string.h>
+ #include <stdlib.h>
+
+@@ -781,7 +782,7 @@
+
+ int lx = -1;
+ int ly = -1;
+- float farPlane = limits<float>::max(); //default value of zfar plane
++ float farPlane = numeric_limits<float>::max(); //default value of zfar plane
+ bool deepComp = true; // attempt to composite deep images together
+
+ //
+diff -ur openexr_viewers-2.3.0/exrdisplay/scaleImage.cpp
openexr_viewers-2.3.0.orig/exrdisplay/scaleImage.cpp
+--- openexr_viewers-2.3.0/exrdisplay/scaleImage.cpp 2022-01-03 16:09:36.458801342 +0100
++++ openexr_viewers-2.3.0.orig/exrdisplay/scaleImage.cpp 2022-01-03 16:09:04.024076387
+0100
+@@ -195,8 +195,8 @@
+ void
+ normalizePixels (int dw, int dh, Array<Rgba> &pixels)
+ {
+- float pMax = -IMATH::limits<float>::max ();
+- float pMin = IMATH::limits<float>::max ();
++ float pMax = std::numeric_limits<float>::max ();
++ float pMin = std::numeric_limits<float>::min ();
+
+ for (int i = 0; i < dw * dh; ++i)
+ {
+diff -ur openexr_viewers-2.3.0/playexr/FileReadingThread.cpp
openexr_viewers-2.3.0.orig/playexr/FileReadingThread.cpp
+--- openexr_viewers-2.3.0/playexr/FileReadingThread.cpp 2022-01-03 16:09:36.454801376
+0100
++++ openexr_viewers-2.3.0.orig/playexr/FileReadingThread.cpp 2022-01-03
16:01:09.931103948 +0100
+@@ -41,6 +41,7 @@
+ #include "FileReadingThread.h"
+ #include "fileNameForFrame.h"
+ #include "ImageBuffers.h"
++#include <ImfHeader.h>
+ #include <ImfInputFile.h>
+ #include <Iex.h>
+ #include <iostream>
diff --git a/openexr_viewers-imfheader.patch b/openexr_viewers-imfheader.patch
new file mode 100644
index 0000000..42c6282
--- /dev/null
+++ b/openexr_viewers-imfheader.patch
@@ -0,0 +1,36 @@
+diff -ur openexr_viewers-2.3.0/exrdisplay/ImageView.cpp
openexr_viewers-2.3.0-header/exrdisplay/ImageView.cpp
+--- openexr_viewers-2.3.0/exrdisplay/ImageView.cpp 2022-01-03 16:33:02.598890275 +0100
++++ openexr_viewers-2.3.0-header/exrdisplay/ImageView.cpp 2022-01-03 16:32:38.322095618
+0100
+@@ -44,7 +44,7 @@
+
+ #include <ImathMath.h>
+ #include <ImathFun.h>
+-#include <ImathLimits.h>
++#include <ImfHeader.h>
+ #include <halfFunction.h>
+
+
+diff -ur openexr_viewers-2.3.0/exrdisplay/main.cpp
openexr_viewers-2.3.0-header/exrdisplay/main.cpp
+--- openexr_viewers-2.3.0/exrdisplay/main.cpp 2022-01-03 16:33:02.598890275 +0100
++++ openexr_viewers-2.3.0-header/exrdisplay/main.cpp 2022-01-03 16:32:38.324095601 +0100
+@@ -63,7 +63,7 @@
+ #include <ImfArray.h>
+ #include <ImfThreading.h>
+ #include <ImfMultiPartInputFile.h>
+-#include <ImathLimits.h>
++#include <ImfHeader.h>
+
+ #include <iostream>
+ #include <algorithm>
+diff -ur openexr_viewers-2.3.0/exrdisplay/scaleImage.cpp
openexr_viewers-2.3.0-header/exrdisplay/scaleImage.cpp
+--- openexr_viewers-2.3.0/exrdisplay/scaleImage.cpp 2022-01-03 16:33:02.598890275 +0100
++++ openexr_viewers-2.3.0-header/exrdisplay/scaleImage.cpp 2022-01-03 16:32:38.323095609
+0100
+@@ -41,7 +41,7 @@
+
+ #include "scaleImage.h"
+
+-#include <ImathLimits.h>
++#include <ImfHeader.h>
+ #include <ImathFun.h>
+ #include <algorithm>
+ #include <math.h>
diff --git a/sources b/sources
new file mode 100644
index 0000000..5126021
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (OpenEXR_Viewers-2.3.0.tar.gz) =
2b7ce7c75733f390bec5c3f9c49edc08da2631e3a45ae20a732dddf9fd813137c3124d0c6e90450fa2b9068f0c40c76374ee7ff9cf0d8697080b2b180c624c5d