From 773b933c8612ac080869dd992292c851daaa2e2f Mon Sep 17 00:00:00 2001 From: weidong Date: Tue, 1 Mar 2022 16:21:04 +0800 Subject: [PATCH] fix build failue Signed-off-by: wei dong (cherry picked from commit a993bb5efc14831afca9905a502727145955f36d) --- Fix-build-failure-with-OpenEXR-3.0.patch | 79 ++++++++++++++++++++++++ freeimage.spec | 6 +- 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 Fix-build-failure-with-OpenEXR-3.0.patch diff --git a/Fix-build-failure-with-OpenEXR-3.0.patch b/Fix-build-failure-with-OpenEXR-3.0.patch new file mode 100644 index 0000000..fb5e93a --- /dev/null +++ b/Fix-build-failure-with-OpenEXR-3.0.patch @@ -0,0 +1,79 @@ +From 62886972a16fe1a8df6443bf04f90d668902052a Mon Sep 17 00:00:00 2001 +From: wei dong +Date: Tue, 1 Mar 2022 17:06:24 +0800 +Subject: [PATCH] Source/FreeImage/PluginTIFF.cpp + +Signed-off-by: wei dong +--- + Source/FreeImage/PluginEXR.cpp | 12 ++++++------ + Source/FreeImage/PluginTIFF.cpp | 4 +++- + 2 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/Source/FreeImage/PluginEXR.cpp b/Source/FreeImage/PluginEXR.cpp +index 9bf3ada..4980c7b 100644 +--- a/Source/FreeImage/PluginEXR.cpp ++++ b/Source/FreeImage/PluginEXR.cpp +@@ -2,7 +2,7 @@ + // EXR Loader and writer + // + // Design and implementation by +-// - Hervé Drolon (drolon@infonie.fr) ++// - HervĂ© Drolon (drolon@infonie.fr) + // - Mihail Naydenov (mnaydenov@users.sourceforge.net) + // + // This file is part of FreeImage 3 +@@ -37,7 +37,7 @@ + #include + #include + #include +-#include ++#include + + + // ========================================================== +@@ -66,11 +66,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 +100,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); + } + }; +diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp +index f0ac0d0..b159aed 100644 +--- a/Source/FreeImage/PluginTIFF.cpp ++++ b/Source/FreeImage/PluginTIFF.cpp +@@ -39,7 +39,9 @@ + #include "Utilities.h" + #include + #include "../Metadata/FreeImageTag.h" +-#include ++#include ++#include ++#include + + #include "FreeImageIO.h" + #include "PSDParser.h" +-- +2.27.0 + diff --git a/freeimage.spec b/freeimage.spec index 49a1359..b8553f7 100644 --- a/freeimage.spec +++ b/freeimage.spec @@ -5,7 +5,7 @@ Name: freeimage Version: 3.18.0 -Release: 6 +Release: 7 Summary: FreeImage is a library project for developers who would like to support popular graphics image formats (PNG, JPEG, TIFF, BMP and others) License: GPLv2 or GPLv3 and FIPL URL: https://freeimage.sourceforge.io/ @@ -21,6 +21,7 @@ Patch3: FreeImage_doxygen.patch # Fix incorrect variable names in BIGENDIAN blocks Patch4: FreeImage_bigendian.patch Patch5: substream.patch +Patch6: Fix-build-failure-with-OpenEXR-3.0.patch BuildRequires: doxygen gcc-c++ make jxrlib-devel libjpeg-devel libmng-devel libpng-devel libtiff-devel libwebp-devel LibRaw-devel OpenEXR-devel openjpeg2-devel @@ -105,6 +106,9 @@ ldconfig -n %{buildroot}%{_libdir} %changelog +* Tue Mar 01 2022 weidong -3.18.0-7 +- Fix build error + * Tue Feb 09 2021 Jiachen Fan -3.18.0-6 - correct the substream.patch: correct the line