fix build failue

Signed-off-by: wei dong <weidong@uniontech.com>
(cherry picked from commit a993bb5efc14831afca9905a502727145955f36d)
This commit is contained in:
weidong 2022-03-01 16:21:04 +08:00 committed by openeuler-sync-bot
parent e7dad3bdd1
commit 773b933c86
2 changed files with 84 additions and 1 deletions

View File

@ -0,0 +1,79 @@
From 62886972a16fe1a8df6443bf04f90d668902052a Mon Sep 17 00:00:00 2001
From: wei dong <weidong@uniontech.com>
Date: Tue, 1 Mar 2022 17:06:24 +0800
Subject: [PATCH] Source/FreeImage/PluginTIFF.cpp
Signed-off-by: wei dong <weidong@uniontech.com>
---
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 <OpenEXR/ImfRgba.h>
#include <OpenEXR/ImfArray.h>
#include <OpenEXR/ImfPreviewImage.h>
-#include <OpenEXR/half.h>
+#include <Imath/half.h>
// ==========================================================
@@ -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 <tiffio.h>
#include "../Metadata/FreeImageTag.h"
-#include <OpenEXR/half.h>
+#include <Imath/ImathVec.h>
+#include <Imath/half.h>
+#include <Imath/half.h>
#include "FreeImageIO.h"
#include "PSDParser.h"
--
2.27.0

View File

@ -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 <weidong@uniontech.com> -3.18.0-7
- Fix build error
* Tue Feb 09 2021 Jiachen Fan <fanjiachen3@huawei.com> -3.18.0-6
- correct the substream.patch: correct the line