Compare commits

..

No commits in common. "rawhide" and "f36" have entirely different histories.
rawhide ... f36

3 changed files with 18 additions and 148 deletions

View File

@ -1,35 +0,0 @@
From 95c5e87b8fe19cc6d067e1c2ce6239a5ba413a1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Mon, 3 Jan 2022 06:09:25 +0100
Subject: [PATCH] Prefer upstream CMake Config Mode files for OpenEXR
The bundled FindOpenEXR.cmake Find Module is quite outdated, import
the OpenEXR target from its upstream definition.
---
CMakeLists.txt | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b2923cf..a33293b 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,7 +106,15 @@ OPTION(WITH_OpenEXR "Compile with OpenEXR library" ON)
if( WITH_OpenEXR )
-find_package (OpenEXR)
+find_package (OpenEXR NO_MODULE)
+if( TARGET OpenEXR::OpenEXR )
+ set( OPENEXR_FOUND TRUE )
+ set( OPENEXR_LIBRARIES OpenEXR::OpenEXR )
+ get_target_property( OPENEXR_INCLUDE_DIR OpenEXR::OpenEXR INTERFACE_INCLUDE_DIRECTORIES )
+else ()
+ find_package (OpenEXR MODULE)
+endif ()
+
if( NOT OPENEXR_FOUND )
MESSAGE( STATUS "OpenEXR not found. The following command will not be
compiled: pfsinexr pfsoutexr. " )
--
2.34.1

View File

@ -1,56 +0,0 @@
diff --git a/src/fileformat/pfsinimgmagick.cpp b/src/fileformat/pfsinimgmagick.cpp
index 5dab440..f4358ce 100644
--- a/src/fileformat/pfsinimgmagick.cpp
+++ b/src/fileformat/pfsinimgmagick.cpp
@@ -35,6 +35,7 @@
#define PROG_NAME "pfsinimgmagick"
+using namespace Magick;
class QuietException
{
@@ -114,7 +115,11 @@ void readFrames( int argc, char* argv[] )
Magick::Image imImage( ff.fileName );
VERBOSE_STR << "input image gamma: " << imImage.gamma() << std::endl;
+#if MagickLibVersion >= 0x700
+ bool hasAlpha = imImage.alpha();
+#else
bool hasAlpha = imImage.matte();
+#endif
if( hasAlpha )
VERBOSE_STR << "alpha channel found" << std::endl;
@@ -129,17 +134,30 @@ void readFrames( int argc, char* argv[] )
// Copy line by line to pfs::Frame
int pixInd = 0;
- const float maxValue = (float)(1<<QuantumDepth) - 1;
+ const float maxValue = (float)QuantumRange;
for( int r = 0; r < imImage.rows(); r++ ) {
+#if MagickLibVersion >= 0x700
+ const Magick::Quantum *pixels =
+#else
const Magick::PixelPacket *pixels =
+#endif
imImage.getConstPixels( 0, r, imImage.columns(), 1 );
for( int c = 0; c < imImage.columns(); c++ ) {
+#if MagickLibVersion >= 0x700
+ (*X)(pixInd) = (float)MagickCore::GetPixelRed(imImage.image(), pixels) / maxValue;
+ (*Y)(pixInd) = (float)MagickCore::GetPixelGreen(imImage.image(), pixels) / maxValue;
+ (*Z)(pixInd) = (float)MagickCore::GetPixelBlue(imImage.image(), pixels) / maxValue;
+ if( alpha != NULL )
+ (*alpha)(pixInd) = (float)MagickCore::GetPixelAlpha(imImage.image(), pixels) / maxValue;
+ pixels += MagickCore::GetPixelChannels(imImage.image());
+#else
(*X)(pixInd) = (float)pixels[c].red / maxValue;
(*Y)(pixInd) = (float)pixels[c].green / maxValue;
(*Z)(pixInd) = (float)pixels[c].blue / maxValue;
if( alpha != NULL )
(*alpha)(pixInd) = (float)pixels[c].opacity / maxValue;
+#endif
pixInd++;
}
}

View File

@ -1,21 +1,27 @@
Name: pfstools
Version: 2.2.0
Release: 16%{?dist}
Release: 2%{?dist}
Summary: Programs for handling high-dynamic range images
License: GPL-2.0-or-later
License: GPLv2+
URL: http://pfstools.sourceforge.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz
Patch0: pfstools-freeglut.patch
# From https://sourceforge.net/p/pfstools/bugs/54
Patch1: 0001-Prefer-upstream-CMake-Config-Mode-files-for-OpenEXR.patch
# From openSUSE
Patch2: pfstools-ImageMagick7.patch
BuildRequires: make
BuildRequires: cmake
BuildRequires: libtiff-devel
BuildRequires: cmake(OpenEXR)
# As of OpenEXR 3 upstream has significantly reorganized the libraries
# including splitting out imath as a standalone library (which this project may
# or may not need). Please see
# https://github.com/AcademySoftwareFoundation/Imath/blob/master/docs/PortingGuide2-3.md
# for porting details and encourage upstream to support it. For now a 2.x
# compat package is provided.
%if 0%{?fedora} > 33
BuildRequires: cmake(OpenEXR) < 3
%else
BuildRequires: OpenEXR-devel
%endif
BuildRequires: octave-devel
BuildRequires: libGL-devel
BuildRequires: ImageMagick-devel
@ -134,13 +140,12 @@ etc., for developing programs which can handle HDR graphics files.
%if 0%{?fedora} >= 33
export CXXFLAGS="%{optflags} -std=gnu++11"
%endif
%{cmake} -DBUILD_SHARED_LIBS=ON -DLIB_DIR=%{_lib} -DWITH_OpenCV=OFF
# Not parallel build safe
%global _smp_build_ncpus 1
%{cmake_build}
mkdir -p %{_target_platform}
%{cmake} -B %{_target_platform} -DBUILD_SHARED_LIBS=ON -DLIB_DIR=%{_lib} -DWITH_OpenCV=OFF .
make -C %{_target_platform}
%install
%{cmake_install}
%make_install -C %{_target_platform}
# XXX Nuke unpackaged files
{ cd ${RPM_BUILD_ROOT}
@ -307,50 +312,6 @@ export CXXFLAGS="%{optflags} -std=gnu++11"
%{_includedir}/pfs
%changelog
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Wed Apr 24 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 2.2.0-15
- Rebuilt for openexr 3.2.4
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Apr 08 2023 Orion Poplawski <orion@nwra.com> - 2.2.0-11
- Rebuild with octave 8.1.0
* Fri Mar 31 2023 Tomas Smetana <tsmetana@redhat.com> - 2.2.0-10
- Use SPDX tag for license
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jan 05 2023 Neal Gompa <ngompa@fedoraproject.org> - 2.2.0-8
- Rebuild for ImageMagick 7
* Sun Dec 04 2022 Neal Gompa <ngompa@fedoraproject.org> - 2.2.0-7
- Add patches for upgraded dependency compatibility
+ Add patch for ImageMagick 7 compatibility
+ Add patch for OpenEXR 3+ compatibility
* Tue Aug 23 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.2.0-6
- Rebuild for gsl-2.7.1
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jun 01 2022 Orion Poplawski <orion@nwra.com> - 2.2.0-4
- Rebuild for octave 7.1
* Thu May 12 2022 Orion Poplawski <orion@nwra.com> - 2.2.0-3
- Use current cmake macros (Fix FTBFS)
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
@ -375,7 +336,7 @@ export CXXFLAGS="%{optflags} -std=gnu++11"
* Fri Jan 01 2021 Richard Shaw <hobbes1069@gmail.com> - 2.1.0-15
- Rebuild for OpenEXR 2.5.3.
* Tue Aug 18 2020 Jeff Law <law@redhat.com> - 2.1.0-14
* Tue Aug 14 2020 Jeff Law <law@redhat.com> - 2.1.0-14
- Force C++11 as this code is not C++17 ready
* Thu Aug 06 2020 Tomas Smetana <tsmetana@redhat.com> - 2.1.0-13