--- /dev/null
+--- hugin-2020.0.0/src/hugin_base/panodata/SrcPanoImage.cpp.orig 2020-09-12 12:46:03.000000000 +0200
++++ hugin-2020.0.0/src/hugin_base/panodata/SrcPanoImage.cpp 2023-07-28 22:43:30.687904298 +0200
+@@ -362,7 +362,7 @@ bool SrcPanoImage::readEXIF()
+ pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.CroppedAreaImageWidthPixels"));
+ if (pos != xmpData.end())
+ {
+- croppedWidth = pos->toLong();
++ croppedWidth = pos->toInt64();
+ }
+ else
+ {
+@@ -372,7 +372,7 @@ bool SrcPanoImage::readEXIF()
+ pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.CroppedAreaImageHeightPixels"));
+ if (pos != xmpData.end())
+ {
+- croppedHeight = pos->toLong();
++ croppedHeight = pos->toInt64();
+ }
+ else
+ {
+@@ -386,7 +386,7 @@ bool SrcPanoImage::readEXIF()
+ double hfov = 0;
+ if (pos != xmpData.end())
+ {
+- hfov = 360 * croppedWidth / (double)pos->toLong();
++ hfov = 360 * croppedWidth / (double)pos->toInt64();
+ }
+ else
+ {
+@@ -397,7 +397,7 @@ bool SrcPanoImage::readEXIF()
+ pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.FullPanoHeightPixels"));
+ if (pos != xmpData.end())
+ {
+- fullHeight = pos->toLong();
++ fullHeight = pos->toInt64();
+ }
+ else
+ {
+@@ -408,7 +408,7 @@ bool SrcPanoImage::readEXIF()
+ pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.CroppedAreaTopPixels"));
+ if (pos != xmpData.end())
+ {
+- cropTop = pos->toLong();
++ cropTop = pos->toInt64();
+ }
+ else
+ {
+--- hugin-2020.0.0/src/hugin_base/panodata/Exiv2Helper.cpp.orig 2019-05-15 17:30:47.000000000 +0200
++++ hugin-2020.0.0/src/hugin_base/panodata/Exiv2Helper.cpp 2023-07-29 06:56:08.543554353 +0200
+@@ -40,7 +40,7 @@ namespace HuginBase
+ Exiv2::ExifData::iterator itr = exifData.findKey(Exiv2::ExifKey(keyName));
+ if (itr != exifData.end() && itr->count())
+ {
+- value = itr->toLong();
++ value = itr->toInt64();
+ return true;
+ }
+ else
+@@ -165,7 +165,7 @@ namespace HuginBase
+ {
+ if(it!=exifData.end() && it->count())
+ {
+- return it->toLong();
++ return it->toInt64();
+ }
+ return 0;
+ };
Summary: Toolchain to create panoramic images
Summary(pl.UTF-8): Zestaw narzędzi do tworzenia panoramicznych zdjęć
Name: hugin
-Version: 2020.0.0
+Version: 2022.0.0
Release: 2
License: GPL v2+
Group: X11/Applications/Graphics
-Source0: http://downloads.sourceforge.net/hugin/%{name}-%{version}.tar.bz2
-# Source0-md5: 59e152871b74fb071bc086fc23a4774a
+Source0: https://downloads.sourceforge.net/hugin/%{name}-%{version}.tar.bz2
+# Source0-md5: 76bbd3d0debc8c8483192d832b9377fd
Patch0: %{name}-cppflags.patch
Patch1: python-install.patch
-Patch2: openexr3.patch
-URL: http://hugin.sourceforge.net/
+Patch2: %{name}-exiv2.patch
+URL: https://hugin.sourceforge.io/
BuildRequires: OpenEXR-devel
BuildRequires: OpenGL-glut-devel
BuildRequires: ZThread-devel
-BuildRequires: boost-devel >= 1.41.0
-BuildRequires: cmake >= 2.8
+BuildRequires: boost-devel >= 1.47.0
+BuildRequires: cmake >= 3.8
BuildRequires: exiv2-devel
-BuildRequires: flann-devel
+BuildRequires: fftw3-devel >= 3
+BuildRequires: flann-devel >= 1.9.2-4
BuildRequires: gettext-tools
BuildRequires: glew-devel
-BuildRequires: gtk+2-devel >= 1:2.0.3
+BuildRequires: gtk+3-devel
+BuildRequires: lcms2-devel >= 2
BuildRequires: lensfun-devel
+BuildRequires: libgomp-devel
BuildRequires: libjpeg-devel
BuildRequires: libpano13-devel >= 2.9.19
BuildRequires: libpng-devel
BuildRequires: perl-Image-ExifTool
BuildRequires: perl-tools-pod
BuildRequires: pkgconfig
-BuildRequires: python3-devel
+BuildRequires: python3-devel >= 1:3.0
BuildRequires: rpmbuild(macros) >= 1.605
BuildRequires: sed >= 4.0
+BuildRequires: sqlite3-devel >= 3
BuildRequires: swig-python >= 2.0.4
BuildRequires: tclap
-BuildRequires: vigra-devel
-BuildRequires: wxGTK2-unicode-devel >= 2.8.10
-BuildRequires: wxGTK2-unicode-gl-devel >= 2.8.10
+BuildRequires: vigra-devel >= 1.11.1-14
+BuildRequires: wxGTK3-unicode-devel >= 2.8.10
+BuildRequires: wxGTK3-unicode-gl-devel >= 2.8.10
+BuildRequires: xorg-lib-libX11-devel
BuildRequires: zlib-devel
Requires: libpano13 >= 2.9.19
-Requires: wxGTK2-unicode >= 2.8.10
-Requires: wxGTK2-unicode-gl >= 2.8.10
+Requires: wxGTK3-unicode >= 2.8.10
+Requires: wxGTK3-unicode-gl >= 2.8.10
Suggests: enblend-enfuse >= 3.1
# exiftool program
Suggests: perl-Image-ExifTool
%prep
%setup -q
-%patch0 -p0
+%patch0 -p1
%patch1 -p1
%patch2 -p1
%{__mv} src/translations/{cs_CZ,cs}.po
-%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
- src/hugin_script_interface/hpi.py \
- src/hugin_script_interface/plugins-dev/dual_use.py \
- src/hugin_script_interface/plugins-dev/plugin_skeleton.py \
- src/hugin_script_interface/plugins/top_five.py \
- src/hugin_script_interface/plugins/woa.py
+%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
+ src/hugin_script_interface/hpi.py \
+ src/hugin_script_interface/plugins/top_five.py \
+ src/hugin_script_interface/plugins/woa.py \
+ src/hugin_script_interface/plugins-dev/dual_use.py \
+ src/hugin_script_interface/plugins-dev/plugin_skeleton.py
%build
install -d build
%if "%{_lib}" == "lib64"
-DLIB_SUFFIX=64 \
%endif
- -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-gtk2-unicode-config
+ -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-gtk3-unicode-config
%{__make}
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
-# cmake is so great there is no way to pass proper path
-%{__mv} $RPM_BUILD_ROOT%{_iconsdir}/{gnome,hicolor}
-%{__mv} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/gnome/48x48/* $RPM_BUILD_ROOT%{_iconsdir}/hicolor/48x48/
-%{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/hicolor/gnome/48x48
-
-%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ca_ES*
+%{__mv} $RPM_BUILD_ROOT%{_localedir}/{ca_ES,ca}
+%{__mv} $RPM_BUILD_ROOT%{_localedir}/{ca_ES@valencia,ca@valencia}
%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
%attr(755,root,root) %{py3_sitedir}/_hsi.so
%{py3_sitedir}/hpi.py*
%{py3_sitedir}/hsi.py*
-%{py3_sitedir}/__pycache__/*
+%{py3_sitedir}/__pycache__/hpi.cpython-*.py[co]
+%{py3_sitedir}/__pycache__/hsi.cpython-*.py[co]
%{_datadir}/%{name}
%{_datadir}/metainfo/PTBatcherGUI.appdata.xml
%{_datadir}/metainfo/calibrate_lens_gui.appdata.xml
+++ /dev/null
-Index: hugin-2020.0.0/CMakeLists.txt
-===================================================================
---- hugin-2020.0.0.orig/CMakeLists.txt
-+++ hugin-2020.0.0/CMakeLists.txt
-@@ -214,7 +214,18 @@ ENDIF()
-
- ENDIF()
-
--FIND_PACKAGE(OpenEXR REQUIRED)
-+FIND_PACKAGE(Imath CONFIG)
-+IF(TARGET Imath::Imath)
-+ FIND_PACKAGE(OpenEXR CONFIG REQUIRED)
-+ FIND_PACKAGE(ZLIB REQUIRED)
-+ get_target_property(OPENEXR_INCLUDE_DIR OpenEXR::OpenEXRConfig INTERFACE_INCLUDE_DIRECTORIES)
-+ get_target_property(IMATH_INCLUDE_DIR Imath::ImathConfig INTERFACE_INCLUDE_DIRECTORIES)
-+ list(APPEND OPENEXR_INCLUDE_DIR ${IMATH_INCLUDE_DIR})
-+ set(OPENEXR_LIBRARIES OpenEXR::OpenEXR Imath::Imath ${ZLIB_LIBRARIES})
-+ set(OPENEXR_FOUND TRUE)
-+ELSE()
-+ FIND_PACKAGE(OpenEXR REQUIRED)
-+ENDIF()
- include_directories(${OPENEXR_INCLUDE_DIR})
-
- FIND_PACKAGE(VIGRA 1.9.0 REQUIRED)
-Index: hugin-2020.0.0/src/hugin_base/vigra_ext/ReduceOpenEXR.h
-===================================================================
---- hugin-2020.0.0.orig/src/hugin_base/vigra_ext/ReduceOpenEXR.h
-+++ hugin-2020.0.0/src/hugin_base/vigra_ext/ReduceOpenEXR.h
-@@ -25,8 +25,8 @@
- #include <vigra_ext/HDRUtils.h>
- #include <vigra_ext/FileRAII.h>
-
--#include <ImfRgbaFile.h>
--#include <ImfArray.h>
-+#include <OpenEXR/ImfRgbaFile.h>
-+#include <OpenEXR/ImfArray.h>
-
-
- // hack to read pgm header
-Index: hugin-2020.0.0/CMakeModules/FindVIGRA.cmake
-===================================================================
---- hugin-2020.0.0.orig/CMakeModules/FindVIGRA.cmake
-+++ hugin-2020.0.0/CMakeModules/FindVIGRA.cmake
-@@ -75,6 +75,9 @@ IF (VIGRA_FOUND)
- )
- STRING(TOLOWER "${OUTPUT_LDD_VIGRA}" OUTPUT_LDD_VIGRA_LOWER)
- IF(NOT "${OUTPUT_LDD_VIGRA_LOWER}" MATCHES "libilmimf")
-+ ELSEIF(NOT "${OUTPUT_LDD_VIGRA_LOWER}" MATCHES "libiopenexr")
-+ MESSAGE(STATUS "OpenEXR is version 3 or greter.")
-+ ELSE()
- MESSAGE(FATAL_ERROR "Libvigraimpex found. But vigraimpex seems to compiled without OpenEXR support. OpenEXR support is required for Hugin.")
- ENDIF()
- ELSE()