From de11f0e753cb831756435102a24038a1f958f84b590b64e4133819efbc044466 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Mon, 17 Jul 2023 07:54:34 +0000 Subject: [PATCH] Accepting request 1096982 from home:tux93:branches:graphics - Add fix_build_with_exiv2_0-28.pach, fixing build with exiv2-0.28 OBS-URL: https://build.opensuse.org/request/show/1096982 OBS-URL: https://build.opensuse.org/package/show/graphics/hugin?expand=0&rev=126 --- fix_build_with_exiv2_0-28.pach | 90 ++++++++++++++++++++++++++++++++++ hugin.changes | 5 ++ hugin.spec | 4 +- 3 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 fix_build_with_exiv2_0-28.pach diff --git a/fix_build_with_exiv2_0-28.pach b/fix_build_with_exiv2_0-28.pach new file mode 100644 index 0000000..415b456 --- /dev/null +++ b/fix_build_with_exiv2_0-28.pach @@ -0,0 +1,90 @@ +diff --git a/src/hugin_base/panodata/Exiv2Helper.cpp b/src/hugin_base/panodata/Exiv2Helper.cpp +--- a/src/hugin_base/panodata/Exiv2Helper.cpp ++++ b/src/hugin_base/panodata/Exiv2Helper.cpp +@@ -40,7 +40,11 @@ + Exiv2::ExifData::iterator itr = exifData.findKey(Exiv2::ExifKey(keyName)); + if (itr != exifData.end() && itr->count()) + { ++#if defined EXIV2_VERSION && EXIV2_TEST_VERSION(0,28,0) ++ value = itr->toInt64(); ++#else + value = itr->toLong(); ++#endif + return true; + } + else +@@ -165,7 +169,11 @@ + { + if(it!=exifData.end() && it->count()) + { ++#if defined EXIV2_VERSION && EXIV2_TEST_VERSION(0,28,0) ++ return it->toInt64(); ++#else + return it->toLong(); ++#endif + } + return 0; + }; +diff --git a/src/hugin_base/panodata/SrcPanoImage.cpp b/src/hugin_base/panodata/SrcPanoImage.cpp +--- a/src/hugin_base/panodata/SrcPanoImage.cpp ++++ b/src/hugin_base/panodata/SrcPanoImage.cpp +@@ -384,7 +384,11 @@ + pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.CroppedAreaImageWidthPixels")); + if (pos != xmpData.end()) + { ++#if defined EXIV2_VERSION && EXIV2_TEST_VERSION(0,28,0) ++ croppedWidth = pos->toInt64(); ++#else + croppedWidth = pos->toLong(); ++#endif + } + else + { +@@ -394,7 +398,11 @@ + pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.CroppedAreaImageHeightPixels")); + if (pos != xmpData.end()) + { ++#if defined EXIV2_VERSION && EXIV2_TEST_VERSION(0,28,0) ++ croppedHeight = pos->toInt64(); ++#else + croppedHeight = pos->toLong(); ++#endif + } + else + { +@@ -408,7 +416,11 @@ + double hfov = 0; + if (pos != xmpData.end()) + { ++#if defined EXIV2_VERSION && EXIV2_TEST_VERSION(0,28,0) ++ hfov = 360 * croppedWidth / (double)pos->toInt64(); ++#else + hfov = 360 * croppedWidth / (double)pos->toLong(); ++#endif + } + else + { +@@ -419,7 +431,11 @@ + pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.FullPanoHeightPixels")); + if (pos != xmpData.end()) + { ++#if defined EXIV2_VERSION && EXIV2_TEST_VERSION(0,28,0) ++ fullHeight = pos->toInt64(); ++#else + fullHeight = pos->toLong(); ++#endif + } + else + { +@@ -430,7 +446,11 @@ + pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.CroppedAreaTopPixels")); + if (pos != xmpData.end()) + { ++#if defined EXIV2_VERSION && EXIV2_TEST_VERSION(0,28,0) ++ cropTop = pos->toInt64(); ++#else + cropTop = pos->toLong(); ++#endif + } + else + { diff --git a/hugin.changes b/hugin.changes index 7439e68..0e8d813 100644 --- a/hugin.changes +++ b/hugin.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jul 5 15:41:15 UTC 2023 - Marcel Kuehlhorn + +- Add fix_build_with_exiv2_0-28.pach, fixing build with exiv2-0.28 + ------------------------------------------------------------------- Sat Dec 24 18:00:39 UTC 2022 - Petr Vorel diff --git a/hugin.spec b/hugin.spec index 5d12926..dc4dbb1 100644 --- a/hugin.spec +++ b/hugin.spec @@ -1,7 +1,7 @@ # # spec file for package hugin # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,8 @@ Group: Productivity/Graphics/Other URL: http://hugin.sourceforge.net/ Source: https://downloads.sourceforge.net/project/%{name}/%{name}/%{name}-%{mversion}/%{name}-%{version}.tar.bz2 Patch0: hugin.appdata.patch +# PATCH-FIX-UPSTREAM fix build with exiv2-0.28 +Patch1: fix_build_with_exiv2_0-28.pach BuildRequires: Mesa-devel BuildRequires: OpenEXR-devel BuildRequires: cmake >= 3.1.0