Compare commits

..

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

6 changed files with 28 additions and 322 deletions

2
.gitignore vendored
View File

@ -4,5 +4,3 @@ pfstools-1.8.1.tar.gz
/pfstools-2.0.4.tgz
/pfstools-2.0.5.tgz
/pfstools-2.0.6.tgz
/pfstools-2.1.0.tgz
/pfstools-2.2.0.tgz

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,68 +0,0 @@
--- a/src/pfsglview/CMakeLists.txt~ 2017-11-13 11:38:26.000000000 -0600
+++ a/src/pfsglview/CMakeLists.txt 2019-09-19 10:07:11.350642598 -0500
@@ -1,5 +1,5 @@
-include_directories ("${PROJECT_BINARY_DIR}/" "${PROJECT_SOURCE_DIR}/src/pfs" ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS})
+include_directories ("${PROJECT_BINARY_DIR}/" "${PROJECT_SOURCE_DIR}/src/pfs" ${OPENGL_INCLUDE_DIRS} ${FreeGLUT_INCLUDE_DIRS})
if( NOT HAS_GETOPT )
include_directories ("${GETOPT_INCLUDE}")
endif( NOT HAS_GETOPT )
@@ -11,8 +11,8 @@
add_executable(pfsglview pfsglview.cpp picture_io.cpp module.cpp m_histogram.cpp m_status.cpp m_on_screen_display.cpp)
-# TODO: Use ${GLUT_LIBRARY} instead.
-target_link_libraries(pfsglview ${OPENGL_LIBRARIES} ${GLUT_glut_LIBRARY} pfs)
+# TODO: Use ${FreeGLUT_LIBRARY} instead.
+target_link_libraries(pfsglview ${OPENGL_LIBRARIES} -lglut pfs)
install (TARGETS pfsglview DESTINATION bin)
install (FILES pfsglview.1 DESTINATION ${MAN_DIR})
--- a/src/CMakeLists.txt~ 2017-11-13 11:38:28.000000000 -0600
+++ a/src/CMakeLists.txt 2019-09-19 10:19:30.051372391 -0500
@@ -18,9 +18,9 @@
add_subdirectory (matlab)
endif( MATLAB_FOUND )
-if( OPENGL_FOUND AND GLUT_FOUND )
+if( OPENGL_FOUND AND FreeGLUT_FOUND )
add_subdirectory (pfsglview)
-endif( OPENGL_FOUND AND GLUT_FOUND )
+endif( OPENGL_FOUND AND FreeGLUT_FOUND )
if( WITH_HDRVC )
add_subdirectory (hdrvc)
--- a/CMakeLists.txt~ 2017-11-13 11:38:18.000000000 -0600
+++ a/CMakeLists.txt 2019-09-19 10:36:27.025771833 -0500
@@ -221,17 +221,17 @@
find_path(OPENGL_INCLUDE_DIR GL/gl.h )
find_package(OpenGL )
-find_package(GLUT )
+find_package(FreeGLUT )
if( NOT OPENGL_FOUND )
MESSAGE( STATUS "OpenGL not found. The following command will not be
compiled: pfsglview. " )
endif( NOT OPENGL_FOUND )
-if( NOT GLUT_FOUND )
+if( NOT FreeGLUT_FOUND )
MESSAGE( STATUS "GLUT not found. The following command will not be
compiled: pfsglview. " )
-endif( NOT GLUT_FOUND )
+endif( NOT FreeGLUT_FOUND )
endif( WITH_pfsglview )
--- a/src/pfsglview/glenv.h~ 2017-11-13 11:38:26.000000000 -0600
+++ a/src/pfsglview/glenv.h 2019-09-19 10:43:41.179049107 -0500
@@ -11,7 +11,7 @@
#if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__)
#include <windef.h>
#endif
-#include "GL/glut.h"
+#include "GL/freeglut.h"
#include "GL/gl.h"
#include "GL/glu.h"
#include "GL/glext.h"

View File

@ -1,28 +1,24 @@
Name: pfstools
Version: 2.2.0
Release: 16%{?dist}
Version: 2.0.6
Release: 3%{?dist}
Summary: Programs for handling high-dynamic range images
License: GPL-2.0-or-later
Group: Applications/Multimedia
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
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: make
BuildRequires: cmake
BuildRequires: libtiff-devel
BuildRequires: cmake(OpenEXR)
BuildRequires: openexr-devel
BuildRequires: octave-devel
BuildRequires: libGL-devel
BuildRequires: ImageMagick-devel
BuildRequires: freeglut-devel
BuildRequires: ImageMagick-c++-devel
BuildRequires: perl-generators
BuildRequires: pkgconfig(Qt5)
BuildRequires: qt4-devel
BuildRequires: libXi-devel
BuildRequires: netpbm-devel
BuildRequires: texlive-latex
@ -40,6 +36,7 @@ pfstools is similar to netpbm package for low-dynamic range images.
%package -n pfscalibration
Summary: Scripts and programs for photometric calibration
Group: Applications/Multimedia
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: perl-interpreter
Requires: dcraw
@ -54,6 +51,7 @@ range (HDR) images from the set of low dynamic range (LDR) exposures.
%package -n pfstmo
Summary: PFS tone mapping operators
Group: Applications/Multimedia
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description -n pfstmo
@ -65,6 +63,7 @@ images and animations.
%package libs
Summary: Libraries for HDR processing
Group: System Environment/Libraries
License: LGPLv2+
%description libs
@ -74,15 +73,17 @@ handling HDR graphics files.
%package qt
Summary: Qt-based viewer for HDR files
Group: Applications/Multimedia
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description qt
The pfstools-qt package contains viewer programs based on Qt5 for
The pfstools-qt package contains viewer programs based on qt4 for
viewing HDR graphics files.
%package glview
Summary: GL-based viewer for HDR files
Group: Applications/Multimedia
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description glview
@ -92,6 +93,7 @@ viewing HDR graphics files.
%package exr
Summary: EXR file import for PFS tools
Group: Applications/Multimedia
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description exr
@ -101,6 +103,7 @@ to and from the HDR graphics file format used in pfstools.
%package imgmagick
Summary: ImageMagick file import for PFS tools
Group: Applications/Multimedia
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description imgmagick
@ -110,6 +113,7 @@ ImageMagick to and from the HDR graphics file format used in pfstools.
%package octave
Summary: Octave interaction with PFS tools
Group: Applications/Multimedia
Requires: octave(api) = %{octave_api}
%description octave
@ -119,6 +123,7 @@ channels or luminance channels in pfs stream using Octave.
%package devel
Summary: Files for development with PFS tools
Group: Development/Libraries
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel
@ -127,20 +132,14 @@ etc., for developing programs which can handle HDR graphics files.
%prep
%autosetup -p1
%setup -q
%build
%{?el7:export CXXFLAGS="%{optflags} -std=gnu++11"}
%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}
make
%install
%{cmake_install}
make install DESTDIR=$RPM_BUILD_ROOT
# XXX Nuke unpackaged files
{ cd ${RPM_BUILD_ROOT}
@ -150,8 +149,14 @@ export CXXFLAGS="%{optflags} -std=gnu++11"
}
%clean
rm -rf $RPM_BUILD_ROOT
%ldconfig_scriptlets libs
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%files
@ -170,14 +175,12 @@ export CXXFLAGS="%{optflags} -std=gnu++11"
%{_bindir}/pfsinppm
%{_bindir}/pfsinrgbe
%{_bindir}/pfsintiff
%{_bindir}/pfsinyuv
%{_bindir}/pfsout
%{_bindir}/pfsouthdrhtml
%{_bindir}/pfsoutpfm
%{_bindir}/pfsoutppm
%{_bindir}/pfsoutrgbe
%{_bindir}/pfsouttiff
%{_bindir}/pfsoutyuv
%{_bindir}/pfspad
%{_bindir}/pfspanoramic
%{_bindir}/pfsrotate
@ -185,8 +188,6 @@ export CXXFLAGS="%{optflags} -std=gnu++11"
%{_bindir}/pfstag
%{_bindir}/pfscolortransform
%{_bindir}/pfsretime
%{_bindir}/pfs_automerge
%{_bindir}/pfs_split_exposures.py
%{_datadir}/pfstools/hdrhtml_c_b2.csv
%{_datadir}/pfstools/hdrhtml_c_b3.csv
%{_datadir}/pfstools/hdrhtml_c_b4.csv
@ -211,14 +212,12 @@ export CXXFLAGS="%{optflags} -std=gnu++11"
%{_mandir}/man1/pfsinppm.1.gz
%{_mandir}/man1/pfsinrgbe.1.gz
%{_mandir}/man1/pfsintiff.1.gz
%{_mandir}/man1/pfsinyuv.1.gz
%{_mandir}/man1/pfsout.1.gz
%{_mandir}/man1/pfsouthdrhtml.1.gz
%{_mandir}/man1/pfsoutpfm.1.gz
%{_mandir}/man1/pfsoutppm.1.gz
%{_mandir}/man1/pfsoutrgbe.1.gz
%{_mandir}/man1/pfsouttiff.1.gz
%{_mandir}/man1/pfsoutyuv.1.gz
%{_mandir}/man1/pfspad.1.gz
%{_mandir}/man1/pfspanoramic.1.gz
%{_mandir}/man1/pfsrotate.1.gz
@ -226,7 +225,6 @@ export CXXFLAGS="%{optflags} -std=gnu++11"
%{_mandir}/man1/pfstag.1.gz
%{_mandir}/man1/pfscolortransform.1.gz
%{_mandir}/man1/pfsretime.1.gz
%{_mandir}/man1/pfs_automerge.1.gz
%doc
%files -n pfscalibration
@ -307,137 +305,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
* Wed Oct 20 2021 Tomas Smetana <tsmetana@redhat.com> - 2.2.0-1
- Rebase to upstream 2.2.0 verison, drop upstreamed patches
* Wed Aug 11 2021 Orion Poplawski <orion@nwra.com> - 2.1.0-20
- Rebuild for octave 6.3.0
* Sun Aug 01 2021 Richard Shaw <hobbes1069@gmail.com> - 2.1.0-19
- Move to openexr2 compat package.
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jan 12 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.1.0-16
- rebuild against New OpenEXR again
* 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
- Force C++11 as this code is not C++17 ready
* Thu Aug 06 2020 Tomas Smetana <tsmetana@redhat.com> - 2.1.0-13
- Fix #1865214: Update spec for new cmake
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-12
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Sep 17 2019 Gwyn Ciesla <gwync@protonmail.com> - 2.1.0-9
- Rebuilt for new freeglut
* Tue Aug 20 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.1.0-8
- Rebuilt for GSL 2.6.
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Jun 16 2019 Orion Poplawski <orion@nwra.com> - 2.1.0-6
- Rebuild for octave 5.1
* Thu Apr 11 2019 Richard Shaw <hobbes1069@gmail.com> - 2.1.0-5
- Rebuild for OpenEXR 2.3.0.
* Wed Feb 13 2019 Tomas Smetana <tsmetana@redhat.com> - 2.1.0-4
- Bump release
* Wed Feb 13 2019 Tomas Smetana <tsmetana@redhat.com> - 2.1.0-3
- Rebuild (FTBFS with new cmake)
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sun Nov 11 2018 Orion Poplawski <orion@cora.nwra.com> - 2.1.0-1
- Update to 2.1.0
- Switch to Qt5
- Rebuild for octave 4.4
* Tue Aug 28 2018 Michael Cronenworth <mike@cchtml.com> - 2.0.6-9
- Rebuild for ImageMagick 6.9.10
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Sep 08 2017 Tomas Smetana <tsmetana@redhat.com> - 2.0.6-6
- Rebuild for new ImageMagick
* Tue Aug 29 2017 Tomas Smetana <tsmetana@redhat.com> - 2.0.6-5
- Rebuild for new ImageMagick
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Sun Jul 30 2017 Kevin Fenzi <kevin@scrye.com> - 2.0.6-3
- Rebuild for new ImageMagick

View File

@ -1 +1 @@
SHA512 (pfstools-2.2.0.tgz) = 3a82fa44f6f67ba45203db9c5108df78176f1ad375042fe14e9108f4c9b5d46798e4a1544d842b50e4e326c1063808e095b46d35f374cb5ee5fb2fa1d93bcf8c
SHA512 (pfstools-2.0.6.tgz) = 228294bc985dd549e0741fc3bbbafd2de3ea8cfd7165d689e8d56f0cf687ec8d085dcb2ff2285ca2af6692c10b54f567c7627a13a9ae600f8e5c030ec7a73ae1