From 4e79a077ff6661edd98bd83266d6c8a9dbd8be4b Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sun, 2 Jul 2023 15:19:50 +0200 Subject: graphics/hugin: make compatible with exiv2 0.28 PR: 272311 --- graphics/hugin/Makefile | 2 +- .../patch-src_hugin__base_panodata_Exiv2Helper.cpp | 27 +++++++++++++ ...patch-src_hugin__base_panodata_SrcPanoImage.cpp | 47 ++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 graphics/hugin/files/patch-src_hugin__base_panodata_Exiv2Helper.cpp create mode 100644 graphics/hugin/files/patch-src_hugin__base_panodata_SrcPanoImage.cpp diff --git a/graphics/hugin/Makefile b/graphics/hugin/Makefile index 87d244130551..3c5bbd84d9b5 100644 --- a/graphics/hugin/Makefile +++ b/graphics/hugin/Makefile @@ -1,6 +1,6 @@ PORTNAME= hugin DISTVERSION= 2022.0.0 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= graphics MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION:R} diff --git a/graphics/hugin/files/patch-src_hugin__base_panodata_Exiv2Helper.cpp b/graphics/hugin/files/patch-src_hugin__base_panodata_Exiv2Helper.cpp new file mode 100644 index 000000000000..c383922e90da --- /dev/null +++ b/graphics/hugin/files/patch-src_hugin__base_panodata_Exiv2Helper.cpp @@ -0,0 +1,27 @@ +--- src/hugin_base/panodata/Exiv2Helper.cpp.orig 2019-05-15 15:30:47 UTC ++++ src/hugin_base/panodata/Exiv2Helper.cpp +@@ -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; + }; +@@ -600,4 +600,4 @@ namespace HuginBase + }; + + }; //namespace Exiv2Helper +-}; //namespace HuginBase +\ No newline at end of file ++}; //namespace HuginBase diff --git a/graphics/hugin/files/patch-src_hugin__base_panodata_SrcPanoImage.cpp b/graphics/hugin/files/patch-src_hugin__base_panodata_SrcPanoImage.cpp new file mode 100644 index 000000000000..b097a4a9939b --- /dev/null +++ b/graphics/hugin/files/patch-src_hugin__base_panodata_SrcPanoImage.cpp @@ -0,0 +1,47 @@ +--- src/hugin_base/panodata/SrcPanoImage.cpp.orig 2022-05-26 16:18:56 UTC ++++ src/hugin_base/panodata/SrcPanoImage.cpp +@@ -384,7 +384,7 @@ bool SrcPanoImage::readEXIF() + pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.CroppedAreaImageWidthPixels")); + if (pos != xmpData.end()) + { +- croppedWidth = pos->toLong(); ++ croppedWidth = pos->toInt64(); + } + else + { +@@ -394,7 +394,7 @@ bool SrcPanoImage::readEXIF() + pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.CroppedAreaImageHeightPixels")); + if (pos != xmpData.end()) + { +- croppedHeight = pos->toLong(); ++ croppedHeight = pos->toInt64(); + } + else + { +@@ -408,7 +408,7 @@ bool SrcPanoImage::readEXIF() + double hfov = 0; + if (pos != xmpData.end()) + { +- hfov = 360 * croppedWidth / (double)pos->toLong(); ++ hfov = 360 * croppedWidth / (double)pos->toInt64(); + } + else + { +@@ -419,7 +419,7 @@ bool SrcPanoImage::readEXIF() + pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.FullPanoHeightPixels")); + if (pos != xmpData.end()) + { +- fullHeight = pos->toLong(); ++ fullHeight = pos->toInt64(); + } + else + { +@@ -430,7 +430,7 @@ bool SrcPanoImage::readEXIF() + pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.CroppedAreaTopPixels")); + if (pos != xmpData.end()) + { +- cropTop = pos->toLong(); ++ cropTop = pos->toInt64(); + } + else + { -- cgit v1.2.3