public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Richard Shaw <hobbes1069@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/freeimage] epel10.3: Update for OpenEXR/Imath 3.
Date: Wed, 18 Nov 2026 02:42:04 GMT	[thread overview]
Message-ID: <179496972472.1.10617632547462186102.rpms-freeimage-de4342e12247@fedoraproject.org> (raw)

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
 

                 reply	other threads:[~2026-11-18  2:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179496972472.1.10617632547462186102.rpms-freeimage-de4342e12247@fedoraproject.org \
    --to=hobbes1069@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox