diff --git a/hugin-openexr3.patch b/hugin-openexr3.patch new file mode 100644 index 0000000..35aff7b --- /dev/null +++ b/hugin-openexr3.patch @@ -0,0 +1,54 @@ +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 + #include + +-#include +-#include ++#include ++#include + + + // 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() + diff --git a/hugin.changes b/hugin.changes index 8c9dda2..a7d421b 100644 --- a/hugin.changes +++ b/hugin.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Aug 10 11:25:24 UTC 2021 - pgajdos@suse.com + +- build with OpenEXR 3 +- added patches + fix https://src.fedoraproject.org/rpms/hugin/blob/rawhide/f/hugin-openexr3.patch + + hugin-openexr3.patch + ------------------------------------------------------------------- Mon Dec 21 15:43:34 UTC 2020 - Atri Bhattacharya diff --git a/hugin.spec b/hugin.spec index 9a981b4..e3c1a17 100644 --- a/hugin.spec +++ b/hugin.spec @@ -1,7 +1,7 @@ # # spec file for package hugin # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -62,6 +62,8 @@ Group: Productivity/Graphics/Other URL: http://hugin.sourceforge.net/ Source: http://downloads.sourceforge.net/project/%{name}/%{name}/%{name}-%{mversion}/%{name}-%{version}.tar.bz2 Patch0: hugin.appdata.patch +# https://src.fedoraproject.org/rpms/hugin/blob/rawhide/f/hugin-openexr3.patch +Patch1: hugin-openexr3.patch Requires: enblend-enfuse >= 3.2 # needed for photo stiching (bnc#822775) Requires: make @@ -80,6 +82,7 @@ detection and extraction of key points. %prep %setup -q %patch0 +%patch1 -p1 chmod -x AUTHORS authors.txt Changes.txt README COPYING.txt @@ -90,6 +93,8 @@ mv src/translations/cs_CZ.po src/translations/cs.po #sed -i "s/ca_ES/ca/;s/cs_CZ/cs/" src/hugin/po/LINGUAS %build +# Doesn't define the ZLIB::ZLIB target needed by OpenEXR 3 +rm CMakeModules/FindZLIB.cmake %cmake \ -DENABLE_LAPACK=%{?with_lapack:ON}%{!?with_lapack:OFF} \ -DBUILD_HSI=%{?with_hsi:ON}%{!?with_hsi:OFF} \