public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/freeimage] epel10.3: Update for OpenEXR/Imath 3.
@ 2026-11-18 2:42 Richard Shaw
0 siblings, 0 replies; only message in thread
From: Richard Shaw @ 2026-11-18 2:42 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/freeimage
Branch : epel10.3
Commit : de4342e12247d5d20e5e48586f0037f5215f7706
Author : Richard Shaw <hobbes1069@gmail.com>
Date : 2021-08-01T20:33:54-05:00
Stats : +98/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/freeimage/c/de4342e12247d5d20e5e48586f0037f5215f7706?branch=epel10.3
Log:
Update for OpenEXR/Imath 3.
---
diff --git a/freeimage-openexr3.patch b/freeimage-openexr3.patch
new file mode 100644
index 0000000..4bb6c51
--- /dev/null
+++ b/freeimage-openexr3.patch
@@ -0,0 +1,87 @@
+Index: freeimage-svn-r1859-FreeImage-trunk/Source/FreeImage/PluginEXR.cpp
+===================================================================
+--- freeimage-svn-r1859-FreeImage-trunk.orig/Source/FreeImage/PluginEXR.cpp
++++ freeimage-svn-r1859-FreeImage-trunk/Source/FreeImage/PluginEXR.cpp
+@@ -37,8 +37,22 @@
+ #include <OpenEXR/ImfRgba.h>
+ #include <OpenEXR/ImfArray.h>
+ #include <OpenEXR/ImfPreviewImage.h>
+-#include <OpenEXR/half.h>
+-
++// The version can reliably be found in this header file from OpenEXR,
++// for both 2.x and 3.x:
++#include <OpenEXR/OpenEXRConfig.h>
++#define COMBINED_OPENEXR_VERSION ((10000*OPENEXR_VERSION_MAJOR) + \
++ (100*OPENEXR_VERSION_MINOR) + \
++ OPENEXR_VERSION_PATCH)
++
++// There's just no easy way to have an `#include` that works in both
++// cases, so we use the version to switch which set of include files we
++// use.
++#if COMBINED_OPENEXR_VERSION >= 20599 /* 2.5.99: pre-3.0 */
++# include <Imath/half.h>
++#else
++ // OpenEXR 2.x, use the old locations
++# include <OpenEXR/half.h>
++#endif
+
+ // ==========================================================
+ // Plugin Interface
+@@ -66,11 +80,11 @@ public:
+ return ((unsigned)n != _io->read_proc(c, 1, n, _handle));
+ }
+
+- virtual Imath::Int64 tellg() {
++ virtual uint64_t tellg() {
+ return _io->tell_proc(_handle);
+ }
+
+- virtual void seekg(Imath::Int64 pos) {
++ virtual void seekg(uint64_t pos) {
+ _io->seek_proc(_handle, (unsigned)pos, SEEK_SET);
+ }
+
+@@ -100,11 +114,11 @@ public:
+ }
+ }
+
+- virtual Imath::Int64 tellp() {
++ virtual uint64_t tellp() {
+ return _io->tell_proc(_handle);
+ }
+
+- virtual void seekp(Imath::Int64 pos) {
++ virtual void seekp(uint64_t pos) {
+ _io->seek_proc(_handle, (unsigned)pos, SEEK_SET);
+ }
+ };
+Index: freeimage-svn-r1859-FreeImage-trunk/Source/FreeImage/PluginTIFF.cpp
+===================================================================
+--- freeimage-svn-r1859-FreeImage-trunk.orig/Source/FreeImage/PluginTIFF.cpp
++++ freeimage-svn-r1859-FreeImage-trunk/Source/FreeImage/PluginTIFF.cpp
+@@ -39,7 +39,24 @@
+ #include "Utilities.h"
+ #include <tiffio.h>
+ #include "../Metadata/FreeImageTag.h"
+-#include <OpenEXR/half.h>
++// The version can reliably be found in this header file from OpenEXR,
++// for both 2.x and 3.x:
++#include <OpenEXR/OpenEXRConfig.h>
++#define COMBINED_OPENEXR_VERSION ((10000*OPENEXR_VERSION_MAJOR) + \
++ (100*OPENEXR_VERSION_MINOR) + \
++ OPENEXR_VERSION_PATCH)
++
++// There's just no easy way to have an `#include` that works in both
++// cases, so we use the version to switch which set of include files we
++// use.
++#if COMBINED_OPENEXR_VERSION >= 20599 /* 2.5.99: pre-3.0 */
++# include <Imath/ImathVec.h>
++# include <Imath/half.h>
++#else
++ // OpenEXR 2.x, use the old locations
++# include <OpenEXR/ImathVec.h>
++# include <OpenEXR/half.h>
++#endif
+
+ #include "FreeImageIO.h"
+ #include "PSDParser.h"
diff --git a/freeimage.spec b/freeimage.spec
index ec351a9..57f2886 100644
--- a/freeimage.spec
+++ b/freeimage.spec
@@ -6,7 +6,7 @@
Name: freeimage
Version: 3.19.0
-Release: 0.4%{?svn_rev:.svn%svn_rev}%{?dist}
+Release: 0.5%{?svn_rev:.svn%svn_rev}%{?dist}
Summary: Multi-format image decoder library
# freeimage is tripple-licensed, see
@@ -24,6 +24,8 @@ Source: http://downloads.sourceforge.net/%{name}/FreeImage%(echo %{versio
Patch0: FreeImage_unbundle.patch
# Fix incorrect path in doxyfile
Patch1: FreeImage_doxygen.patch
+# Patch for openexr 3
+Patch2: freeimage-openexr3.patch
BuildRequires: doxygen
BuildRequires: gcc-c++
@@ -35,7 +37,12 @@ BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: libwebp-devel
BuildRequires: LibRaw-devel
+%if 0%{?fedora} > 34
+BuildRequires: openexr-devel
+BuildRequires: imath-devel
+%else
BuildRequires: OpenEXR-devel
+%endif
BuildRequires: openjpeg2-devel
%description
@@ -151,6 +158,9 @@ ldconfig -n %{buildroot}%{_libdir}
%changelog
+* Mon Aug 02 2021 Richard Shaw <hobbes1069@gmail.com> - 3.19.0-0.5.svn1859
+- Update for OpenEXR/Imath 3.
+
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.19.0-0.4.svn1859
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-18 2:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18 2:42 [rpms/freeimage] epel10.3: Update for OpenEXR/Imath 3 Richard Shaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox